From e789f0f062e20cd1dd98fe5823c9a7e8d7c00419 Mon Sep 17 00:00:00 2001 From: Yun Yeo Date: Fri, 14 May 2021 12:02:16 +0900 Subject: [PATCH 1/8] bump cosmos-sdk v0.43.0-beta1 & migrate msgauth to cosmos-sdk's authz module --- .github/workflows/proto.yml | 2 + .github/workflows/sims.yml | 12 +- .github/workflows/test.yml | 4 +- CHANGELOG.md | 7 + Dockerfile | 2 +- app/app.go | 123 +- app/legacy/migrate.go | 27 +- app/legacy/pubkey_replacement.go | 14 +- app/legacy/v05/migrate.go | 7 +- app/params/encoding.go | 2 +- client/docs/config.json | 7 +- client/docs/swagger-ui/swagger.yaml | 37858 ++++++++-------- cmd/terrad/genaccounts.go | 4 +- cmd/terrad/root.go | 43 +- cmd/terrad/testnet.go | 18 +- custom/auth/ante/ante.go | 67 +- custom/auth/ante/tax.go | 11 +- custom/auth/ante/tax_test.go | 9 +- custom/auth/client/utils/feeutils.go | 34 +- custom/auth/module.go | 2 +- custom/authz/legacy/v043/migrate.go | 79 + .../authz/legacy/v043}/migrate_test.go | 18 +- custom/authz/legacy/v043/types.go | 6 + custom/bank/module.go | 2 +- custom/bank/simulation/operations.go | 10 +- custom/bank/types/codec.go | 8 - custom/crisis/module.go | 2 +- custom/distribution/wasm/interface_test.go | 4 +- custom/gov/legacy/v040/migrate.go | 4 +- custom/gov/module.go | 2 +- custom/gov/types/codec.go | 4 - custom/mint/module.go | 2 +- custom/staking/module.go | 2 +- custom/staking/wasm/interface_test.go | 4 +- docs/core/proto-docs.md | 9131 ++-- go.mod | 11 +- go.sum | 212 +- proto/terra/msgauth/v1beta1/genesis.proto | 26 - proto/terra/msgauth/v1beta1/msgauth.proto | 68 - proto/terra/msgauth/v1beta1/query.proto | 48 - proto/terra/msgauth/v1beta1/tx.proto | 69 - .../proto/cosmos/auth/v1beta1/query.proto | 21 + .../proto/cosmos/authz/v1beta1/authz.proto | 26 + .../proto/cosmos/authz/v1beta1/event.proto | 24 + .../proto/cosmos/authz/v1beta1/genesis.proto | 23 + .../proto/cosmos/authz/v1beta1/query.proto | 34 + .../proto/cosmos/authz/v1beta1/tx.proto | 67 + .../proto/cosmos/bank/v1beta1/authz.proto | 17 + .../proto/cosmos/bank/v1beta1/bank.proto | 15 +- .../proto/cosmos/bank/v1beta1/genesis.proto | 3 +- .../proto/cosmos/bank/v1beta1/query.proto | 11 +- .../base/query/v1beta1/pagination.proto | 3 + .../base/reflection/v1beta1/reflection.proto | 2 +- .../base/reflection/v2alpha1/reflection.proto | 217 + .../cosmos/base/store/v1beta1/listening.proto | 14 + .../proto/cosmos/crypto/ed25519/keys.proto | 13 +- .../proto/cosmos/crypto/secp256r1/keys.proto | 22 + .../cosmos/feegrant/v1beta1/feegrant.proto | 77 + .../cosmos/feegrant/v1beta1/genesis.proto | 12 + .../proto/cosmos/feegrant/v1beta1/query.proto | 54 + .../proto/cosmos/feegrant/v1beta1/tx.proto | 48 + .../proto/cosmos/gov/v1beta1/gov.proto | 18 +- third_party/proto/cosmos/gov/v1beta1/tx.proto | 18 + .../cosmos/slashing/v1beta1/slashing.proto | 15 +- .../proto/cosmos/staking/v1beta1/authz.proto | 43 + .../cosmos/staking/v1beta1/staking.proto | 6 + .../proto/cosmos/tx/v1beta1/service.proto | 5 +- third_party/proto/cosmos/tx/v1beta1/tx.proto | 4 +- .../proto/cosmos/upgrade/v1beta1/query.proto | 4 +- .../cosmos/upgrade/v1beta1/upgrade.proto | 17 +- .../applications/transfer/v1/genesis.proto | 5 +- .../ibc/applications/transfer/v1/query.proto | 9 +- .../applications/transfer/v1/transfer.proto | 3 +- .../ibc/applications/transfer/v1/tx.proto | 3 +- .../proto/ibc/core/channel/v1/channel.proto | 3 +- .../proto/ibc/core/channel/v1/genesis.proto | 3 +- .../proto/ibc/core/channel/v1/query.proto | 59 +- .../proto/ibc/core/channel/v1/tx.proto | 16 +- .../proto/ibc/core/client/v1/client.proto | 57 +- .../proto/ibc/core/client/v1/genesis.proto | 8 +- .../proto/ibc/core/client/v1/query.proto | 72 +- third_party/proto/ibc/core/client/v1/tx.proto | 12 +- .../ibc/core/commitment/v1/commitment.proto | 5 +- .../ibc/core/connection/v1/connection.proto | 8 +- .../ibc/core/connection/v1/genesis.proto | 3 +- .../proto/ibc/core/connection/v1/query.proto | 15 +- .../proto/ibc/core/connection/v1/tx.proto | 16 +- .../proto/ibc/core/types/v1/genesis.proto | 3 +- .../lightclients/localhost/v1/localhost.proto | 5 +- .../solomachine/v1/solomachine.proto | 17 +- .../tendermint/v1/tendermint.proto | 16 +- x/market/common_test.go | 2 +- x/market/handler_test.go | 6 +- x/market/keeper/keeper.go | 12 +- x/market/keeper/test_utils.go | 36 +- x/market/legacy/v05/migrate_test.go | 4 +- x/market/module.go | 15 +- x/market/simulation/decoder.go | 10 +- x/market/simulation/decoder_test.go | 4 +- x/market/simulation/operations.go | 8 +- x/market/types/codec.go | 5 - x/market/types/expected_keepers.go | 4 +- x/market/types/genesis.go | 2 +- x/msgauth/abci.go | 33 - x/msgauth/abci_test.go | 36 - x/msgauth/client/cli/query.go | 95 - x/msgauth/client/cli/tx.go | 209 - x/msgauth/client/rest/query.go | 95 - x/msgauth/client/rest/rest.go | 42 - x/msgauth/client/rest/tx.go | 180 - x/msgauth/exported/alias.go | 11 - x/msgauth/genesis.go | 52 - x/msgauth/genesis_test.go | 34 - x/msgauth/handler.go | 31 - x/msgauth/handler_test.go | 90 - x/msgauth/keeper/keeper.go | 252 - x/msgauth/keeper/keeper_test.go | 157 - x/msgauth/keeper/legacy_querier.go | 59 - x/msgauth/keeper/legacy_querier_test.go | 87 - x/msgauth/keeper/msg_server.go | 130 - x/msgauth/keeper/querier.go | 64 - x/msgauth/keeper/querier_test.go | 60 - x/msgauth/keeper/test_utils.go | 157 - x/msgauth/legacy/v05/migrate.go | 65 - x/msgauth/legacy/v05/types.go | 6 - x/msgauth/module.go | 194 - x/msgauth/simulation/decoder.go | 31 - x/msgauth/simulation/decoder_test.go | 63 - x/msgauth/simulation/operations.go | 287 - x/msgauth/spec/01_events.md | 40 - x/msgauth/types/authorization.go | 102 - x/msgauth/types/codec.go | 62 - x/msgauth/types/errors.go | 14 - x/msgauth/types/events.go | 14 - x/msgauth/types/expected_keeper.go | 21 - x/msgauth/types/generic_authorization.go | 22 - x/msgauth/types/generic_authorization_test.go | 19 - x/msgauth/types/genesis.go | 54 - x/msgauth/types/genesis.pb.go | 654 - x/msgauth/types/keys.go | 70 - x/msgauth/types/msgauth.pb.go | 1354 - x/msgauth/types/msgs.go | 241 - x/msgauth/types/msgs_test.go | 98 - x/msgauth/types/querier.go | 34 - x/msgauth/types/query.pb.go | 1023 - x/msgauth/types/query.pb.gw.go | 304 - x/msgauth/types/send_authorization.go | 36 - x/msgauth/types/send_authorization_test.go | 40 - x/msgauth/types/tx.pb.go | 1487 - x/oracle/abci.go | 4 +- x/oracle/abci_test.go | 16 +- x/oracle/common_test.go | 4 +- x/oracle/keeper/ballot.go | 2 +- x/oracle/keeper/ballot_test.go | 10 +- x/oracle/keeper/keeper.go | 34 +- x/oracle/keeper/keeper_test.go | 2 +- x/oracle/keeper/params.go | 7 + x/oracle/keeper/reward_test.go | 4 +- x/oracle/keeper/slash.go | 4 +- x/oracle/keeper/slash_test.go | 2 +- x/oracle/keeper/test_utils.go | 32 +- x/oracle/legacy/v05/migrate_test.go | 4 +- x/oracle/module.go | 15 +- x/oracle/simulation/decoder.go | 22 +- x/oracle/simulation/decoder_test.go | 10 +- x/oracle/simulation/operations.go | 8 +- x/oracle/tally.go | 2 +- x/oracle/types/ballot_test.go | 2 +- x/oracle/types/expected_keeper.go | 6 +- x/oracle/types/genesis.go | 2 +- x/oracle/types/keys.go | 9 +- x/oracle/types/test_utils.go | 36 +- x/treasury/abci_test.go | 27 +- x/treasury/client/cli/tx.go | 4 +- x/treasury/client/cli/utils.go | 4 +- x/treasury/keeper/burn_account.go | 3 - x/treasury/keeper/indicator_test.go | 26 +- x/treasury/keeper/keeper.go | 60 +- x/treasury/keeper/keeper_test.go | 27 +- x/treasury/keeper/legacy_querier_test.go | 9 +- x/treasury/keeper/policy.go | 12 +- x/treasury/keeper/policy_test.go | 26 +- x/treasury/keeper/querier_test.go | 11 +- x/treasury/keeper/seigniorage_test.go | 15 +- x/treasury/keeper/test_utils.go | 42 +- x/treasury/legacy/v05/migrate_test.go | 4 +- x/treasury/module.go | 15 +- x/treasury/simulation/decoder.go | 34 +- x/treasury/simulation/decoder_test.go | 16 +- x/treasury/types/exptected_keepers.go | 15 +- x/treasury/types/genesis.go | 2 +- x/vesting/module.go | 6 +- x/vesting/types/common_test.go | 2 +- x/vesting/types/vesting_account.go | 27 +- x/wasm/common_test.go | 8 +- x/wasm/handler_test.go | 4 +- x/wasm/keeper/api.go | 8 +- x/wasm/keeper/connector.go | 4 +- x/wasm/keeper/contract.go | 6 +- x/wasm/keeper/contract_test.go | 16 +- x/wasm/keeper/custom_test.go | 3 +- x/wasm/keeper/keeper.go | 22 +- x/wasm/keeper/reflect_test.go | 2 +- x/wasm/keeper/staking_test.go | 14 +- x/wasm/keeper/submsg_test.go | 26 +- x/wasm/keeper/test_utils.go | 101 +- x/wasm/legacy/v05/migrate_test.go | 4 +- x/wasm/module.go | 15 +- x/wasm/simulation/decoder.go | 10 +- x/wasm/simulation/decoder_test.go | 6 +- x/wasm/simulation/operations.go | 16 +- x/wasm/types/expected_keeper.go | 17 +- x/wasm/types/genesis.go | 2 +- x/wasm/types/keys.go | 5 +- 214 files changed, 26490 insertions(+), 31876 deletions(-) create mode 100644 custom/authz/legacy/v043/migrate.go rename {x/msgauth/legacy/v05 => custom/authz/legacy/v043}/migrate_test.go (84%) create mode 100644 custom/authz/legacy/v043/types.go delete mode 100644 proto/terra/msgauth/v1beta1/genesis.proto delete mode 100644 proto/terra/msgauth/v1beta1/msgauth.proto delete mode 100644 proto/terra/msgauth/v1beta1/query.proto delete mode 100644 proto/terra/msgauth/v1beta1/tx.proto create mode 100644 third_party/proto/cosmos/authz/v1beta1/authz.proto create mode 100644 third_party/proto/cosmos/authz/v1beta1/event.proto create mode 100644 third_party/proto/cosmos/authz/v1beta1/genesis.proto create mode 100644 third_party/proto/cosmos/authz/v1beta1/query.proto create mode 100644 third_party/proto/cosmos/authz/v1beta1/tx.proto create mode 100644 third_party/proto/cosmos/bank/v1beta1/authz.proto create mode 100644 third_party/proto/cosmos/base/reflection/v2alpha1/reflection.proto create mode 100644 third_party/proto/cosmos/base/store/v1beta1/listening.proto create mode 100644 third_party/proto/cosmos/crypto/secp256r1/keys.proto create mode 100644 third_party/proto/cosmos/feegrant/v1beta1/feegrant.proto create mode 100644 third_party/proto/cosmos/feegrant/v1beta1/genesis.proto create mode 100644 third_party/proto/cosmos/feegrant/v1beta1/query.proto create mode 100644 third_party/proto/cosmos/feegrant/v1beta1/tx.proto create mode 100644 third_party/proto/cosmos/staking/v1beta1/authz.proto delete mode 100644 x/msgauth/abci.go delete mode 100644 x/msgauth/abci_test.go delete mode 100644 x/msgauth/client/cli/query.go delete mode 100644 x/msgauth/client/cli/tx.go delete mode 100644 x/msgauth/client/rest/query.go delete mode 100644 x/msgauth/client/rest/rest.go delete mode 100644 x/msgauth/client/rest/tx.go delete mode 100644 x/msgauth/exported/alias.go delete mode 100644 x/msgauth/genesis.go delete mode 100644 x/msgauth/genesis_test.go delete mode 100644 x/msgauth/handler.go delete mode 100644 x/msgauth/handler_test.go delete mode 100644 x/msgauth/keeper/keeper.go delete mode 100644 x/msgauth/keeper/keeper_test.go delete mode 100644 x/msgauth/keeper/legacy_querier.go delete mode 100644 x/msgauth/keeper/legacy_querier_test.go delete mode 100644 x/msgauth/keeper/msg_server.go delete mode 100644 x/msgauth/keeper/querier.go delete mode 100644 x/msgauth/keeper/querier_test.go delete mode 100644 x/msgauth/keeper/test_utils.go delete mode 100644 x/msgauth/legacy/v05/migrate.go delete mode 100644 x/msgauth/legacy/v05/types.go delete mode 100644 x/msgauth/module.go delete mode 100644 x/msgauth/simulation/decoder.go delete mode 100644 x/msgauth/simulation/decoder_test.go delete mode 100644 x/msgauth/simulation/operations.go delete mode 100644 x/msgauth/spec/01_events.md delete mode 100644 x/msgauth/types/authorization.go delete mode 100644 x/msgauth/types/codec.go delete mode 100644 x/msgauth/types/errors.go delete mode 100644 x/msgauth/types/events.go delete mode 100644 x/msgauth/types/expected_keeper.go delete mode 100644 x/msgauth/types/generic_authorization.go delete mode 100644 x/msgauth/types/generic_authorization_test.go delete mode 100644 x/msgauth/types/genesis.go delete mode 100644 x/msgauth/types/genesis.pb.go delete mode 100644 x/msgauth/types/keys.go delete mode 100644 x/msgauth/types/msgauth.pb.go delete mode 100644 x/msgauth/types/msgs.go delete mode 100644 x/msgauth/types/msgs_test.go delete mode 100644 x/msgauth/types/querier.go delete mode 100644 x/msgauth/types/query.pb.go delete mode 100644 x/msgauth/types/query.pb.gw.go delete mode 100644 x/msgauth/types/send_authorization.go delete mode 100644 x/msgauth/types/send_authorization_test.go delete mode 100644 x/msgauth/types/tx.pb.go diff --git a/.github/workflows/proto.yml b/.github/workflows/proto.yml index 13f05c131..85c897215 100644 --- a/.github/workflows/proto.yml +++ b/.github/workflows/proto.yml @@ -3,6 +3,7 @@ name: Protobuf # This workflow is only run when a .proto file has been changed on: pull_request: + type: [ labeled ] paths: - "**.proto" jobs: @@ -14,6 +15,7 @@ jobs: - name: lint run: make proto-lint breakage: + if: ${{ github.event.label.name != 'proto-breaking' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@master diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index 925c38658..f067eedd9 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -25,7 +25,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-go@v2.1.3 with: - go-version: 1.15 + go-version: 1.16 - name: Display go version run: go version - run: make build @@ -36,7 +36,7 @@ jobs: steps: - uses: actions/setup-go@v2.1.3 with: - go-version: 1.15 + go-version: 1.16 - name: Display go version run: go version - name: Install runsim @@ -53,7 +53,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-go@v2.1.3 with: - go-version: 1.15 + go-version: 1.16 - name: Display go version run: go version - uses: technote-space/get-diff-action@v4 @@ -79,7 +79,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-go@v2.1.3 with: - go-version: 1.15 + go-version: 1.16 - name: Display go version run: go version - uses: technote-space/get-diff-action@v4 @@ -107,7 +107,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-go@v2.1.3 with: - go-version: 1.15 + go-version: 1.16 - name: Display go version run: go version - uses: technote-space/get-diff-action@v4 @@ -135,7 +135,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-go@v2.1.3 with: - go-version: 1.15 + go-version: 1.16 - name: Display go version run: go version - uses: technote-space/get-diff-action@v4 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ce344aec2..4a8756e2e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,7 +20,7 @@ jobs: steps: - uses: actions/setup-go@v2.1.3 with: - go-version: 1.15 + go-version: 1.16 - uses: actions/checkout@v2 - uses: technote-space/get-diff-action@v4 with: @@ -58,7 +58,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-go@v2.1.3 with: - go-version: 1.15 + go-version: 1.16 - uses: technote-space/get-diff-action@v4 id: git_diff with: diff --git a/CHANGELOG.md b/CHANGELOG.md index 186a44376..f1c970116 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [Unreleased] + + * (tendermint) Bump Tendermint version to [v0.34.10](https://github.com/tendermint/tendermint/releases/tag/v0.34.10). + * (cosmos-sdk) Bump Cosmos SDK version to [v0.43.0](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.43.0). + * (cosmwasm) Bump CosmWasm version to [v0.14.0](https://github.com/CosmWasm/cosmwasm/release/tag/v0.14.0). + * (golang) Bump golang prerequisite from 1.15 to 1.16. + ## 0.4.0 ### Release Notes diff --git a/Dockerfile b/Dockerfile index e3b17d060..2c21ae366 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # docker build . -t cosmwasm/wasmd:latest # docker run --rm -it cosmwasm/wasmd:latest /bin/sh -FROM golang:1.15-alpine3.12 AS go-builder +FROM golang:1.16-alpine3.12 AS go-builder # this comes from standard alpine nightly file # https://github.com/rust-lang/docker-rust-nightly/blob/master/alpine3.12/Dockerfile diff --git a/app/app.go b/app/app.go index ea3551621..833a5c581 100644 --- a/app/app.go +++ b/app/app.go @@ -17,6 +17,17 @@ import ( tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" + transfer "github.com/cosmos/ibc-go/modules/apps/transfer" + ibctransferkeeper "github.com/cosmos/ibc-go/modules/apps/transfer/keeper" + ibctransfertypes "github.com/cosmos/ibc-go/modules/apps/transfer/types" + ibc "github.com/cosmos/ibc-go/modules/core" + ibcclient "github.com/cosmos/ibc-go/modules/core/02-client" + ibcclientclient "github.com/cosmos/ibc-go/modules/core/02-client/client" + ibcclienttypes "github.com/cosmos/ibc-go/modules/core/02-client/types" + porttypes "github.com/cosmos/ibc-go/modules/core/05-port/types" + ibchost "github.com/cosmos/ibc-go/modules/core/24-host" + ibckeeper "github.com/cosmos/ibc-go/modules/core/keeper" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" @@ -36,6 +47,9 @@ import ( authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + "github.com/cosmos/cosmos-sdk/x/authz" + authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" + authzmodule "github.com/cosmos/cosmos-sdk/x/authz/module" "github.com/cosmos/cosmos-sdk/x/bank" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" @@ -52,19 +66,14 @@ import ( "github.com/cosmos/cosmos-sdk/x/evidence" evidencekeeper "github.com/cosmos/cosmos-sdk/x/evidence/keeper" evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" + "github.com/cosmos/cosmos-sdk/x/feegrant" + feegrantkeeper "github.com/cosmos/cosmos-sdk/x/feegrant/keeper" + feegrantmodule "github.com/cosmos/cosmos-sdk/x/feegrant/module" "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" "github.com/cosmos/cosmos-sdk/x/gov" govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - transfer "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer" - ibctransferkeeper "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/keeper" - ibctransfertypes "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/types" - ibc "github.com/cosmos/cosmos-sdk/x/ibc/core" - ibcclient "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client" - porttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/05-port/types" - ibchost "github.com/cosmos/cosmos-sdk/x/ibc/core/24-host" - ibckeeper "github.com/cosmos/cosmos-sdk/x/ibc/core/keeper" "github.com/cosmos/cosmos-sdk/x/mint" mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" @@ -105,9 +114,6 @@ import ( "github.com/terra-project/core/x/market" marketkeeper "github.com/terra-project/core/x/market/keeper" markettypes "github.com/terra-project/core/x/market/types" - "github.com/terra-project/core/x/msgauth" - msgauthkeeper "github.com/terra-project/core/x/msgauth/keeper" - msgauthtypes "github.com/terra-project/core/x/msgauth/types" "github.com/terra-project/core/x/oracle" oraclekeeper "github.com/terra-project/core/x/oracle/keeper" oracletypes "github.com/terra-project/core/x/oracle/types" @@ -156,10 +162,13 @@ var ( upgradeclient.CancelProposalHandler, treasuryclient.TaxRateUpdateProposalHandler, treasuryclient.RewardWeightUpdateProposalHandler, + ibcclientclient.UpdateClientProposalHandler, + ibcclientclient.UpgradeProposalHandler, ), customparams.AppModuleBasic{}, customcrisis.AppModuleBasic{}, customslashing.AppModuleBasic{}, + feegrantmodule.AppModuleBasic{}, ibc.AppModuleBasic{}, customupgrade.AppModuleBasic{}, customevidence.AppModuleBasic{}, @@ -169,7 +178,7 @@ var ( market.AppModuleBasic{}, treasury.AppModuleBasic{}, wasm.AppModuleBasic{}, - msgauth.AppModuleBasic{}, + authzmodule.AppModuleBasic{}, ) // module account permissions @@ -206,7 +215,7 @@ var ( type TerraApp struct { // nolint: golint *baseapp.BaseApp legacyAmino *codec.LegacyAmino - appCodec codec.Marshaler + appCodec codec.Codec interfaceRegistry codectypes.InterfaceRegistry invCheckPeriod uint @@ -218,6 +227,7 @@ type TerraApp struct { // nolint: golint // keepers AccountKeeper authkeeper.AccountKeeper + AuthzKeeper authzkeeper.Keeper BankKeeper bankkeeper.Keeper CapabilityKeeper *capabilitykeeper.Keeper StakingKeeper stakingkeeper.Keeper @@ -230,12 +240,12 @@ type TerraApp struct { // nolint: golint ParamsKeeper paramskeeper.Keeper IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly EvidenceKeeper evidencekeeper.Keeper + FeeGrantKeeper feegrantkeeper.Keeper TransferKeeper ibctransferkeeper.Keeper OracleKeeper oraclekeeper.Keeper MarketKeeper marketkeeper.Keeper TreasuryKeeper treasurykeeper.Keeper WasmKeeper wasmkeeper.Keeper - MsgauthKeeper msgauthkeeper.Keeper // make scoped keepers public for test purposes ScopedIBCKeeper capabilitykeeper.ScopedKeeper @@ -246,6 +256,9 @@ type TerraApp struct { // nolint: golint // simulation manager sm *module.SimulationManager + + // the configurator + configurator module.Configurator } func init() { @@ -269,7 +282,7 @@ func NewTerraApp( bApp := baseapp.NewBaseApp(appName, logger, db, encodingConfig.TxConfig.TxDecoder(), baseAppOptions...) bApp.SetCommitMultiStoreTracer(traceStore) - bApp.SetAppVersion(version.Version) + bApp.SetVersion(version.Version) bApp.SetInterfaceRegistry(interfaceRegistry) keys := sdk.NewKVStoreKeys( @@ -278,7 +291,7 @@ func NewTerraApp( govtypes.StoreKey, paramstypes.StoreKey, ibchost.StoreKey, upgradetypes.StoreKey, evidencetypes.StoreKey, ibctransfertypes.StoreKey, capabilitytypes.StoreKey, oracletypes.StoreKey, markettypes.StoreKey, treasurytypes.StoreKey, - wasmtypes.StoreKey, msgauthtypes.StoreKey, + wasmtypes.StoreKey, authzkeeper.StoreKey, feegrant.StoreKey, ) tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey) memKeys := sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey) @@ -328,7 +341,9 @@ func NewTerraApp( app.CrisisKeeper = crisiskeeper.NewKeeper( app.GetSubspace(crisistypes.ModuleName), invCheckPeriod, app.BankKeeper, authtypes.FeeCollectorName, ) - app.UpgradeKeeper = upgradekeeper.NewKeeper(skipUpgradeHeights, keys[upgradetypes.StoreKey], appCodec, homePath) + + app.FeeGrantKeeper = feegrantkeeper.NewKeeper(appCodec, keys[feegrant.StoreKey], app.AccountKeeper) + app.UpgradeKeeper = upgradekeeper.NewKeeper(skipUpgradeHeights, keys[upgradetypes.StoreKey], appCodec, homePath, app.BaseApp) // register the staking hooks // NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks @@ -336,9 +351,11 @@ func NewTerraApp( stakingtypes.NewMultiStakingHooks(app.DistrKeeper.Hooks(), app.SlashingKeeper.Hooks()), ) + app.AuthzKeeper = authzkeeper.NewKeeper(keys[authzkeeper.StoreKey], appCodec, bApp.MsgServiceRouter()) + // Create IBC Keeper app.IBCKeeper = ibckeeper.NewKeeper( - appCodec, keys[ibchost.StoreKey], app.GetSubspace(ibchost.ModuleName), app.StakingKeeper, scopedIBCKeeper, + appCodec, keys[ibchost.StoreKey], app.GetSubspace(ibchost.ModuleName), app.StakingKeeper, app.UpgradeKeeper, scopedIBCKeeper, ) // Create Transfer Keepers @@ -367,21 +384,23 @@ func NewTerraApp( app.AccountKeeper, app.BankKeeper, app.DistrKeeper, &stakingKeeper, distrtypes.ModuleName, ) app.MarketKeeper = marketkeeper.NewKeeper( - appCodec, keys[markettypes.StoreKey], app.GetSubspace(markettypes.ModuleName), + appCodec, keys[markettypes.StoreKey], + app.GetSubspace(markettypes.ModuleName), app.AccountKeeper, app.BankKeeper, app.OracleKeeper, ) app.TreasuryKeeper = treasurykeeper.NewKeeper( - appCodec, keys[treasurytypes.StoreKey], app.GetSubspace(treasurytypes.ModuleName), - app.AccountKeeper, app.BankKeeper, app.MarketKeeper, app.StakingKeeper, app.DistrKeeper, + appCodec, keys[treasurytypes.StoreKey], + app.GetSubspace(treasurytypes.ModuleName), + app.AccountKeeper, app.BankKeeper, + app.MarketKeeper, app.OracleKeeper, + app.StakingKeeper, app.DistrKeeper, distrtypes.ModuleName) - app.MsgauthKeeper = msgauthkeeper.NewKeeper( - appCodec, keys[msgauthtypes.StoreKey], bApp.Router(), - ) + app.WasmKeeper = wasmkeeper.NewKeeper( appCodec, keys[wasmtypes.StoreKey], app.GetSubspace(wasmtypes.ModuleName), app.AccountKeeper, app.BankKeeper, - app.TreasuryKeeper, bApp.Router(), + app.TreasuryKeeper, bApp.MsgServiceRouter(), app.GRPCQueryRouter(), wasmtypes.DefaultFeatures, homePath, wasmConfig, ) @@ -409,7 +428,7 @@ func NewTerraApp( AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)). AddRoute(distrtypes.RouterKey, distr.NewCommunityPoolSpendProposalHandler(app.DistrKeeper)). AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper)). - AddRoute(ibchost.RouterKey, ibcclient.NewClientUpdateProposalHandler(app.IBCKeeper.ClientKeeper)). + AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)). AddRoute(treasurytypes.RouterKey, treasury.NewTreasuryPolicyUpdateHandler(app.TreasuryKeeper)) app.GovKeeper = govkeeper.NewKeeper( appCodec, keys[govtypes.StoreKey], app.GetSubspace(govtypes.ModuleName), app.AccountKeeper, app.BankKeeper, @@ -434,6 +453,7 @@ func NewTerraApp( bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper), capability.NewAppModule(appCodec, *app.CapabilityKeeper), crisis.NewAppModule(&app.CrisisKeeper, skipGenesisInvariants), + feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper), mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper), slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), @@ -443,12 +463,12 @@ func NewTerraApp( evidence.NewAppModule(app.EvidenceKeeper), ibc.NewAppModule(app.IBCKeeper), params.NewAppModule(app.ParamsKeeper), + authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), transferModule, market.NewAppModule(appCodec, app.MarketKeeper, app.AccountKeeper, app.BankKeeper, app.OracleKeeper), oracle.NewAppModule(appCodec, app.OracleKeeper, app.AccountKeeper, app.BankKeeper), treasury.NewAppModule(appCodec, app.TreasuryKeeper), wasm.NewAppModule(appCodec, app.WasmKeeper, app.AccountKeeper, app.BankKeeper), - msgauth.NewAppModule(appCodec, app.MsgauthKeeper, app.AccountKeeper, app.BankKeeper), ) // During begin block slashing happens after distr.BeginBlocker so that @@ -464,8 +484,8 @@ func NewTerraApp( app.mm.SetOrderEndBlockers( crisistypes.ModuleName, govtypes.ModuleName, oracletypes.ModuleName, markettypes.ModuleName, - treasurytypes.ModuleName, msgauthtypes.ModuleName, - stakingtypes.ModuleName, + treasurytypes.ModuleName, authz.ModuleName, + feegrant.ModuleName, stakingtypes.ModuleName, ) // NOTE: The genutils module must occur after staking so that pools are @@ -480,15 +500,17 @@ func NewTerraApp( stakingtypes.ModuleName, slashingtypes.ModuleName, govtypes.ModuleName, markettypes.ModuleName, oracletypes.ModuleName, treasurytypes.ModuleName, - wasmtypes.ModuleName, msgauthtypes.ModuleName, + wasmtypes.ModuleName, authz.ModuleName, minttypes.ModuleName, crisistypes.ModuleName, ibchost.ModuleName, genutiltypes.ModuleName, evidencetypes.ModuleName, ibctransfertypes.ModuleName, + feegrant.ModuleName, ) app.mm.RegisterInvariants(&app.CrisisKeeper) app.mm.RegisterRoutes(app.Router(), app.QueryRouter(), encodingConfig.Amino) - app.mm.RegisterServices(module.NewConfigurator(app.MsgServiceRouter(), app.GRPCQueryRouter())) + app.configurator = module.NewConfigurator(app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter()) + app.mm.RegisterServices(app.configurator) // create the simulation manager and define the order of the modules for deterministic simulations // @@ -496,8 +518,10 @@ func NewTerraApp( // transactions app.sm = module.NewSimulationManager( customauth.NewAppModule(appCodec, app.AccountKeeper, customauthsim.RandomGenesisAccounts), + authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), custombank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper), capability.NewAppModule(appCodec, *app.CapabilityKeeper), + feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper), mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper), staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper), @@ -511,7 +535,6 @@ func NewTerraApp( market.NewAppModule(appCodec, app.MarketKeeper, app.AccountKeeper, app.BankKeeper, app.OracleKeeper), treasury.NewAppModule(appCodec, app.TreasuryKeeper), wasm.NewAppModule(appCodec, app.WasmKeeper, app.AccountKeeper, app.BankKeeper), - msgauth.NewAppModule(appCodec, app.MsgauthKeeper, app.AccountKeeper, app.BankKeeper), ) app.sm.RegisterStoreDecoders() @@ -521,18 +544,26 @@ func NewTerraApp( app.MountTransientStores(tkeys) app.MountMemoryStores(memKeys) - // initialize BaseApp // initialize BaseApp app.SetInitChainer(app.InitChainer) app.SetBeginBlocker(app.BeginBlocker) - app.SetAnteHandler( - customante.NewAnteHandler( - app.AccountKeeper, app.BankKeeper, - app.OracleKeeper, app.TreasuryKeeper, - ante.DefaultSigVerificationGasConsumer, - encodingConfig.TxConfig.SignModeHandler(), - ), + + anteHandler, err := customante.NewAnteHandler( + customante.HandlerOptions{ + AccountKeeper: app.AccountKeeper, + BankKeeper: app.BankKeeper, + FeegrantKeeper: app.FeeGrantKeeper, + OracleKeeper: app.OracleKeeper, + TreasuryKeeper: app.TreasuryKeeper, + SigGasConsumer: ante.DefaultSigVerificationGasConsumer, + SignModeHandler: encodingConfig.TxConfig.SignModeHandler(), + }, ) + if err != nil { + panic(err) + } + + app.SetAnteHandler(anteHandler) app.SetEndBlocker(app.EndBlocker) if loadLatest { @@ -556,14 +587,6 @@ func NewTerraApp( return app } -// MakeCodecs constructs the *std.Codec and *codec.LegacyAmino instances used by -// Gaia. It is useful for tests and clients who do not want to construct the -// full gaia application -func MakeCodecs() (codec.Marshaler, *codec.LegacyAmino) { - config := MakeEncodingConfig() - return config.Marshaler, config.Amino -} - // Name returns the name of the App func (app *TerraApp) Name() string { return app.BaseApp.Name() } @@ -623,7 +646,7 @@ func (app *TerraApp) LegacyAmino() *codec.LegacyAmino { // // NOTE: This is solely to be used for testing purposes as it may be desirable // for modules to register their own custom testing types. -func (app *TerraApp) AppCodec() codec.Marshaler { +func (app *TerraApp) AppCodec() codec.Codec { return app.appCodec } @@ -724,7 +747,7 @@ func GetMaccPerms() map[string][]string { } // initParamsKeeper init params keeper and its subspaces -func initParamsKeeper(appCodec codec.BinaryMarshaler, legacyAmino *codec.LegacyAmino, key, tkey sdk.StoreKey) paramskeeper.Keeper { +func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino, key, tkey sdk.StoreKey) paramskeeper.Keeper { paramsKeeper := paramskeeper.NewKeeper(appCodec, legacyAmino, key, tkey) paramsKeeper.Subspace(authtypes.ModuleName) diff --git a/app/legacy/migrate.go b/app/legacy/migrate.go index 73fef30d2..e228d2adf 100644 --- a/app/legacy/migrate.go +++ b/app/legacy/migrate.go @@ -15,6 +15,11 @@ import ( tmjson "github.com/tendermint/tendermint/libs/json" tmtypes "github.com/tendermint/tendermint/types" + ibcxfertypes "github.com/cosmos/ibc-go/modules/apps/transfer/types" + host "github.com/cosmos/ibc-go/modules/core/24-host" + "github.com/cosmos/ibc-go/modules/core/exported" + ibccoretypes "github.com/cosmos/ibc-go/modules/core/types" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" sdk "github.com/cosmos/cosmos-sdk/types" @@ -22,10 +27,6 @@ import ( captypes "github.com/cosmos/cosmos-sdk/x/capability/types" evtypes "github.com/cosmos/cosmos-sdk/x/evidence/types" "github.com/cosmos/cosmos-sdk/x/genutil/types" - ibcxfertypes "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/types" - host "github.com/cosmos/cosmos-sdk/x/ibc/core/24-host" - "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" - ibccoretypes "github.com/cosmos/cosmos-sdk/x/ibc/core/types" staking "github.com/cosmos/cosmos-sdk/x/staking/types" legacy05 "github.com/terra-project/core/app/legacy/v05" @@ -76,10 +77,10 @@ $ terrad migrate /path/to/genesis.json --chain-id=cosmoshub-4 --genesis-time=201 var bankGenesis banktypes.GenesisState - clientCtx.JSONMarshaler.MustUnmarshalJSON(newGenState[banktypes.ModuleName], &bankGenesis) + clientCtx.JSONCodec.MustUnmarshalJSON(newGenState[banktypes.ModuleName], &bankGenesis) var oracleGenesis oracletypes.GenesisState - clientCtx.JSONMarshaler.MustUnmarshalJSON(newGenState[oracletypes.ModuleName], &oracleGenesis) + clientCtx.JSONCodec.MustUnmarshalJSON(newGenState[oracletypes.ModuleName], &oracleGenesis) // Register whitelist denom list denomMetadata := make([]banktypes.Metadata, len(oracleGenesis.Params.Whitelist)+1) @@ -110,11 +111,11 @@ $ terrad migrate /path/to/genesis.json --chain-id=cosmoshub-4 --genesis-time=201 } bankGenesis.DenomMetadata = denomMetadata - newGenState[banktypes.ModuleName] = clientCtx.JSONMarshaler.MustMarshalJSON(&bankGenesis) + newGenState[banktypes.ModuleName] = clientCtx.JSONCodec.MustMarshalJSON(&bankGenesis) var stakingGenesis staking.GenesisState - clientCtx.JSONMarshaler.MustUnmarshalJSON(newGenState[staking.ModuleName], &stakingGenesis) + clientCtx.JSONCodec.MustUnmarshalJSON(newGenState[staking.ModuleName], &stakingGenesis) ibcTransferGenesis := ibcxfertypes.DefaultGenesisState() ibcCoreGenesis := ibccoretypes.DefaultGenesisState() @@ -127,11 +128,11 @@ $ terrad migrate /path/to/genesis.json --chain-id=cosmoshub-4 --genesis-time=201 ibcCoreGenesis.ClientGenesis.Params.AllowedClients = []string{exported.Tendermint} stakingGenesis.Params.HistoricalEntries = 10000 - newGenState[ibcxfertypes.ModuleName] = clientCtx.JSONMarshaler.MustMarshalJSON(ibcTransferGenesis) - newGenState[host.ModuleName] = clientCtx.JSONMarshaler.MustMarshalJSON(ibcCoreGenesis) - newGenState[captypes.ModuleName] = clientCtx.JSONMarshaler.MustMarshalJSON(capGenesis) - newGenState[evtypes.ModuleName] = clientCtx.JSONMarshaler.MustMarshalJSON(evGenesis) - newGenState[staking.ModuleName] = clientCtx.JSONMarshaler.MustMarshalJSON(&stakingGenesis) + newGenState[ibcxfertypes.ModuleName] = clientCtx.JSONCodec.MustMarshalJSON(ibcTransferGenesis) + newGenState[host.ModuleName] = clientCtx.JSONCodec.MustMarshalJSON(ibcCoreGenesis) + newGenState[captypes.ModuleName] = clientCtx.JSONCodec.MustMarshalJSON(capGenesis) + newGenState[evtypes.ModuleName] = clientCtx.JSONCodec.MustMarshalJSON(evGenesis) + newGenState[staking.ModuleName] = clientCtx.JSONCodec.MustMarshalJSON(&stakingGenesis) genDoc.AppState, err = json.Marshal(newGenState) if err != nil { diff --git a/app/legacy/pubkey_replacement.go b/app/legacy/pubkey_replacement.go index ae9e89a51..0db8014a3 100644 --- a/app/legacy/pubkey_replacement.go +++ b/app/legacy/pubkey_replacement.go @@ -13,7 +13,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" codectypes "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/bech32/legacybech32" "github.com/cosmos/cosmos-sdk/x/genutil/types" slashing "github.com/cosmos/cosmos-sdk/x/slashing/types" staking "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -60,8 +60,8 @@ func loadKeydataFromFile(clientCtx client.Context, replacementrJSON string, genD var stakingGenesis staking.GenesisState var slashingGenesis slashing.GenesisState - clientCtx.JSONMarshaler.MustUnmarshalJSON(state[staking.ModuleName], &stakingGenesis) - clientCtx.JSONMarshaler.MustUnmarshalJSON(state[slashing.ModuleName], &slashingGenesis) + clientCtx.JSONCodec.MustUnmarshalJSON(state[staking.ModuleName], &stakingGenesis) + clientCtx.JSONCodec.MustUnmarshalJSON(state[slashing.ModuleName], &slashingGenesis) for i, val := range stakingGenesis.Validators { idx, replacement := replacementKeys.isReplacedValidator(val.OperatorAddress) @@ -70,8 +70,8 @@ func loadKeydataFromFile(clientCtx client.Context, replacementrJSON string, genD toReplaceValConsAddress, _ := val.GetConsAddr() - consPubKey, err := sdk.GetPubKeyFromBech32(sdk.Bech32PubKeyTypeConsPub, replacement.ConsensusPubkey) - + // TODO: check gaia before making release candidate + consPubKey, err := legacybech32.UnmarshalPubKey(legacybech32.ConsPK, replacement.ConsensusPubkey) if err != nil { log.Fatal(fmt.Errorf("failed to decode key:%s %w", consPubKey, err)) } @@ -110,8 +110,8 @@ func loadKeydataFromFile(clientCtx client.Context, replacementrJSON string, genD } } - state[staking.ModuleName] = clientCtx.JSONMarshaler.MustMarshalJSON(&stakingGenesis) - state[slashing.ModuleName] = clientCtx.JSONMarshaler.MustMarshalJSON(&slashingGenesis) + state[staking.ModuleName] = clientCtx.JSONCodec.MustMarshalJSON(&stakingGenesis) + state[slashing.ModuleName] = clientCtx.JSONCodec.MustMarshalJSON(&slashingGenesis) genDoc.AppState, err = json.Marshal(state) diff --git a/app/legacy/v05/migrate.go b/app/legacy/v05/migrate.go index 4af6764b1..25e62b7e2 100644 --- a/app/legacy/v05/migrate.go +++ b/app/legacy/v05/migrate.go @@ -34,10 +34,10 @@ import ( v036paramscustom "github.com/terra-project/core/custom/params/legacy/v036" v038upgradecustom "github.com/terra-project/core/custom/upgrade/legacy/v038" + v043authz "github.com/terra-project/core/custom/authz/legacy/v043" v04market "github.com/terra-project/core/x/market/legacy/v04" v05market "github.com/terra-project/core/x/market/legacy/v05" v04msgauth "github.com/terra-project/core/x/msgauth/legacy/v04" - v05msgauth "github.com/terra-project/core/x/msgauth/legacy/v05" v04oracle "github.com/terra-project/core/x/oracle/legacy/v04" v05oracle "github.com/terra-project/core/x/oracle/legacy/v05" v04treasury "github.com/terra-project/core/x/treasury/legacy/v04" @@ -63,7 +63,7 @@ func Migrate(appState types.AppMap, clientCtx client.Context) types.AppMap { v036paramscustom.RegisterLegacyAminoCodec(v04Codec) v038upgradecustom.RegisterLegacyAminoCodec(v04Codec) - v05Codec := clientCtx.JSONMarshaler + v05Codec := clientCtx.JSONCodec if appState[v038bank.ModuleName] != nil { // unmarshal relative source genesis application state @@ -146,6 +146,7 @@ func Migrate(appState types.AppMap, clientCtx client.Context) types.AppMap { } // Migrate x/gov. + // NOTE: custom gov migration contains v043 migration step, but call it as v040 if appState[v036gov.ModuleName] != nil { // unmarshal relative source genesis application state var govGenState v036gov.GenesisState @@ -251,7 +252,7 @@ func Migrate(appState types.AppMap, clientCtx client.Context) types.AppMap { // Migrate relative source genesis application state and marshal it into // the respective key. - appState[v05msgauth.ModuleName] = v05Codec.MustMarshalJSON(v05msgauth.Migrate(msgauthGenState)) + appState[v043authz.ModuleName] = v05Codec.MustMarshalJSON(v043authz.Migrate(msgauthGenState)) } if appState[v04treasury.ModuleName] != nil { diff --git a/app/params/encoding.go b/app/params/encoding.go index 698408daf..3d634abf1 100644 --- a/app/params/encoding.go +++ b/app/params/encoding.go @@ -10,7 +10,7 @@ import ( // This is provided for compatibility between protobuf and amino implementations. type EncodingConfig struct { InterfaceRegistry types.InterfaceRegistry - Marshaler codec.Marshaler + Marshaler codec.Codec TxConfig client.TxConfig Amino *codec.LegacyAmino } diff --git a/client/docs/config.json b/client/docs/config.json index ef8a40d15..bd4b31210 100644 --- a/client/docs/config.json +++ b/client/docs/config.json @@ -137,10 +137,6 @@ } } }, - { - "url": "./tmp-swagger-gen/terra/msgauth/v1beta1/query.swagger.json", - "operationIds": {} - }, { "url": "./tmp-swagger-gen/terra/wasm/v1beta1/query.swagger.json", "operationIds": { @@ -161,7 +157,8 @@ "url": "./tmp-swagger-gen/ibc/core/client/v1/query.swagger.json", "operationIds": { "rename": { - "Params": "IBCClientParams" + "Params": "IBCClientParams", + "UpgradedConsensusState": "IBCUpgradedConsensusState" } } }, diff --git a/client/docs/swagger-ui/swagger.yaml b/client/docs/swagger-ui/swagger.yaml index 0246a4088..e7c918c5d 100644 --- a/client/docs/swagger-ui/swagger.yaml +++ b/client/docs/swagger-ui/swagger.yaml @@ -8613,99 +8613,17 @@ paths: description: Bad request '500': description: Internal Server Error - '/cosmos/auth/v1beta1/accounts/{address}': + /cosmos/auth/v1beta1/accounts: get: - summary: Account returns account details based on address. - operationId: Account + summary: Accounts returns all the existing accounts + operationId: Accounts responses: '200': description: A successful response. schema: type: object properties: - account: - description: account defines the account of the corresponding address. - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all - types that they - - expect it to use in the context of Any. However, for URLs - which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - QueryAccountResponse is the response type for the Query/Account - RPC method. - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: + accounts: type: array items: type: object @@ -8882,46 +8800,28 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - parameters: - - name: address - description: address defines the address to query for. - in: path - required: true - type: string - tags: - - Query - /cosmos/auth/v1beta1/params: - get: - summary: Params queries all parameters. - operationId: AuthParams - responses: - '200': - description: A successful response. - schema: - type: object - properties: - params: - description: params defines the parameters of the module. + title: accounts are the existing accounts + pagination: + description: pagination defines the pagination in the response. type: object properties: - max_memo_characters: - type: string - format: uint64 - tx_sig_limit: - type: string - format: uint64 - tx_size_cost_per_byte: - type: string - format: uint64 - sig_verify_cost_ed25519: + next_key: type: string - format: uint64 - sig_verify_cost_secp256k1: + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: type: string format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise description: >- - QueryParamsResponse is the response type for the Query/Params RPC - method. + QueryAccountsResponse is the response type for the Query/Accounts + RPC method. default: description: An unexpected error response schema: @@ -9111,87 +9011,7 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - tags: - - Query - '/cosmos/bank/v1beta1/balances/{address}': - get: - summary: AllBalances queries the balance of all coins for a single account. - operationId: AllBalances - responses: - '200': - description: A successful response. - schema: - type: object - properties: - balances: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - 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. - description: balances is the balances of all the coins. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: >- - QueryAllBalancesResponse is the response type for the - Query/AllBalances RPC - - method. - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - value: - type: string - format: byte parameters: - - name: address - description: address is the address to query balances for. - in: path - required: true - type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin @@ -9239,35 +9059,199 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true indicates that, results to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean tags: - Query - '/cosmos/bank/v1beta1/balances/{address}/{denom}': + '/cosmos/auth/v1beta1/accounts/{address}': get: - summary: Balance queries the balance of a single coin for a single account. - operationId: Balance + summary: Account returns account details based on address. + operationId: Account responses: '200': description: A successful response. schema: type: object properties: - balance: + account: type: object properties: - denom: + type_url: type: string - amount: + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. description: >- - Coin defines a token with a denomination and an amount. + `Any` contains an arbitrary serialized protocol buffer message + along with a + URL that describes the type of the serialized message. - NOTE: The amount field is an Int which implements the custom - method - signatures required by gogoproto. + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } description: >- - QueryBalanceResponse is the response type for the Query/Balance + QueryAccountResponse is the response type for the Query/Account RPC method. default: description: An unexpected error response @@ -9288,96 +9272,435 @@ paths: properties: type_url: type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. value: type: string format: byte - parameters: - - name: address - description: address is the address to query balances for. - in: path - required: true - type: string - - name: denom - description: denom is the coin denom to query balances for. - in: path - required: true - type: string - tags: - - Query - /cosmos/bank/v1beta1/denoms_metadata: - get: - summary: >- - DenomsMetadata queries the client metadata for all registered coin - denominations. - operationId: DenomsMetadata - responses: - '200': - description: A successful response. - schema: - type: object - properties: - metadatas: - type: array - items: - type: object - properties: - description: - type: string - denom_units: - type: array - items: - type: object - properties: - denom: - type: string - description: >- - denom represents the string name of the given - denom unit (e.g uatom). - exponent: - type: integer - format: int64 - description: >- - exponent represents power of 10 exponent that one - must + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a - raise the base_denom to in order to equal the - given DenomUnit's denom + URL that describes the type of the serialized message. - 1 denom = 1^exponent base_denom - (e.g. with a base_denom of uatom, one can create a - DenomUnit of 'atom' with + Protobuf library provides support to pack/unpack Any values + in the form - exponent = 6, thus: 1 atom = 10^6 uatom). - aliases: - type: array - items: - type: string - title: >- - aliases is a list of string aliases for the given - denom - description: |- - DenomUnit represents a struct that describes a given - denomination unit of the basic token. - title: >- - denom_units represents the list of DenomUnit's for a - given coin - base: + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: address + description: address defines the address to query for. + in: path + required: true + type: string + tags: + - Query + /cosmos/auth/v1beta1/params: + get: + summary: Params queries all parameters. + operationId: AuthParams + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + max_memo_characters: + type: string + format: uint64 + tx_sig_limit: + type: string + format: uint64 + tx_size_cost_per_byte: + type: string + format: uint64 + sig_verify_cost_ed25519: + type: string + format: uint64 + sig_verify_cost_secp256k1: + type: string + format: uint64 + description: >- + QueryParamsResponse is the response type for the Query/Params RPC + method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: type: string description: >- - base represents the base denom (should be the DenomUnit - with exponent = 0). - display: + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: type: string - description: |- - display indicates the suggested denom that should be - displayed in clients. - description: |- - Metadata represents a struct that describes - a basic token. - description: >- - metadata provides the client information for all the - registered tokens. + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + tags: + - Query + '/cosmos/bank/v1beta1/balances/{address}': + get: + summary: AllBalances queries the balance of all coins for a single account. + operationId: AllBalances + responses: + '200': + description: A successful response. + schema: + type: object + properties: + balances: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + 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. + description: balances is the balances of all the coins. pagination: description: pagination defines the pagination in the response. type: object @@ -9397,8 +9720,8 @@ paths: was set, its value is undefined otherwise description: >- - QueryDenomsMetadataResponse is the response type for the - Query/DenomsMetadata RPC + QueryAllBalancesResponse is the response type for the + Query/AllBalances RPC method. default: @@ -9424,6 +9747,11 @@ paths: type: string format: byte parameters: + - name: address + description: address is the address to query balances for. + in: path + required: true + type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin @@ -9471,80 +9799,44 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true indicates that, results to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean tags: - Query - '/cosmos/bank/v1beta1/denoms_metadata/{denom}': + '/cosmos/bank/v1beta1/balances/{address}/{denom}': get: - summary: DenomsMetadata queries the client metadata of a given coin denomination. - operationId: DenomMetadata + summary: Balance queries the balance of a single coin for a single account. + operationId: Balance responses: '200': description: A successful response. schema: type: object properties: - metadata: + balance: type: object properties: - description: + denom: type: string - denom_units: - type: array - items: - type: object - properties: - denom: - type: string - description: >- - denom represents the string name of the given denom - unit (e.g uatom). - exponent: - type: integer - format: int64 - description: >- - exponent represents power of 10 exponent that one - must - - raise the base_denom to in order to equal the given - DenomUnit's denom + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. - 1 denom = 1^exponent base_denom - (e.g. with a base_denom of uatom, one can create a - DenomUnit of 'atom' with + NOTE: The amount field is an Int which implements the custom + method - exponent = 6, thus: 1 atom = 10^6 uatom). - aliases: - type: array - items: - type: string - title: >- - aliases is a list of string aliases for the given - denom - description: |- - DenomUnit represents a struct that describes a given - denomination unit of the basic token. - title: >- - denom_units represents the list of DenomUnit's for a given - coin - base: - type: string - description: >- - base represents the base denom (should be the DenomUnit - with exponent = 0). - display: - type: string - description: |- - display indicates the suggested denom that should be - displayed in clients. - description: |- - Metadata represents a struct that describes - a basic token. + signatures required by gogoproto. description: >- - QueryDenomMetadataResponse is the response type for the - Query/DenomMetadata RPC - - method. + QueryBalanceResponse is the response type for the Query/Balance + RPC method. default: description: An unexpected error response schema: @@ -9568,51 +9860,355 @@ paths: type: string format: byte parameters: + - name: address + description: address is the address to query balances for. + in: path + required: true + type: string - name: denom - description: denom is the coin denom to query the metadata for. + description: denom is the coin denom to query balances for. in: path required: true type: string tags: - Query - /cosmos/bank/v1beta1/params: + /cosmos/bank/v1beta1/denoms_metadata: get: - summary: Params queries the parameters of x/bank module. - operationId: BankParams + summary: >- + DenomsMetadata queries the client metadata for all registered coin + denominations. + operationId: DenomsMetadata responses: '200': description: A successful response. schema: type: object properties: - params: - type: object - properties: - send_enabled: - type: array - items: - type: object - properties: - denom: - type: string - enabled: - type: boolean - format: boolean - description: >- - SendEnabled maps coin denom to a send_enabled status - (whether a denom is - - sendable). - default_send_enabled: - type: boolean - format: boolean - description: Params defines the parameters for the bank module. - description: >- - QueryParamsResponse defines the response type for querying x/bank - parameters. - default: - description: An unexpected error response - schema: + metadatas: + type: array + items: + type: object + properties: + description: + type: string + denom_units: + type: array + items: + type: object + properties: + denom: + type: string + description: >- + denom represents the string name of the given + denom unit (e.g uatom). + exponent: + type: integer + format: int64 + description: >- + 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 = 1^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). + aliases: + type: array + items: + type: string + title: >- + aliases is a list of string aliases for the given + denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + title: >- + denom_units represents the list of DenomUnit's for a + given coin + base: + type: string + description: >- + base represents the base denom (should be the DenomUnit + with exponent = 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: >- + symbol is the token symbol usually shown on exchanges + (eg: ATOM). This can + + be the same as the display. + description: |- + Metadata represents a struct that describes + a basic token. + description: >- + metadata provides the client information for all the + registered tokens. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryDenomsMetadataResponse is the response type for the + Query/DenomsMetadata RPC + + method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: pagination.key + description: |- + 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. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + 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. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + 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. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + 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. + in: query + required: false + type: boolean + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true indicates that, results to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean + tags: + - Query + '/cosmos/bank/v1beta1/denoms_metadata/{denom}': + get: + summary: DenomsMetadata queries the client metadata of a given coin denomination. + operationId: DenomMetadata + responses: + '200': + description: A successful response. + schema: + type: object + properties: + metadata: + type: object + properties: + description: + type: string + denom_units: + type: array + items: + type: object + properties: + denom: + type: string + description: >- + denom represents the string name of the given denom + unit (e.g uatom). + exponent: + type: integer + format: int64 + description: >- + 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 = 1^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). + aliases: + type: array + items: + type: string + title: >- + aliases is a list of string aliases for the given + denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + title: >- + denom_units represents the list of DenomUnit's for a given + coin + base: + type: string + description: >- + base represents the base denom (should be the DenomUnit + with exponent = 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: >- + symbol is the token symbol usually shown on exchanges (eg: + ATOM). This can + + be the same as the display. + description: |- + Metadata represents a struct that describes + a basic token. + description: >- + QueryDenomMetadataResponse is the response type for the + Query/DenomMetadata RPC + + method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: denom + description: denom is the coin denom to query the metadata for. + in: path + required: true + type: string + tags: + - Query + /cosmos/bank/v1beta1/params: + get: + summary: Params queries the parameters of x/bank module. + operationId: BankParams + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + type: object + properties: + send_enabled: + type: array + items: + type: object + properties: + denom: + type: string + enabled: + type: boolean + format: boolean + description: >- + SendEnabled maps coin denom to a send_enabled status + (whether a denom is + + sendable). + default_send_enabled: + type: boolean + format: boolean + description: Params defines the parameters for the bank module. + description: >- + QueryParamsResponse defines the response type for querying x/bank + parameters. + default: + description: An unexpected error response + schema: type: object properties: error: @@ -9662,6 +10258,24 @@ paths: signatures required by gogoproto. title: supply is the supply of the coins + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise title: >- QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC @@ -9689,6 +10303,62 @@ paths: value: type: string format: byte + parameters: + - name: pagination.key + description: |- + 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. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + 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. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + 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. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + 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. + in: query + required: false + type: boolean + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true indicates that, results to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean tags: - Query '/cosmos/bank/v1beta1/supply/{denom}': @@ -12210,6 +12880,14 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true indicates that, results to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean tags: - Service '/cosmos/base/tendermint/v1beta1/validatorsets/{height}': @@ -12679,6 +13357,14 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true indicates that, results to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean tags: - Service /cosmos/distribution/v1beta1/community_pool: @@ -13325,6 +14011,14 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true indicates that, results to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean tags: - Query /cosmos/evidence/v1beta1/evidence: @@ -13775,6 +14469,14 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true indicates that, results to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean tags: - Query '/cosmos/evidence/v1beta1/evidence/{evidence_hash}': @@ -14995,6 +15697,14 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true indicates that, results to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean tags: - Query '/cosmos/gov/v1beta1/proposals/{proposal_id}': @@ -15767,6 +16477,14 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true indicates that, results to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean tags: - Query '/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}': @@ -16262,24 +16980,34 @@ paths: format: uint64 voter: type: string - option: - type: string - enum: - - VOTE_OPTION_UNSPECIFIED - - VOTE_OPTION_YES - - VOTE_OPTION_ABSTAIN - - VOTE_OPTION_NO - - VOTE_OPTION_NO_WITH_VETO - default: VOTE_OPTION_UNSPECIFIED - description: >- - VoteOption enumerates the valid vote options for a given - governance proposal. - - - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + options: + type: array + items: + type: object + properties: + option: + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + description: >- + VoteOption enumerates the valid vote options for a + given governance proposal. + + - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. + - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. + - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. + - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + weight: + type: string + description: >- + WeightedVoteOption defines a unit of vote for vote + split. description: >- Vote defines a vote on a governance proposal. @@ -16550,6 +17278,14 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true indicates that, results to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean tags: - Query '/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}': @@ -16570,24 +17306,34 @@ paths: format: uint64 voter: type: string - option: - type: string - enum: - - VOTE_OPTION_UNSPECIFIED - - VOTE_OPTION_YES - - VOTE_OPTION_ABSTAIN - - VOTE_OPTION_NO - - VOTE_OPTION_NO_WITH_VETO - default: VOTE_OPTION_UNSPECIFIED - description: >- - VoteOption enumerates the valid vote options for a given - governance proposal. + options: + type: array + items: + type: object + properties: + option: + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + description: >- + VoteOption enumerates the valid vote options for a + given governance proposal. - - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. + - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. + - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. + - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + weight: + type: string + description: >- + WeightedVoteOption defines a unit of vote for vote + split. description: >- Vote defines a vote on a governance proposal. @@ -17083,30 +17829,43 @@ paths: type: string format: int64 title: >- - height at which validator was first a candidate OR was + Height at which validator was first a candidate OR was unjailed index_offset: type: string format: int64 - title: index offset into signed block bit array + description: >- + 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`. jailed_until: type: string format: date-time - title: timestamp validator cannot be unjailed until + description: >- + Timestamp until which the validator is jailed due to + liveness downtime. tombstoned: type: boolean format: boolean - title: >- - whether or not a validator has been tombstoned (killed - out of validator + description: >- + Whether or not a validator has been tombstoned (killed + out of validator set). It is set - set) + once the validator commits an equivocation or for any + other configured misbehiavor. missed_blocks_counter: type: string format: int64 - title: >- - missed blocks counter (to avoid scanning the array every - time) + description: >- + A counter kept to avoid unnecessary array reads. + + Note that `Sum(MissedBlocksBitArray)` always equals + `MissedBlocksCounter`. description: >- ValidatorSigningInfo defines a validator's signing info for monitoring their @@ -17215,6 +17974,14 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true indicates that, results to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean tags: - Query '/cosmos/slashing/v1beta1/signing_infos/{cons_address}': @@ -17236,30 +18003,43 @@ paths: type: string format: int64 title: >- - height at which validator was first a candidate OR was + Height at which validator was first a candidate OR was unjailed index_offset: type: string format: int64 - title: index offset into signed block bit array + description: >- + 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`. jailed_until: type: string format: date-time - title: timestamp validator cannot be unjailed until + description: >- + Timestamp until which the validator is jailed due to + liveness downtime. tombstoned: type: boolean format: boolean - title: >- - whether or not a validator has been tombstoned (killed out - of validator + description: >- + Whether or not a validator has been tombstoned (killed out + of validator set). It is set - set) + once the validator commits an equivocation or for any + other configured misbehiavor. missed_blocks_counter: type: string format: int64 - title: >- - missed blocks counter (to avoid scanning the array every - time) + description: >- + A counter kept to avoid unnecessary array reads. + + Note that `Sum(MissedBlocksBitArray)` always equals + `MissedBlocksCounter`. description: >- ValidatorSigningInfo defines a validator's signing info for monitoring their @@ -17631,6 +18411,14 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true indicates that, results to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean tags: - Query '/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations': @@ -18031,6 +18819,14 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true indicates that, results to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean tags: - Query '/cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations': @@ -18363,6 +19159,14 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true indicates that, results to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean tags: - Query '/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators': @@ -18954,6 +19758,14 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true indicates that, results to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean tags: - Query '/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}': @@ -20126,6 +20938,11 @@ paths: bond_denom: type: string description: bond_denom defines the bondable coin denomination. + power_reduction: + type: string + title: >- + power_reduction is the amount of staking tokens required + for 1 unit of consensus-engine power description: >- QueryParamsResponse is response type for the Query/Params RPC method. @@ -21117,6 +21934,14 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true indicates that, results to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean tags: - Query '/cosmos/staking/v1beta1/validators/{validator_addr}': @@ -21960,6 +22785,14 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true indicates that, results to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean tags: - Query '/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}': @@ -22819,6 +23652,14 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true indicates that, results to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean tags: - Query /cosmos/tx/v1beta1/simulate: @@ -23354,6 +24195,14 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true indicates that, results to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean - name: order_by description: |2- - ORDER_BY_UNSPECIFIED: ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults to ASC in this case. @@ -24341,14 +25190,6 @@ paths: Time or Height is reached and the software will exit. - time: - type: string - format: date-time - description: >- - The time after which the upgrade must be performed. - - Leave set to its zero value to use a pre-defined Height - instead. height: type: string format: int64 @@ -24363,195 +25204,6 @@ paths: such as a git commit that validators could automatically upgrade to - upgraded_client_state: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type - of the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be - in a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can - optionally set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results - based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty - scheme) might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the - above specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any - values in the form - - of utility functions or additional generated methods of - the Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and - the unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will - yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a - custom JSON - - representation, that representation will be embedded - adding a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - title: >- - IBC-enabled chains can opt-in to including the upgraded - client state in its upgrade plan - - 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 description: >- QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC @@ -24763,176 +25415,8 @@ paths: type: object properties: upgraded_consensus_state: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all - types that they - - expect it to use in the context of Any. However, for URLs - which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in - the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default - use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the last - '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with an - - additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding a - field - - `value` which holds the custom JSON in addition to the `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } + type: string + format: byte description: >- QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState @@ -26688,207 +27172,81 @@ paths: format: byte tags: - Query - '/terra/market/v1beta1/granters/{granter}/grants': + '/terra/wasm/v1beta1/codes/{code_id}': get: - summary: AllGrants returns all grants of a granter - operationId: AllGrants + summary: CodeInfo returns the stored code info + operationId: CodeInfo responses: '200': description: A successful response. schema: type: object properties: - grants: + code_info: + type: object + properties: + code_id: + type: string + format: uint64 + title: CodeID is the sequentially increasing unique identifier + code_hash: + type: string + format: byte + title: CodeHash is the unique identifier created by wasmvm + creator: + type: string + title: Creator address who initially stored the code + title: CodeInfo is data for the uploaded contract WASM code + description: |- + QueryCodeInfoResponse is response type for the + QueryyCodeInfo RPC method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: type: array items: type: object properties: - authorization: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the - type of the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's - path must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be - in a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the - binary all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can - optionally set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results - based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available - in the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty - scheme) might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the - above specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any - values in the form - - of utility functions or additional generated methods of - the Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and - the unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will - yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the - regular - - representation of the deserialized, embedded message, - with an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a - custom JSON - - representation, that representation will be embedded - adding a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message - [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - expiration: + type_url: type: string - format: date-time - title: >- - AuthorizationGrant represent the stored grant instance in - the keeper store - description: >- - QueryAllGrantsResponse is the response type for the - Query/AllGrants RPC method. + value: + type: string + format: byte + parameters: + - name: code_id + description: grpc-gateway_out does not support Go style CodID + in: path + required: true + type: string + format: uint64 + tags: + - Query + '/terra/wasm/v1beta1/codes/{code_id}/byte_code': + get: + summary: ByteCode returns the stored byte code + operationId: ByteCode + responses: + '200': + description: A successful response. + schema: + type: object + properties: + byte_code: + type: string + format: byte + description: |- + QueryByteCodeResponse is response type for the + QueryyByteCode RPC method. default: description: An unexpected error response schema: @@ -26908,384 +27266,34 @@ paths: properties: type_url: type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. value: type: string format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } parameters: - - name: granter + - name: code_id + description: grpc-gateway_out does not support Go style CodID in: path required: true type: string + format: uint64 tags: - Query - '/terra/msgauth/v1beta1/granters/{granter}/grantees/{grantee}/grants': + '/terra/wasm/v1beta1/contract/{contract_address}/store': get: - summary: Grants returns grants between a granter and a grantee - operationId: Grants + summary: ContractStore return smart query result from the contract + operationId: ContractStore responses: '200': description: A successful response. schema: type: object properties: - grants: - type: array - items: - type: object - properties: - authorization: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the - type of the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's - path must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be - in a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the - binary all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can - optionally set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results - based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available - in the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty - scheme) might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the - above specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any - values in the form - - of utility functions or additional generated methods of - the Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and - the unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will - yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the - regular - - representation of the deserialized, embedded message, - with an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a - custom JSON - - representation, that representation will be embedded - adding a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message - [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - expiration: - type: string - format: date-time - title: >- - AuthorizationGrant represent the stored grant instance in - the keeper store - description: >- - QueryGrantsResponse is the response type for the Query/Grants RPC - method. + query_result: + type: string + format: byte + description: |- + QueryContractStoreResponse is response type for the + Query/ContractStore RPC method. default: description: An unexpected error response schema: @@ -27305,215 +27313,38 @@ paths: properties: type_url: type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. value: type: string format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } parameters: - - name: granter + - name: contract_address in: path required: true type: string - - name: grantee - in: path - required: true + - name: query_msg + in: query + required: false type: string + format: byte tags: - Query - '/terra/wasm/v1beta1/codes/{code_id}': + '/terra/wasm/v1beta1/contract/{contract_address}/store/raw': get: - summary: CodeInfo returns the stored code info - operationId: CodeInfo + summary: RawStore return single key from the raw store data of a contract + operationId: RawStore responses: '200': description: A successful response. schema: type: object properties: - code_info: - type: object - properties: - code_id: - type: string - format: uint64 - title: CodeID is the sequentially increasing unique identifier - code_hash: - type: string - format: byte - title: CodeHash is the unique identifier created by wasmvm - creator: - type: string - title: Creator address who initially stored the code - title: CodeInfo is data for the uploaded contract WASM code + data: + type: string + format: byte + title: Data contains the raw store data description: |- - QueryCodeInfoResponse is response type for the - QueryyCodeInfo RPC method. + QueryRawStoreResponse is response type for the + Query/RawStore RPC method. default: description: An unexpected error response schema: @@ -27537,166 +27368,21 @@ paths: type: string format: byte parameters: - - name: code_id - description: grpc-gateway_out does not support Go style CodID + - name: contract_address in: path required: true type: string - format: uint64 + - name: key + in: query + required: false + type: string + format: byte tags: - Query - '/terra/wasm/v1beta1/codes/{code_id}/byte_code': + '/terra/wasm/v1beta1/contracts/{contract_address}': get: - summary: ByteCode returns the stored byte code - operationId: ByteCode - responses: - '200': - description: A successful response. - schema: - type: object - properties: - byte_code: - type: string - format: byte - description: |- - QueryByteCodeResponse is response type for the - QueryyByteCode RPC method. - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - value: - type: string - format: byte - parameters: - - name: code_id - description: grpc-gateway_out does not support Go style CodID - in: path - required: true - type: string - format: uint64 - tags: - - Query - '/terra/wasm/v1beta1/contract/{contract_address}/store': - get: - summary: ContractStore return smart query result from the contract - operationId: ContractStore - responses: - '200': - description: A successful response. - schema: - type: object - properties: - query_result: - type: string - format: byte - description: |- - QueryContractStoreResponse is response type for the - Query/ContractStore RPC method. - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - value: - type: string - format: byte - parameters: - - name: contract_address - in: path - required: true - type: string - - name: query_msg - in: query - required: false - type: string - format: byte - tags: - - Query - '/terra/wasm/v1beta1/contract/{contract_address}/store/raw': - get: - summary: RawStore return single key from the raw store data of a contract - operationId: RawStore - responses: - '200': - description: A successful response. - schema: - type: object - properties: - data: - type: string - format: byte - title: Data contains the raw store data - description: |- - QueryRawStoreResponse is response type for the - Query/RawStore RPC method. - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - value: - type: string - format: byte - parameters: - - name: contract_address - in: path - required: true - type: string - - name: key - in: query - required: false - type: string - format: byte - tags: - - Query - '/terra/wasm/v1beta1/contracts/{contract_address}': - get: - summary: ContractInfo returns the stored contract info - operationId: ContractInfo + summary: ContractInfo returns the stored contract info + operationId: ContractInfo responses: '200': description: A successful response. @@ -27824,7 +27510,7 @@ paths: format: byte tags: - Query - /ibc/core/channel/v1beta1/channels: + /ibc/core/channel/v1/channels: get: summary: Channels queries all the IBC channels of a chain. operationId: Channels @@ -27956,19 +27642,21 @@ paths: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height - while keeping RevisionNumber + while keeping - the same. However some consensus algorithms may choose to - reset the + RevisionNumber the same. However some consensus algorithms may + choose to - height in certain conditions e.g. hard forks, state-machine - breaking changes + reset the height in certain conditions e.g. hard forks, + state-machine - In these cases, the RevisionNumber is incremented so that - height continues to + breaking changes In these cases, the RevisionNumber is + incremented so that - be monitonically increasing even as the RevisionHeight gets - reset + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset description: >- QueryChannelsResponse is the response type for the Query/Channels RPC method. @@ -28209,9 +27897,17 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true indicates that, results to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean tags: - Query - '/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}': + '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}': get: summary: Channel queries an IBC Channel. operationId: Channel @@ -28313,19 +28009,21 @@ paths: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height - while keeping RevisionNumber + while keeping - the same. However some consensus algorithms may choose to - reset the + RevisionNumber the same. However some consensus algorithms may + choose to - height in certain conditions e.g. hard forks, state-machine - breaking changes + reset the height in certain conditions e.g. hard forks, + state-machine - In these cases, the RevisionNumber is incremented so that - height continues to + breaking changes In these cases, the RevisionNumber is + incremented so that - be monitonically increasing even as the RevisionHeight gets - reset + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset description: >- QueryChannelResponse is the response type for the Query/Channel RPC method. @@ -28536,7 +28234,7 @@ paths: type: string tags: - Query - '/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/client_state': + '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/client_state': get: summary: >- ChannelClientState queries for the client state for the channel @@ -28756,19 +28454,21 @@ paths: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height - while keeping RevisionNumber + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to - the same. However some consensus algorithms may choose to - reset the + reset the height in certain conditions e.g. hard forks, + state-machine - height in certain conditions e.g. hard forks, state-machine - breaking changes + breaking changes In these cases, the RevisionNumber is + incremented so that - In these cases, the RevisionNumber is incremented so that - height continues to + height continues to be monitonically increasing even as the + RevisionHeight - be monitonically increasing even as the RevisionHeight gets - reset + gets reset title: |- QueryChannelClientStateResponse is the Response type for the Query/QueryChannelClientState RPC method @@ -28974,7 +28674,7 @@ paths: type: string tags: - Query - '/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/consensus_state/revision/{revision_number}/height/{revision_height}': + '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/consensus_state/revision/{revision_number}/height/{revision_height}': get: summary: |- ChannelConsensusState queries for the consensus state for the channel @@ -29179,19 +28879,21 @@ paths: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height - while keeping RevisionNumber + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to - the same. However some consensus algorithms may choose to - reset the + reset the height in certain conditions e.g. hard forks, + state-machine - height in certain conditions e.g. hard forks, state-machine - breaking changes + breaking changes In these cases, the RevisionNumber is + incremented so that - In these cases, the RevisionNumber is incremented so that - height continues to + height continues to be monitonically increasing even as the + RevisionHeight - be monitonically increasing even as the RevisionHeight gets - reset + gets reset title: |- QueryChannelClientStateResponse is the Response type for the Query/QueryChannelClientState RPC method @@ -29409,7 +29111,7 @@ paths: format: uint64 tags: - Query - '/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/next_sequence': + '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/next_sequence': get: summary: >- NextSequenceReceive returns the next receive sequence for a given @@ -29443,19 +29145,21 @@ paths: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height - while keeping RevisionNumber + while keeping - the same. However some consensus algorithms may choose to - reset the + RevisionNumber the same. However some consensus algorithms may + choose to - height in certain conditions e.g. hard forks, state-machine - breaking changes + reset the height in certain conditions e.g. hard forks, + state-machine - In these cases, the RevisionNumber is incremented so that - height continues to + breaking changes In these cases, the RevisionNumber is + incremented so that - be monitonically increasing even as the RevisionHeight gets - reset + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset title: |- QuerySequenceResponse is the request type for the Query/QueryNextSequenceReceiveResponse RPC method @@ -29661,7 +29365,7 @@ paths: type: string tags: - Query - '/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acknowledgements': + '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_acknowledgements': get: summary: >- PacketAcknowledgements returns all the packet acknowledgements @@ -29746,19 +29450,21 @@ paths: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height - while keeping RevisionNumber + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to - the same. However some consensus algorithms may choose to - reset the + reset the height in certain conditions e.g. hard forks, + state-machine - height in certain conditions e.g. hard forks, state-machine - breaking changes + breaking changes In these cases, the RevisionNumber is + incremented so that - In these cases, the RevisionNumber is incremented so that - height continues to + height continues to be monitonically increasing even as the + RevisionHeight - be monitonically increasing even as the RevisionHeight gets - reset + gets reset title: |- QueryPacketAcknowledgemetsResponse is the request type for the Query/QueryPacketAcknowledgements RPC method @@ -30009,9 +29715,17 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true indicates that, results to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean tags: - Query - '/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence}': + '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence}': get: summary: PacketAcknowledgement queries a stored packet acknowledgement hash. operationId: PacketAcknowledgement @@ -30043,19 +29757,21 @@ paths: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height - while keeping RevisionNumber + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to - the same. However some consensus algorithms may choose to - reset the + reset the height in certain conditions e.g. hard forks, + state-machine - height in certain conditions e.g. hard forks, state-machine - breaking changes + breaking changes In these cases, the RevisionNumber is + incremented so that - In these cases, the RevisionNumber is incremented so that - height continues to + height continues to be monitonically increasing even as the + RevisionHeight - be monitonically increasing even as the RevisionHeight gets - reset + gets reset title: >- QueryPacketAcknowledgementResponse defines the client query response for a @@ -30271,7 +29987,7 @@ paths: format: uint64 tags: - Query - '/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments': + '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments': get: summary: |- PacketCommitments returns all the packet commitments hashes associated @@ -30354,19 +30070,21 @@ paths: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height - while keeping RevisionNumber + while keeping - the same. However some consensus algorithms may choose to - reset the + RevisionNumber the same. However some consensus algorithms may + choose to - height in certain conditions e.g. hard forks, state-machine - breaking changes + reset the height in certain conditions e.g. hard forks, + state-machine - In these cases, the RevisionNumber is incremented so that - height continues to + breaking changes In these cases, the RevisionNumber is + incremented so that - be monitonically increasing even as the RevisionHeight gets - reset + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset title: |- QueryPacketCommitmentsResponse is the request type for the Query/QueryPacketCommitments RPC method @@ -30617,15 +30335,23 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true indicates that, results to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean tags: - Query - '/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_ack_sequences}/unreceived_acks': + '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_ack_sequences}/unreceived_acks': get: summary: >- UnreceivedAcks returns all the unreceived IBC acknowledgements - associated with a + associated - channel and sequences. + with a channel and sequences. operationId: UnreceivedAcks responses: '200': @@ -30653,19 +30379,21 @@ paths: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height - while keeping RevisionNumber + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to - the same. However some consensus algorithms may choose to - reset the + reset the height in certain conditions e.g. hard forks, + state-machine - height in certain conditions e.g. hard forks, state-machine - breaking changes + breaking changes In these cases, the RevisionNumber is + incremented so that - In these cases, the RevisionNumber is incremented so that - height continues to + height continues to be monitonically increasing even as the + RevisionHeight - be monitonically increasing even as the RevisionHeight gets - reset + gets reset title: |- QueryUnreceivedAcksResponse is the response type for the Query/UnreceivedAcks RPC method @@ -30881,7 +30609,7 @@ paths: minItems: 1 tags: - Query - '/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_commitment_sequences}/unreceived_packets': + '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_commitment_sequences}/unreceived_packets': get: summary: >- UnreceivedPackets returns all the unreceived IBC packets associated with @@ -30915,19 +30643,21 @@ paths: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height - while keeping RevisionNumber + while keeping - the same. However some consensus algorithms may choose to - reset the + RevisionNumber the same. However some consensus algorithms may + choose to - height in certain conditions e.g. hard forks, state-machine - breaking changes + reset the height in certain conditions e.g. hard forks, + state-machine - In these cases, the RevisionNumber is incremented so that - height continues to + breaking changes In these cases, the RevisionNumber is + incremented so that - be monitonically increasing even as the RevisionHeight gets - reset + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset title: |- QueryUnreceivedPacketsResponse is the response type for the Query/UnreceivedPacketCommitments RPC method @@ -31143,7 +30873,7 @@ paths: minItems: 1 tags: - Query - '/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence}': + '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence}': get: summary: PacketCommitment queries a stored packet commitment hash. operationId: PacketCommitment @@ -31175,19 +30905,21 @@ paths: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height - while keeping RevisionNumber + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to - the same. However some consensus algorithms may choose to - reset the + reset the height in certain conditions e.g. hard forks, + state-machine - height in certain conditions e.g. hard forks, state-machine - breaking changes + breaking changes In these cases, the RevisionNumber is + incremented so that - In these cases, the RevisionNumber is incremented so that - height continues to + height continues to be monitonically increasing even as the + RevisionHeight - be monitonically increasing even as the RevisionHeight gets - reset + gets reset title: >- QueryPacketCommitmentResponse defines the client query response for a packet @@ -31404,11 +31136,13 @@ paths: format: uint64 tags: - Query - '/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_receipts/{sequence}': + '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_receipts/{sequence}': get: summary: >- PacketReceipt queries if a given packet sequence has been received on - the queried chain + the + + queried chain operationId: PacketReceipt responses: '200': @@ -31438,25 +31172,27 @@ paths: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height - while keeping RevisionNumber + while keeping - the same. However some consensus algorithms may choose to - reset the + RevisionNumber the same. However some consensus algorithms may + choose to - height in certain conditions e.g. hard forks, state-machine - breaking changes + reset the height in certain conditions e.g. hard forks, + state-machine - In these cases, the RevisionNumber is incremented so that - height continues to + breaking changes In these cases, the RevisionNumber is + incremented so that - be monitonically increasing even as the RevisionHeight gets - reset + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset title: >- QueryPacketReceiptResponse defines the client query response for a - packet receipt + packet - which also includes a proof, and the height from which the proof - was + receipt which also includes a proof, and the height from which the + proof was retrieved default: @@ -31667,7 +31403,7 @@ paths: format: uint64 tags: - Query - '/ibc/core/channel/v1beta1/connections/{connection}/channels': + '/ibc/core/channel/v1/connections/{connection}/channels': get: summary: |- ConnectionChannels queries all the channels associated with a connection @@ -31801,19 +31537,21 @@ paths: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height - while keeping RevisionNumber + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to - the same. However some consensus algorithms may choose to - reset the + reset the height in certain conditions e.g. hard forks, + state-machine - height in certain conditions e.g. hard forks, state-machine - breaking changes + breaking changes In these cases, the RevisionNumber is + incremented so that - In these cases, the RevisionNumber is incremented so that - height continues to + height continues to be monitonically increasing even as the + RevisionHeight - be monitonically increasing even as the RevisionHeight gets - reset + gets reset title: |- QueryConnectionChannelsResponse is the Response type for the Query/QueryConnectionChannels RPC method @@ -32059,9 +31797,17 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true indicates that, results to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean tags: - Query - /ibc/client/v1beta1/params: + /ibc/client/v1/params: get: summary: ClientParams queries all parameters of the ibc client. operationId: ClientParams @@ -32084,7 +31830,9 @@ paths: types. description: >- QueryClientParamsResponse is the response type for the - Query/ClientParams RPC method. + Query/ClientParams RPC + + method. default: description: An unexpected error response schema: @@ -32276,7 +32024,7 @@ paths: } tags: - Query - /ibc/core/client/v1beta1/client_states: + /ibc/core/client/v1/client_states: get: summary: ClientStates queries all the IBC light clients of a chain. operationId: ClientStates @@ -32748,9 +32496,17 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true indicates that, results to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean tags: - Query - '/ibc/core/client/v1beta1/client_states/{client_id}': + '/ibc/core/client/v1/client_states/{client_id}': get: summary: ClientState queries an IBC light client. operationId: ClientState @@ -32950,19 +32706,21 @@ paths: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height - while keeping RevisionNumber + while keeping - the same. However some consensus algorithms may choose to - reset the + RevisionNumber the same. However some consensus algorithms may + choose to - height in certain conditions e.g. hard forks, state-machine - breaking changes + reset the height in certain conditions e.g. hard forks, + state-machine - In these cases, the RevisionNumber is incremented so that - height continues to + breaking changes In these cases, the RevisionNumber is + incremented so that - be monitonically increasing even as the RevisionHeight gets - reset + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset description: >- QueryClientStateResponse is the response type for the Query/ClientState RPC @@ -33168,7 +32926,221 @@ paths: type: string tags: - Query - '/ibc/core/client/v1beta1/consensus_states/{client_id}': + '/ibc/core/client/v1/client_status/{client_id}': + get: + summary: Status queries the status of an IBC client. + operationId: ClientStatus + responses: + '200': + description: A successful response. + schema: + type: object + properties: + status: + type: string + description: >- + QueryClientStatusResponse is the response type for the + Query/ClientStatus RPC + + method. It returns the current status of the IBC client. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: client_id + description: client unique identifier + in: path + required: true + type: string + tags: + - Query + '/ibc/core/client/v1/consensus_states/{client_id}': get: summary: |- ConsensusStates queries all the consensus state associated with a given @@ -33199,18 +33171,20 @@ paths: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each - height while keeping RevisionNumber + height while keeping - the same. However some consensus algorithms may choose - to reset the + RevisionNumber the same. However some consensus + algorithms may choose to - height in certain conditions e.g. hard forks, - state-machine breaking changes + reset the height in certain conditions e.g. hard forks, + state-machine - In these cases, the RevisionNumber is incremented so - that height continues to + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as + the RevisionHeight - be monitonically increasing even as the RevisionHeight gets reset consensus_state: type: object @@ -33392,7 +33366,9 @@ paths: title: consensus state description: >- ConsensusStateWithHeight defines a consensus state with an - additional height field. + additional height + + field. title: consensus states associated with the identifier pagination: title: pagination response @@ -33667,9 +33643,17 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true indicates that, results to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean tags: - Query - '/ibc/core/client/v1beta1/consensus_states/{client_id}/revision/{revision_number}/height/{revision_height}': + '/ibc/core/client/v1/consensus_states/{client_id}/revision/{revision_number}/height/{revision_height}': get: summary: >- ConsensusState queries a consensus state associated with a client state @@ -33875,19 +33859,21 @@ paths: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height - while keeping RevisionNumber + while keeping - the same. However some consensus algorithms may choose to - reset the + RevisionNumber the same. However some consensus algorithms may + choose to - height in certain conditions e.g. hard forks, state-machine - breaking changes + reset the height in certain conditions e.g. hard forks, + state-machine - In these cases, the RevisionNumber is incremented so that - height continues to + breaking changes In these cases, the RevisionNumber is + incremented so that - be monitonically increasing even as the RevisionHeight gets - reset + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset title: >- QueryConsensusStateResponse is the response type for the Query/ConsensusState @@ -34112,411 +34098,191 @@ paths: format: boolean tags: - Query - '/ibc/core/connection/v1beta1/client_connections/{client_id}': + /ibc/core/client/v1/upgraded_client_states: get: - summary: |- - ClientConnections queries the connection paths associated with a client - state. - operationId: ClientConnections + summary: UpgradedClientState queries an Upgraded IBC light client. + operationId: UpgradedClientState responses: '200': description: A successful response. schema: type: object properties: - connection_paths: - type: array - items: - type: string - description: slice of all the connection paths associated with a client. - proof: - type: string - format: byte - title: merkle proof of existence - proof_height: - title: height at which the proof was generated + upgraded_client_state: type: object properties: - revision_number: - type: string - format: uint64 - title: the revision that the client is currently on - revision_height: + type_url: type: string - format: uint64 - title: the height within the given revision - description: >- - 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 - title: |- - QueryClientConnectionsResponse is the response type for the - Query/ClientConnections RPC method - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - protocol buffer message. This string must contain at - least + protocol buffer message. This string must contain at least - one "/" character. The last segment of the URL's path - must represent + one "/" character. The last segment of the URL's path must + represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in - a canonical form + `path/google.protobuf.Duration`). The name should be in a + canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary - all types that they + In practice, teams usually precompile into the binary all + types that they - expect it to use in the context of Any. However, for - URLs which use the + expect it to use in the context of Any. However, for URLs + which use the - scheme `http`, `https`, or no scheme, one can optionally - set up a type + scheme `http`, `https`, or no scheme, one can optionally + set up a type - server that maps type URLs to message definitions as - follows: + server that maps type URLs to message definitions as + follows: - * If no scheme is provided, `https` is assumed. + * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Note: this functionality is not currently available in - the official + Note: this functionality is not currently available in the + official - protobuf release, and it is not used for type URLs - beginning with + protobuf release, and it is not used for type URLs + beginning with - type.googleapis.com. + type.googleapis.com. - Schemes other than `http`, `https` (or the empty scheme) - might be + Schemes other than `http`, `https` (or the empty scheme) + might be - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a - URL that describes the type of the serialized message. + URL that describes the type of the serialized message. - Protobuf library provides support to pack/unpack Any values - in the form + Protobuf library provides support to pack/unpack Any values in + the form - of utility functions or additional generated methods of the - Any type. + of utility functions or additional generated methods of the + Any type. - Example 1: Pack and unpack a message in C++. + Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { ... - if (any.UnpackTo(&foo)) { - ... - } + } - Example 2: Pack and unpack a message in Java. + Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON + } - representation, that representation will be embedded adding - a field + The pack methods provided by protobuf library will by default + use - `value` which holds the custom JSON in addition to the - `@type` + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - field. Example (for message [google.protobuf.Duration][]): + methods only use the fully qualified type name after the last + '/' - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - parameters: - - name: client_id - description: client identifier associated with a connection - in: path - required: true - type: string - tags: - - Query - /ibc/core/connection/v1beta1/connections: - get: - summary: Connections queries all the IBC connections of a chain. - operationId: Connections - responses: - '200': - description: A successful response. - schema: - type: object - properties: - connections: - type: array - items: - type: object - properties: - id: - type: string - description: connection identifier. - client_id: - type: string - description: client associated with this connection. - versions: - type: array - items: - type: object - properties: - identifier: - type: string - title: unique version identifier - features: - type: array - items: - type: string - title: >- - list of features compatible with the specified - identifier - description: >- - Version defines the versioning scheme used to - negotiate the IBC verison in + in the type URL, for example "foo.bar.com/x/y.z" will yield + type - the connection handshake. - title: >- - IBC version which can be utilised to determine encodings - or protocols for + name "y.z". - channels or packets utilising this connection - state: - description: current state of the connection end. - type: string - enum: - - STATE_UNINITIALIZED_UNSPECIFIED - - STATE_INIT - - STATE_TRYOPEN - - STATE_OPEN - default: STATE_UNINITIALIZED_UNSPECIFIED - counterparty: - description: counterparty chain associated with this connection. - type: object - properties: - client_id: - type: string - description: >- - identifies the client on the counterparty chain - associated with a given - connection. - connection_id: - type: string - description: >- - identifies the connection end on the counterparty - chain associated with a - given connection. - prefix: - description: commitment merkle prefix of the counterparty chain. - type: object - properties: - key_prefix: - type: string - format: byte - title: >- - MerklePrefix is merkle path prefixed to the key. + JSON - The constructed key from the Path and the key will - be append(Path.KeyPath, + ==== - append(Path.KeyPrefix, key...)) - delay_period: - type: string - format: uint64 - description: delay period associated with this connection. - description: >- - IdentifiedConnection defines a connection with additional - connection + The JSON representation of an `Any` value uses the regular - identifier field. - description: list of stored connections of the chain. - pagination: - title: pagination response - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + representation of the deserialized, embedded message, with an - was set, its value is undefined otherwise - description: >- - PageResponse is to be embedded in gRPC response messages where - the + additional field `@type` which contains the type URL. Example: - corresponding request message has used PageRequest. + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - height: - title: query block height - type: object - properties: - revision_number: - type: string - format: uint64 - title: the revision that the client is currently on - revision_height: - type: string - format: uint64 - title: the height within the given revision - description: >- - Normally the RevisionHeight is incremented at each height - while keeping RevisionNumber + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - the same. However some consensus algorithms may choose to - reset the + If the embedded message type is well-known and has a custom + JSON - height in certain conditions e.g. hard forks, state-machine - breaking changes + representation, that representation will be embedded adding a + field - In these cases, the RevisionNumber is incremented so that - height continues to + `value` which holds the custom JSON in addition to the `@type` - be monitonically increasing even as the RevisionHeight gets - reset - description: >- - QueryConnectionsResponse is the response type for the - Query/Connections RPC + field. Example (for message [google.protobuf.Duration][]): - method. + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: client state associated with the request identifier + description: |- + QueryUpgradedClientStateResponse is the response type for the + Query/UpgradedClientState RPC method. default: description: An unexpected error response schema: @@ -34706,196 +34472,193 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - parameters: - - name: pagination.key - description: |- - 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. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - 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. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit - description: >- - 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. - in: query - required: false - type: string - format: uint64 - - name: pagination.count_total - description: >- - 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. - in: query - required: false - type: boolean - format: boolean tags: - Query - '/ibc/core/connection/v1beta1/connections/{connection_id}': + /ibc/core/client/v1/upgraded_consensus_states: get: - summary: Connection queries an IBC connection end. - operationId: Connection + summary: UpgradedConsensusState queries an Upgraded IBC consensus state. + operationId: IBCUpgradedConsensusState responses: '200': description: A successful response. schema: type: object properties: - connection: - title: connection associated with the request identifier + upgraded_consensus_state: type: object properties: - client_id: + type_url: type: string - description: client associated with this connection. - versions: - type: array - items: - type: object - properties: - identifier: - type: string - title: unique version identifier - features: - type: array - items: - type: string - title: >- - list of features compatible with the specified - identifier - description: >- - Version defines the versioning scheme used to negotiate - the IBC verison in - - the connection handshake. description: >- - IBC version which can be utilised to determine encodings - or protocols for + A URL/resource name that uniquely identifies the type of + the serialized - channels or packets utilising this connection. - state: - description: current state of the connection end. - type: string - enum: - - STATE_UNINITIALIZED_UNSPECIFIED - - STATE_INIT - - STATE_TRYOPEN - - STATE_OPEN - default: STATE_UNINITIALIZED_UNSPECIFIED - counterparty: - description: counterparty chain associated with this connection. - type: object - properties: - client_id: - type: string - description: >- - identifies the client on the counterparty chain - associated with a given + protocol buffer message. This string must contain at least - connection. - connection_id: - type: string - description: >- - identifies the connection end on the counterparty - chain associated with a + one "/" character. The last segment of the URL's path must + represent - given connection. - prefix: - description: commitment merkle prefix of the counterparty chain. - type: object - properties: - key_prefix: - type: string - format: byte - title: >- - MerklePrefix is merkle path prefixed to the key. + the fully qualified name of the type (as in - The constructed key from the Path and the key will be - append(Path.KeyPath, + `path/google.protobuf.Duration`). The name should be in a + canonical form - append(Path.KeyPrefix, key...)) - delay_period: - type: string - format: uint64 - description: >- - delay period that must pass before a consensus state can - be used for packet-verification + (e.g., leading "." is not accepted). - NOTE: delay period logic is only implemented by some - clients. - description: >- - ConnectionEnd defines a stateful object on a chain connected - to another - separate one. + In practice, teams usually precompile into the binary all + types that they - NOTE: there must only be 2 defined ConnectionEnds to establish + expect it to use in the context of Any. However, for URLs + which use the - a connection between two chains. - proof: - type: string - format: byte - title: merkle proof of existence - proof_height: - title: height at which the proof was retrieved - type: object - properties: - revision_number: - type: string - format: uint64 - title: the revision that the client is currently on - revision_height: + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: type: string - format: uint64 - title: the height within the given revision + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. description: >- - Normally the RevisionHeight is incremented at each height - while keeping RevisionNumber + `Any` contains an arbitrary serialized protocol buffer message + along with a - the same. However some consensus algorithms may choose to - reset the + URL that describes the type of the serialized message. - height in certain conditions e.g. hard forks, state-machine - breaking changes - In these cases, the RevisionNumber is incremented so that - height continues to + Protobuf library provides support to pack/unpack Any values in + the form - be monitonically increasing even as the RevisionHeight gets - reset - description: >- - QueryConnectionResponse is the response type for the - Query/Connection RPC + of utility functions or additional generated methods of the + Any type. - method. Besides the connection end, it includes a proof and the - height from - which the proof was retrieved. + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: Consensus state associated with the request identifier + description: |- + QueryUpgradedConsensusStateResponse is the response type for the + Query/UpgradedConsensusState RPC method. default: description: An unexpected error response schema: @@ -35085,220 +34848,31 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - parameters: - - name: connection_id - description: connection unique identifier - in: path - required: true - type: string tags: - Query - '/ibc/core/connection/v1beta1/connections/{connection_id}/client_state': + '/ibc/core/connection/v1/client_connections/{client_id}': get: summary: |- - ConnectionClientState queries the client state associated with the - connection. - operationId: ConnectionClientState + ClientConnections queries the connection paths associated with a client + state. + operationId: ClientConnections responses: '200': description: A successful response. schema: type: object properties: - identified_client_state: - title: client state associated with the channel - type: object - properties: - client_id: - type: string - title: client identifier - client_state: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type - of the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be - in a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can - optionally set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results - based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty - scheme) might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the - above specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any - values in the form - - of utility functions or additional generated methods of - the Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and - the unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will - yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a - custom JSON - - representation, that representation will be embedded - adding a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - title: client state - description: >- - IdentifiedClientState defines a client state with an - additional client - - identifier field. + connection_paths: + type: array + items: + type: string + description: slice of all the connection paths associated with a client. proof: type: string format: byte title: merkle proof of existence proof_height: - title: height at which the proof was retrieved + title: height at which the proof was generated type: object properties: revision_number: @@ -35311,22 +34885,24 @@ paths: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height - while keeping RevisionNumber + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to - the same. However some consensus algorithms may choose to - reset the + reset the height in certain conditions e.g. hard forks, + state-machine - height in certain conditions e.g. hard forks, state-machine - breaking changes + breaking changes In these cases, the RevisionNumber is + incremented so that - In these cases, the RevisionNumber is incremented so that - height continues to + height continues to be monitonically increasing even as the + RevisionHeight - be monitonically increasing even as the RevisionHeight gets - reset + gets reset title: |- - QueryConnectionClientStateResponse is the response type for the - Query/ConnectionClientState RPC method + QueryClientConnectionsResponse is the response type for the + Query/ClientConnections RPC method default: description: An unexpected error response schema: @@ -35517,206 +35093,140 @@ paths: "value": "1.212s" } parameters: - - name: connection_id - description: connection identifier + - name: client_id + description: client identifier associated with a connection in: path required: true type: string tags: - Query - '/ibc/core/connection/v1beta1/connections/{connection_id}/consensus_state/revision/{revision_number}/height/{revision_height}': + /ibc/core/connection/v1/connections: get: - summary: |- - ConnectionConsensusState queries the consensus state associated with the - connection. - operationId: ConnectionConsensusState + summary: Connections queries all the IBC connections of a chain. + operationId: Connections responses: '200': description: A successful response. schema: type: object properties: - consensus_state: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all - types that they - - expect it to use in the context of Any. However, for URLs - which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. + connections: + type: array + items: + type: object + properties: + id: + type: string + description: connection identifier. + client_id: + type: string + description: client associated with this connection. + versions: + type: array + items: + type: object + properties: + identifier: + type: string + title: unique version identifier + features: + type: array + items: + type: string + title: >- + list of features compatible with the specified + identifier + description: >- + Version defines the versioning scheme used to + negotiate the IBC verison in - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + the connection handshake. + title: >- + IBC version which can be utilised to determine encodings + or protocols for - Note: this functionality is not currently available in the - official + channels or packets utilising this connection + state: + description: current state of the connection end. + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + default: STATE_UNINITIALIZED_UNSPECIFIED + counterparty: + description: counterparty chain associated with this connection. + type: object + properties: + client_id: + type: string + description: >- + identifies the client on the counterparty chain + associated with a given - protobuf release, and it is not used for type URLs - beginning with + connection. + connection_id: + type: string + description: >- + identifies the connection end on the counterparty + chain associated with a - type.googleapis.com. + given connection. + prefix: + description: commitment merkle prefix of the counterparty chain. + type: object + properties: + key_prefix: + type: string + format: byte + title: >- + MerklePrefix is merkle path prefixed to the key. + The constructed key from the Path and the key will + be append(Path.KeyPath, - Schemes other than `http`, `https` (or the empty scheme) - might be + append(Path.KeyPrefix, key...)) + delay_period: + type: string + format: uint64 + description: delay period associated with this connection. + description: >- + IdentifiedConnection defines a connection with additional + connection - used with implementation specific semantics. - value: + identifier field. + description: list of stored connections of the chain. + pagination: + title: pagination response + type: object + properties: + next_key: type: string format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in - the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default - use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the last - '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with an - - additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding a - field + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - `value` which holds the custom JSON in addition to the `@type` + was set, its value is undefined otherwise + description: >- + PageResponse is to be embedded in gRPC response messages where + the - field. Example (for message [google.protobuf.Duration][]): + corresponding request message has used PageRequest. - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - title: consensus state associated with the channel - client_id: - type: string - title: client ID associated with the consensus state - proof: - type: string - format: byte - title: merkle proof of existence - proof_height: - title: height at which the proof was retrieved + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + height: + title: query block height type: object properties: revision_number: @@ -35729,22 +35239,26 @@ paths: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height - while keeping RevisionNumber + while keeping - the same. However some consensus algorithms may choose to - reset the + RevisionNumber the same. However some consensus algorithms may + choose to - height in certain conditions e.g. hard forks, state-machine - breaking changes + reset the height in certain conditions e.g. hard forks, + state-machine - In these cases, the RevisionNumber is incremented so that - height continues to + breaking changes In these cases, the RevisionNumber is + incremented so that - be monitonically increasing even as the RevisionHeight gets - reset - title: |- - QueryConnectionConsensusStateResponse is the response type for the - Query/ConnectionConsensusState RPC method + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + description: >- + QueryConnectionsResponse is the response type for the + Query/Connections RPC + + method. default: description: An unexpected error response schema: @@ -35934,100 +35448,6 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - parameters: - - name: connection_id - description: connection identifier - in: path - required: true - type: string - - name: revision_number - in: path - required: true - type: string - format: uint64 - - name: revision_height - in: path - required: true - type: string - format: uint64 - tags: - - Query - /ibc/applications/transfer/v1beta1/denom_traces: - get: - summary: DenomTraces queries all denomination traces. - operationId: DenomTraces - responses: - '200': - description: A successful response. - schema: - type: object - properties: - denom_traces: - type: array - items: - type: object - properties: - path: - type: string - description: >- - path defines the chain of port/channel identifiers used - for tracing the - - source of the fungible token. - base_denom: - type: string - description: base denomination of the relayed fungible token. - description: >- - DenomTrace contains the base denomination for ICS20 fungible - tokens and the - - source tracing information path. - description: denom_traces returns all denominations trace information. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: >- - QueryConnectionsResponse is the response type for the - Query/DenomTraces RPC - - method. - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - value: - type: string - format: byte parameters: - name: pagination.key description: |- @@ -36076,104 +35496,593 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true indicates that, results to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean tags: - Query - '/ibc/applications/transfer/v1beta1/denom_traces/{hash}': + '/ibc/core/connection/v1/connections/{connection_id}': get: - summary: DenomTrace queries a denomination trace information. - operationId: DenomTrace + summary: Connection queries an IBC connection end. + operationId: Connection responses: '200': description: A successful response. schema: type: object properties: - denom_trace: + connection: + title: connection associated with the request identifier type: object properties: - path: + client_id: type: string + description: client associated with this connection. + versions: + type: array + items: + type: object + properties: + identifier: + type: string + title: unique version identifier + features: + type: array + items: + type: string + title: >- + list of features compatible with the specified + identifier + description: >- + Version defines the versioning scheme used to negotiate + the IBC verison in + + the connection handshake. description: >- - path defines the chain of port/channel identifiers used - for tracing the + IBC version which can be utilised to determine encodings + or protocols for - source of the fungible token. - base_denom: + channels or packets utilising this connection. + state: + description: current state of the connection end. type: string - description: base denomination of the relayed fungible token. + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + default: STATE_UNINITIALIZED_UNSPECIFIED + counterparty: + description: counterparty chain associated with this connection. + type: object + properties: + client_id: + type: string + description: >- + identifies the client on the counterparty chain + associated with a given + + connection. + connection_id: + type: string + description: >- + identifies the connection end on the counterparty + chain associated with a + + given connection. + prefix: + description: commitment merkle prefix of the counterparty chain. + type: object + properties: + key_prefix: + type: string + format: byte + title: >- + 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...)) + delay_period: + type: string + format: uint64 + description: >- + 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. description: >- - DenomTrace contains the base denomination for ICS20 fungible - tokens and the + ConnectionEnd defines a stateful object on a chain connected + to another - source tracing information path. - description: >- - QueryDenomTraceResponse is the response type for the - Query/DenomTrace RPC + separate one. - method. - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: + NOTE: there must only be 2 defined ConnectionEnds to establish + + a connection between two chains. + proof: type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - value: - type: string - format: byte + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + 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 + description: >- + 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. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } parameters: - - name: hash - description: hash (in hex format) of the denomination trace information. + - name: connection_id + description: connection unique identifier in: path required: true type: string tags: - Query - /ibc/applications/transfer/v1beta1/params: + '/ibc/core/connection/v1/connections/{connection_id}/client_state': get: - summary: Params queries all parameters of the ibc-transfer module. - operationId: IBCTransferParams + summary: |- + ConnectionClientState queries the client state associated with the + connection. + operationId: ConnectionClientState responses: '200': description: A successful response. schema: type: object properties: - params: - description: params defines the parameters of the module. + identified_client_state: + title: client state associated with the channel type: object properties: - send_enabled: - type: boolean - format: boolean - description: >- - send_enabled enables or disables all cross-chain token - transfers from this + client_id: + type: string + title: client identifier + client_state: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type + of the serialized - chain. - receive_enabled: - type: boolean - format: boolean + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. description: >- - receive_enabled enables or disables all cross-chain token - transfers to this + `Any` contains an arbitrary serialized protocol buffer + message along with a - chain. - description: >- - QueryParamsResponse is the response type for the Query/Params RPC - method. + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: client state + description: >- + IdentifiedClientState defines a client state with an + additional client + + identifier field. + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + 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 + title: |- + QueryConnectionClientStateResponse is the response type for the + Query/ConnectionClientState RPC method default: description: An unexpected error response schema: @@ -36193,8381 +36102,4429 @@ paths: properties: type_url: type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. value: type: string format: byte - tags: - - Query -securityDefinitions: - kms: - type: basic -definitions: - CheckTxResult: - type: object - properties: - code: - type: integer - data: - type: string - gas_used: - type: integer - gas_wanted: - type: integer - info: - type: string - log: - type: string - tags: - type: array - items: - type: object - properties: - key: - type: string - value: - type: string - example: - code: 0 - data: data - log: log - gas_used: 5000 - gas_wanted: 10000 - info: info - tags: - - '' - - '' - DeliverTxResult: - type: object - properties: - code: - type: integer - data: - type: string - gas_used: - type: integer - gas_wanted: - type: integer - info: - type: string - log: - type: string - tags: - type: array - items: - type: object - properties: - key: - type: string - value: - type: string - example: - code: 5 - data: data - log: log - gas_used: 5000 - gas_wanted: 10000 - info: info - tags: - - '' - - '' - BroadcastTxCommitResult: - type: object - properties: - check_tx: - type: object - properties: - code: - type: integer - data: - type: string - gas_used: - type: integer - gas_wanted: - type: integer - info: - type: string - log: - type: string - tags: - type: array - items: - type: object - properties: - key: - type: string - value: - type: string - example: - code: 0 - data: data - log: log - gas_used: 5000 - gas_wanted: 10000 - info: info - tags: - - '' - - '' - deliver_tx: - type: object - properties: - code: - type: integer - data: - type: string - gas_used: - type: integer - gas_wanted: - type: integer - info: - type: string - log: - type: string - tags: - type: array - items: - type: object - properties: - key: - type: string - value: - type: string - example: - code: 5 - data: data - log: log - gas_used: 5000 - gas_wanted: 10000 - info: info - tags: - - '' - - '' - hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - height: - type: integer - KVPair: - type: object - properties: - key: - type: string - value: - type: string - Msg: - type: string - Address: - type: string - description: bech32 encoded address - example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv - ValidatorAddress: - type: string - description: bech32 encoded address - example: terravaloper1wg2mlrxdmnnkkykgqg4znky86nyrtc45q7a85l - Coin: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - DecCoin: - type: object - properties: - denom: - type: string - example: ukrw - amount: - type: string - example: '50.000' - Hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - TxQuery: - type: object - properties: - hash: - type: string - example: D085138D913993919295FF4B0A9107F1F2CDE0D37A87CE0644E217CBF3B49656 - height: - type: number - example: 368 - tx: - type: object - properties: - msg: - type: array - items: - type: string - fee: - type: object - properties: - gas: - type: string - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - memo: - type: string - signature: - type: object - properties: - signature: - type: string - example: >- - MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= - pub_key: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH - account_number: - type: string - example: '0' - sequence: - type: string - example: '0' - result: - type: object - properties: - log: - type: string - gas_wanted: - type: string - example: '200000' - gas_used: - type: string - example: '26354' - tags: - type: array - items: - type: object - properties: - key: - type: string - value: - type: string - PaginatedQueryTxs: - type: object - properties: - total_count: - type: number - example: 1 - count: - type: number - example: 1 - page_number: - type: number - example: 1 - page_total: - type: number - example: 1 - limit: - type: number - example: 30 - txs: - type: array - items: - type: object - properties: - hash: - type: string - example: D085138D913993919295FF4B0A9107F1F2CDE0D37A87CE0644E217CBF3B49656 - height: - type: number - example: 368 - tx: - type: object - properties: - msg: - type: array - items: - type: string - fee: - type: object - properties: - gas: - type: string - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - memo: - type: string - signature: - type: object - properties: - signature: - type: string - example: >- - MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= - pub_key: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH - account_number: - type: string - example: '0' - sequence: - type: string - example: '0' - result: - type: object - properties: - log: - type: string - gas_wanted: - type: string - example: '200000' - gas_used: - type: string - example: '26354' - tags: - type: array - items: - type: object - properties: - key: - type: string - value: - type: string - StdTx: - type: object - properties: - msg: - type: array - items: - type: string - fee: - type: object - properties: - gas: - type: string - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - memo: - type: string - signature: - type: object - properties: - signature: - type: string - example: >- - MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= - pub_key: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH - account_number: - type: string - example: '0' - sequence: - type: string - example: '0' - UnsignedStdTx: - type: object - properties: - msg: - type: array - items: - type: string - fee: - type: object - properties: - gas: - type: string - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - memo: - type: string - signatures: - type: string - example: null - BlockID: - type: object - properties: - hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - parts: - type: object - properties: - total: - type: number - example: 0 - hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - BlockHeader: - type: object - properties: - chain_id: - type: string - example: columbus-3 - height: - type: number - example: 1 - time: - type: string - example: '2017-12-30T05:53:09.287+01:00' - num_txs: - type: number - example: 0 - last_block_id: - type: object - properties: - hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - parts: - type: object - properties: - total: - type: number - example: 0 - hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - total_txs: - type: number - example: 35 - last_commit_hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - data_hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - validators_hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - next_validators_hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - consensus_hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - app_hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - last_results_hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - evidence_hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - proposer_address: - type: string - description: bech32 encoded address - example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv - version: - type: object - properties: - block: - type: string - example: 10 - app: - type: string - example: 0 - Block: - type: object - properties: - header: - type: object - properties: - chain_id: - type: string - example: columbus-3 - height: - type: number - example: 1 - time: - type: string - example: '2017-12-30T05:53:09.287+01:00' - num_txs: - type: number - example: 0 - last_block_id: - type: object - properties: - hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - parts: - type: object - properties: - total: - type: number - example: 0 - hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - total_txs: - type: number - example: 35 - last_commit_hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - data_hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - validators_hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - next_validators_hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - consensus_hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - app_hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - last_results_hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - evidence_hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - proposer_address: - type: string - description: bech32 encoded address - example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv - version: - type: object - properties: - block: - type: string - example: 10 - app: - type: string - example: 0 - txs: - type: array - items: - type: string - evidence: - type: array - items: - type: string - last_commit: - type: object - properties: - block_id: - type: object - properties: - hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - parts: - type: object - properties: - total: - type: number - example: 0 - hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - precommits: - type: array - items: - type: object - properties: - validator_address: - type: string - validator_index: - type: string - example: '0' - height: - type: string - example: '0' - round: - type: string - example: '0' - timestamp: - type: string - example: '2017-12-30T05:53:09.287+01:00' - type: - type: number - example: 2 - block_id: - type: object - properties: - hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - parts: - type: object - properties: - total: - type: number - example: 0 - hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - signature: - type: string - example: >- - 7uTC74QlknqYWEwg7Vn6M8Om7FuZ0EO4bjvuj6rwH1mTUJrRuMMZvAAqT9VjNgP0RA/TDp6u/92AqrZfXJSpBQ== - BlockQuery: - type: object - properties: - block_meta: - type: object - properties: - header: - type: object - properties: - chain_id: - type: string - example: columbus-3 - height: - type: number - example: 1 - time: - type: string - example: '2017-12-30T05:53:09.287+01:00' - num_txs: - type: number - example: 0 - last_block_id: - type: object - properties: - hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - parts: - type: object - properties: - total: - type: number - example: 0 - hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - total_txs: - type: number - example: 35 - last_commit_hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - data_hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - validators_hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - next_validators_hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - consensus_hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - app_hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - last_results_hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - evidence_hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - proposer_address: - type: string - description: bech32 encoded address - example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv - version: - type: object - properties: - block: - type: string - example: 10 - app: - type: string - example: 0 - block_id: - type: object - properties: - hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - parts: - type: object - properties: - total: - type: number - example: 0 - hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - block: - type: object - properties: - header: - type: object - properties: - chain_id: - type: string - example: columbus-3 - height: - type: number - example: 1 - time: - type: string - example: '2017-12-30T05:53:09.287+01:00' - num_txs: - type: number - example: 0 - last_block_id: - type: object - properties: - hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - parts: - type: object - properties: - total: - type: number - example: 0 - hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - total_txs: - type: number - example: 35 - last_commit_hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - data_hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - validators_hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - next_validators_hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - consensus_hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - app_hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - last_results_hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - evidence_hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - proposer_address: - type: string - description: bech32 encoded address - example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv - version: - type: object - properties: - block: - type: string - example: 10 - app: - type: string - example: 0 - txs: - type: array - items: - type: string - evidence: - type: array - items: - type: string - last_commit: - type: object - properties: - block_id: - type: object - properties: - hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - parts: - type: object - properties: - total: - type: number - example: 0 - hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - precommits: - type: array - items: - type: object - properties: - validator_address: - type: string - validator_index: - type: string - example: '0' - height: - type: string - example: '0' - round: - type: string - example: '0' - timestamp: - type: string - example: '2017-12-30T05:53:09.287+01:00' - type: - type: number - example: 2 - block_id: - type: object - properties: - hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - parts: - type: object - properties: - total: - type: number - example: 0 - hash: - type: string - example: EE5F3404034C524501629B56E0DDC38FAD651F04 - signature: - type: string - example: >- - 7uTC74QlknqYWEwg7Vn6M8Om7FuZ0EO4bjvuj6rwH1mTUJrRuMMZvAAqT9VjNgP0RA/TDp6u/92AqrZfXJSpBQ== - DelegationDelegatorReward: - type: object - properties: - validator_address: - type: string - description: bech32 encoded address - example: terravaloper1wg2mlrxdmnnkkykgqg4znky86nyrtc45q7a85l - reward: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - DelegatorTotalRewards: - type: object - properties: - rewards: - type: array - items: - type: object - properties: - validator_address: - type: string - description: bech32 encoded address - example: terravaloper1wg2mlrxdmnnkkykgqg4znky86nyrtc45q7a85l - reward: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - total: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - BaseReq: - type: object - properties: - from: - type: string - example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: "Sent via Terra Station \U0001F680" - chain_id: - type: string - example: columbus-3 - account_number: - type: string - example: '0' - sequence: - type: string - example: '1' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.2' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in conjunction with - generate_only) - TendermintValidator: - type: object - properties: - address: - type: string - description: bech32 encoded address - example: terravaloper1wg2mlrxdmnnkkykgqg4znky86nyrtc45q7a85l - pub_key: - type: string - example: >- - terravalconspub1zcjduepq7mft6gfls57a0a42d7uhx656cckhfvtrlmw744jv4q0mvlv0dypskehfk8 - voting_power: - type: string - example: '1000' - proposer_priority: - type: string - example: '1000' - TextProposal: - type: object - properties: - proposal_id: - type: integer - title: - type: string - description: - type: string - proposal_type: - type: string - proposal_status: - type: string - final_tally_result: - type: object - properties: - 'yes': - type: string - example: '0.0000000000' - abstain: - type: string - example: '0.0000000000' - 'no': - type: string - example: '0.0000000000' - no_with_veto: - type: string - example: '0.0000000000' - submit_time: - type: string - total_deposit: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - voting_start_time: - type: string - Proposer: - type: object - properties: - proposal_id: - type: string - proposer: - type: string - Deposit: - type: object - properties: - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - proposal_id: - type: string - depositor: - type: string - description: bech32 encoded address - example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv - TallyResult: - type: object - properties: - 'yes': - type: string - example: '0.0000000000' - abstain: - type: string - example: '0.0000000000' - 'no': - type: string - example: '0.0000000000' - no_with_veto: - type: string - example: '0.0000000000' - Vote: - type: object - properties: - voter: - type: string - proposal_id: - type: string - option: - type: string - Validator: - type: object - properties: - operator_address: - type: string - description: bech32 encoded address - example: terravaloper1wg2mlrxdmnnkkykgqg4znky86nyrtc45q7a85l - consensus_pubkey: - type: string - example: >- - terravalconspub1zcjduepq7mft6gfls57a0a42d7uhx656cckhfvtrlmw744jv4q0mvlv0dypskehfk8 - jailed: - type: boolean - status: - type: integer - tokens: - type: string - delegator_shares: - type: string - description: - type: object - properties: - moniker: - type: string - identity: - type: string - website: - type: string - details: - type: string - bond_height: - type: string - example: '0' - bond_intra_tx_counter: - type: integer - example: 0 - unbonding_height: - type: string - example: '0' - unbonding_time: - type: string - example: '1970-01-01T00:00:00Z' - commission: - type: object - properties: - rate: - type: string - example: '0' - max_rate: - type: string - example: '0' - max_change_rate: - type: string - example: '0' - update_time: - type: string - example: '1970-01-01T00:00:00Z' - Delegation: - type: object - properties: - delegator_address: - type: string - validator_address: - type: string - shares: - type: string - balance: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - UnbondingDelegation: - type: object - properties: - delegator_address: - type: string - validator_address: - type: string - entries: - type: array - items: - type: object - properties: - initial_balance: - type: string - balance: - type: string - creation_height: - type: string - completion_time: - type: string - UnbondingEntry: - type: object - properties: - initial_balance: - type: string - balance: - type: string - creation_height: - type: string - completion_time: - type: string - Redelegation: - type: object - properties: - delegator_address: - type: string - validator_src_address: - type: string - validator_dst_address: - type: string - entries: - type: array - items: - type: object - properties: - creation_height: - type: integer - completion_time: - type: integer - initial_balance: - type: string - balance: - type: string - shares_dst: - type: string - RedelegationEntry: - type: object - properties: - creation_height: - type: integer - completion_time: - type: integer - initial_balance: - type: string - balance: - type: string - shares_dst: - type: string - ValidatorDistInfo: - type: object - properties: - operator_address: - type: string - description: bech32 encoded address - example: terravaloper1wg2mlrxdmnnkkykgqg4znky86nyrtc45q7a85l - self_bond_rewards: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - val_commission: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - PublicKey: - type: object - properties: - type: - type: string - value: - type: string - SigningInfo: - type: object - properties: - address: - type: string - example: terravalcons1qsdpq864szmfk8nh82qcg7lyle6k95w07acdqn - start_height: - type: string - index_offset: - type: string - jailed_until: - type: string - tombstoned: - type: boolean - missed_blocks_counter: - type: string - ParamChange: - type: object - properties: - subspace: - type: string - example: staking - key: - type: string - example: MaxValidators - subkey: - type: string - example: '' - value: - type: object - Supply: - type: object - properties: - total: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - BaseAccount: - type: object - properties: - account_number: - type: string - address: - type: string - public_key: - type: string - sequence: - type: string - Account: - type: object - properties: - type: - type: string - example: auth/Account - value: - type: object - properties: - account_number: - type: string - address: - type: string - public_key: - type: string - sequence: - type: string - BaseVestingAccount: - type: object - properties: - BaseAccount: - type: object - properties: - account_number: - type: string - address: - type: string - public_key: - type: string - sequence: - type: string - original_vesting: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - delegated_free: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - delegated_vesting: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - end_time: - type: string - example: '0' - Schedule: - type: object - properties: - start_time: - type: string - example: '1556085600' - end_time: - type: string - example: '1556085600' - ratio: - type: string - example: '0.100000000000000000' - VestingSchedule: - type: object - properties: - denom: - type: string - example: usdr - lazy_schedules: - type: array - items: - type: object - properties: - start_time: - type: string - example: '1556085600' - end_time: - type: string - example: '1556085600' - ratio: - type: string - example: '0.100000000000000000' - BaseLazyGradedVestingAccount: - type: object - properties: - BaseVestingAccount: - type: object - properties: - BaseAccount: - type: object - properties: - account_number: - type: string - address: - type: string - public_key: - type: string - sequence: - type: string - original_vesting: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - delegated_free: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - delegated_vesting: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - end_time: - type: string - example: '0' - vesting_schedules: - type: array - items: - type: object - properties: - denom: - type: string - example: usdr - lazy_schedules: - type: array - items: - type: object - properties: - start_time: - type: string - example: '1556085600' - end_time: - type: string - example: '1556085600' - ratio: - type: string - example: '0.100000000000000000' - LazyGradedVestingAccount: - type: object - properties: - type: - type: string - example: core/LazyGradedVestingAccount - value: - type: object - properties: - BaseVestingAccount: - type: object - properties: - BaseAccount: - type: object - properties: - account_number: - type: string - address: - type: string - public_key: - type: string - sequence: - type: string - original_vesting: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - delegated_free: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - delegated_vesting: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - end_time: - type: string - example: '0' - vesting_schedules: - type: array - items: - type: object - properties: - denom: - type: string - example: usdr - lazy_schedules: - type: array - items: - type: object - properties: - start_time: - type: string - example: '1556085600' - end_time: - type: string - example: '1556085600' - ratio: - type: string - example: '0.100000000000000000' - SwapReq: - type: object - required: - - base_req - - offer_coin - - ask_denom - properties: - base_req: - type: object - properties: - from: - type: string - example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: "Sent via Terra Station \U0001F680" - chain_id: - type: string - example: columbus-3 - account_number: - type: string - example: '0' - sequence: - type: string - example: '1' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.2' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in conjunction with - generate_only) - offer_coin: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - ask_denom: - type: string - example: uluna - receiver: - type: string - description: the `receiver` field can be skipped when the receiver is trader - example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv - MarketParams: - type: object - properties: - mint_base_pool: - type: number - example: '1000000.0' - burn_base_pool: - type: number - example: '1000000.0' - pool_recovery_period: - type: number - example: '16000' - min_stability_spread: - type: number - example: '0.02' - PrevoteReq: - type: object - properties: - base_req: - type: object - properties: - from: - type: string - example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: "Sent via Terra Station \U0001F680" - chain_id: - type: string - example: columbus-3 - account_number: - type: string - example: '0' - sequence: - type: string - example: '1' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.2' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in conjunction with - generate_only) - exchange_rate: - type: number - example: '1000.0' - description: >- - exchange rate of Luna in denom currency is to make prevote hash; this - field is required to submit prevote in case absence of hash - salt: - type: string - example: abcd - description: >- - salt is to make prevote hash; this field is required to submit prevote - in case absence of hash - hash: - type: string - example: 061bf1e27dfff121f40c826e593c8a28ec299a02 - description: hex string; hash of next vote; empty == skip prevote - validator: - type: string - description: bech32 encoded address - example: terravaloper1wg2mlrxdmnnkkykgqg4znky86nyrtc45q7a85l - VoteReq: - type: object - properties: - base_req: - type: object - properties: - from: - type: string - example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: "Sent via Terra Station \U0001F680" - chain_id: - type: string - example: columbus-3 - account_number: - type: string - example: '0' - sequence: - type: string - example: '1' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.2' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in conjunction with - generate_only) - exchange_rate: - type: number - example: '1000.0' - description: >- - proof exchange rate of Luna in denom currency was used to make prevote - hash; initial prevote does not require this field - salt: - type: string - example: abcd - description: >- - proof salt was used to make prevote hash; initial prevote does not - require this field - validator: - type: string - description: bech32 encoded address - example: terravaloper1wg2mlrxdmnnkkykgqg4znky86nyrtc45q7a85l - AggregatePrevoteReq: - type: object - properties: - base_req: - type: object - properties: - from: - type: string - example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: "Sent via Terra Station \U0001F680" - chain_id: - type: string - example: columbus-3 - account_number: - type: string - example: '0' - sequence: - type: string - example: '1' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.2' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in conjunction with - generate_only) - exchange_rates: - type: string - example: '1000.0ukrw,1.2uusd,0.99usdr' - description: >- - exchange rates of Luna in denom currencies are to make aggregate - prevote hash; this field is required to submit prevote in case absence - of hash - salt: - type: string - example: abcd - description: >- - salt is to make prevote hash; this field is required to submit prevote - in case absence of hash - hash: - type: string - example: 061bf1e27dfff121f40c826e593c8a28ec299a02 - description: hex string; hash of next vote; empty == skip prevote - AggregateVoteReq: - type: object - properties: - base_req: - type: object - properties: - from: - type: string - example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: "Sent via Terra Station \U0001F680" - chain_id: - type: string - example: columbus-3 - account_number: - type: string - example: '0' - sequence: - type: string - example: '1' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.2' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in conjunction with - generate_only) - exchange_rates: - type: string - example: '1000.0ukrw,1.2uusd,0.99usdr' - description: >- - proof exchange rates of Luna in denom currency were used to make - aggregate prevote hash - salt: - type: string - example: abcd - description: >- - proof salt was used to make prevote hash; initial prevote does not - require this field - DelegateReq: - type: object - properties: - base_req: - type: object - properties: - from: - type: string - example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: "Sent via Terra Station \U0001F680" - chain_id: - type: string - example: columbus-3 - account_number: - type: string - example: '0' - sequence: - type: string - example: '1' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.2' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in conjunction with - generate_only) - feeder: - type: string - description: bech32 encoded address - example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv - ExchangeRateVote: - type: object - properties: - exchange_rate: - type: number - example: '0.01241' - denom: - type: string - example: ukrw - voter: - type: string - description: bech32 encoded address - example: terravaloper1wg2mlrxdmnnkkykgqg4znky86nyrtc45q7a85l - ExchangeRatePrevote: - type: object - properties: - hash: - type: string - example: 061bf1e27dfff121f40c826e593c8a28ec299a02 - denom: - type: string - example: uusd - voter: - type: string - description: bech32 encoded address - example: terravaloper1wg2mlrxdmnnkkykgqg4znky86nyrtc45q7a85l - submit_block: - type: number - example: '1' - AggregateExchangeRatePrevote: - type: object - properties: - hash: - type: string - example: 061bf1e27dfff121f40c826e593c8a28ec299a02 - voter: - type: string - description: bech32 encoded address - example: terravaloper1wg2mlrxdmnnkkykgqg4znky86nyrtc45q7a85l - submit_block: - type: number - example: '1' - AggregateExchangeRateVote: - type: object - properties: - exchange_rates: - type: array - items: - type: object - properties: - denom: - type: string - example: ukrw - amount: - type: string - example: '50.000' - voter: - type: string - description: bech32 encoded address - example: terravaloper1wg2mlrxdmnnkkykgqg4znky86nyrtc45q7a85l - OracleParams: - type: object - properties: - vote_period: - type: number - example: '900' - vote_threshold: - type: number - example: '0.67' - drop_threshold: - type: number - example: '10' - oracle_reward_band: - type: number - example: '0.02' - PolicyConstraints: - type: object - properties: - rate_min: - type: number - format: float - example: '0.0005' - description: 0.05% - rate_max: - type: number - format: float - example: '0.01' - description: 1% - cap: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - change_max: - type: number - format: float - example: '0.00025' - description: 0.025% - TreasuryParams: - type: object - properties: - tax_policy: - type: object - properties: - rate_min: - type: number - format: float - example: '0.0005' - description: 0.05% - rate_max: - type: number - format: float - example: '0.01' - description: 1% - cap: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - change_max: - type: number - format: float - example: '0.00025' - description: 0.025% - reward_policy: - type: object - properties: - rate_min: - type: number - format: float - example: '0.0005' - description: 0.05% - rate_max: - type: number - format: float - example: '0.01' - description: 1% - cap: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - change_max: - type: number - format: float - example: '0.00025' - description: 0.025% - seigniorage_burden_target: - type: number - format: float - example: '0.67' - description: 67% - mining_increment: - type: number - format: float - example: '1.07' - window_short: - type: integer - example: '4' - window_long: - type: integer - example: '52' - window_probation: - type: integer - example: '12' - WasmParams: - type: object - properties: - max_contract_size: - type: number - format: integer - example: '1000000' - description: allowed max contract bytes size - max_contract_gas: - type: number - format: integer - example: '1000000' - description: allowed max gas usages per each contract execution - max_contract_msg_size: - type: number - format: integer - example: '1000000' - description: allowed max contract exe msg bytes size - max_contract_data_size: - type: number - format: integer - example: '100' - description: allowed max contract return data size - event_params: - type: object - properties: - max_attribute_num: - type: string - example: '128' - description: 'allowed max # of contract attribute num' - max_attribute_key_length: - type: string - example: '128' - description: allowed max length of a contract event attribute key - max_attribute_value_length: - type: string - example: '128' - description: allowed max length of a contract event attribute value - MultiSignPubKey: - type: object - properties: - threshold: - type: number - example: 1 - pubkeys: - type: array - items: - type: string - example: >- - terrapub1addwnpepq2l6pwj8h9fwxdjuge7lazu0sszpkck0nlhjag6q9drffrd93atywdt8ksu - MultiSignReq: - type: object - properties: - tx: - type: object - properties: - msg: - type: array - items: - type: string - fee: - type: object - properties: - gas: - type: string - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - memo: - type: string - signatures: - type: string - example: null - chain_id: - type: string - example: columbus-3 - signatures: - type: array - items: - type: object - properties: - signature: - type: string - example: >- - MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= - pub_key: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH - signature_only: - type: boolean - pubkey: - type: object - properties: - threshold: - type: number - example: 1 - pubkeys: - type: array - items: - type: string - example: >- - terrapub1addwnpepq2l6pwj8h9fwxdjuge7lazu0sszpkck0nlhjag6q9drffrd93atywdt8ksu - StdSignature: - type: object - properties: - signature: - type: string - example: >- - MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= - pub_key: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH - EstimateFeeResp: - type: object - properties: - fee: - type: object - properties: - gas: - type: string - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - CodeInfo: - type: object - properties: - code_hash: - type: string - creator: - type: string - ContractInfo: - type: object - properties: - code_id: - type: string - address: - type: string - description: bech32 encoded address - example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv - creator: - type: string - description: bech32 encoded address - example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv - admin: - type: string - description: bech32 encoded address - example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv - init_msg: - type: string - StoreCodeReq: - type: object - properties: - base_req: - type: object - properties: - from: - type: string - example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: "Sent via Terra Station \U0001F680" - chain_id: - type: string - example: columbus-3 - account_number: - type: string - example: '0' - sequence: - type: string - example: '1' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.2' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in conjunction with - generate_only) - wasm_bytes: - type: string - example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH - MigrateCodeReq: - type: object - properties: - base_req: - type: object - properties: - from: - type: string - example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: "Sent via Terra Station \U0001F680" - chain_id: - type: string - example: columbus-3 - account_number: - type: string - example: '0' - sequence: - type: string - example: '1' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.2' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in conjunction with - generate_only) - wasm_bytes: - type: string - example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH - InstantiateContractReq: - type: object - properties: - base_req: - type: object - properties: - from: - type: string - example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: "Sent via Terra Station \U0001F680" - chain_id: - type: string - example: columbus-3 - account_number: - type: string - example: '0' - sequence: - type: string - example: '1' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.2' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in conjunction with - generate_only) - init_coins: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - init_msg: - type: string - description: json formatted string - example: '{}' - admin: - type: string - description: bech32 encoded address - example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv - ExecuteContractReq: - type: object - properties: - base_req: - type: object - properties: - from: - type: string - example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: "Sent via Terra Station \U0001F680" - chain_id: - type: string - example: columbus-3 - account_number: - type: string - example: '0' - sequence: - type: string - example: '1' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.2' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in conjunction with - generate_only) - coins: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - exec_msg: - type: string - example: '{}' - MigrateContractReq: - type: object - properties: - base_req: - type: object - properties: - from: - type: string - example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: "Sent via Terra Station \U0001F680" - chain_id: - type: string - example: columbus-3 - account_number: - type: string - example: '0' - sequence: - type: string - example: '1' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.2' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in conjunction with - generate_only) - new_code_id: - type: number - format: integer - example: 10 - migrate_msg: - type: string - example: '{}' - UpdateContractAdminReq: - type: object - properties: - base_req: - type: object - properties: - from: - type: string - example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: "Sent via Terra Station \U0001F680" - chain_id: - type: string - example: columbus-3 - account_number: - type: string - example: '0' - sequence: - type: string - example: '1' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.2' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in conjunction with - generate_only) - new_admin: - type: string - description: bech32 encoded address - example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv - ClearContractAdminReq: - type: object - properties: - base_req: - type: object - properties: - from: - type: string - example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: "Sent via Terra Station \U0001F680" - chain_id: - type: string - example: columbus-3 - account_number: - type: string - example: '0' - sequence: - type: string - example: '1' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.2' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in conjunction with - generate_only) - GenericAuthorization: - type: object - properties: - type: - type: string - example: msgauth/GenericAuthorization - value: - type: object - properties: - msg_type: - type: string - example: send - SendAuthorization: - type: object - properties: - type: - type: string - example: msgauth/SendAuthorization - value: - type: object - properties: - spend_limit: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - GenericGrantInfo: - type: object - properties: - authorization: - type: object - properties: - type: - type: string - example: msgauth/GenericAuthorization - value: - type: object - properties: - msg_type: - type: string - example: send - expiration: - type: string - example: '2021-06-24T09:33:20.012999Z' - SendGrantInfo: - type: object - properties: - authorization: - type: object - properties: - type: - type: string - example: msgauth/SendAuthorization - value: - type: object - properties: - spend_limit: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - expiration: - type: string - example: '2021-06-24T09:33:20.012999Z' - GrantReq: - type: object - required: - - base_req - - period - properties: - base_req: - type: object - properties: - from: - type: string - example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: "Sent via Terra Station \U0001F680" - chain_id: - type: string - example: columbus-3 - account_number: - type: string - example: '0' - sequence: - type: string - example: '1' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.2' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in conjunction with - generate_only) - period: - type: string - description: nano second of time duration - example: '3600000000000' - limit: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - description: required when grant MsgType == send - RevokeGrantReq: - type: object - required: - - base_req - properties: - base_req: - type: object - properties: - from: - type: string - example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: "Sent via Terra Station \U0001F680" - chain_id: - type: string - example: columbus-3 - account_number: - type: string - example: '0' - sequence: - type: string - example: '1' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.2' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in conjunction with - generate_only) - ExecuteGrantReq: - type: object - required: - - base_req - - msgs - properties: - base_req: - type: object - properties: - from: - type: string - example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: "Sent via Terra Station \U0001F680" - chain_id: - type: string - example: columbus-3 - account_number: - type: string - example: '0' - sequence: - type: string - example: '1' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.2' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: uluna - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in conjunction with - generate_only) - msgs: - type: array - items: - type: string - TaxCap: - type: object - properties: - denom: - type: string - example: uluna - tax_cap: - type: string - example: '50' - cosmos.auth.v1beta1.Params: - type: object - properties: - max_memo_characters: - type: string - format: uint64 - tx_sig_limit: - type: string - format: uint64 - tx_size_cost_per_byte: - type: string - format: uint64 - sig_verify_cost_ed25519: - type: string - format: uint64 - sig_verify_cost_secp256k1: - type: string - format: uint64 - description: Params defines the parameters for the auth module. - cosmos.auth.v1beta1.QueryAccountResponse: - type: object - properties: - account: - description: account defines the account of the corresponding address. - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all types - that they - - expect it to use in the context of Any. However, for URLs which - use the - - scheme `http`, `https`, or no scheme, one can optionally set up a - type - - server that maps type URLs to message definitions as follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning with - - type.googleapis.com. + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + URL that describes the type of the serialized message. - Schemes other than `http`, `https` (or the empty scheme) might be - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above specified - type. - description: >- - QueryAccountResponse is the response type for the Query/Account RPC - method. - cosmos.auth.v1beta1.QueryParamsResponse: - type: object - properties: - params: - description: params defines the parameters of the module. - type: object - properties: - max_memo_characters: - type: string - format: uint64 - tx_sig_limit: - type: string - format: uint64 - tx_size_cost_per_byte: - type: string - format: uint64 - sig_verify_cost_ed25519: - type: string - format: uint64 - sig_verify_cost_secp256k1: - type: string - format: uint64 - description: QueryParamsResponse is the response type for the Query/Params RPC method. - google.protobuf.Any: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + Protobuf library provides support to pack/unpack Any values + in the form - protocol buffer message. This string must contain at least + of utility functions or additional generated methods of the + Any type. - one "/" character. The last segment of the URL's path must represent - the fully qualified name of the type (as in + Example 1: Pack and unpack a message in C++. - `path/google.protobuf.Duration`). The name should be in a canonical - form + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - (e.g., leading "." is not accepted). + Example 2: Pack and unpack a message in Java. + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - In practice, teams usually precompile into the binary all types that - they + Example 3: Pack and unpack a message in Python. - expect it to use in the context of Any. However, for URLs which use - the + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - scheme `http`, `https`, or no scheme, one can optionally set up a type + Example 4: Pack and unpack a message in Go - server that maps type URLs to message definitions as follows: + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + The pack methods provided by protobuf library will by + default use - * If no scheme is provided, `https` is assumed. + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + methods only use the fully qualified type name after the + last '/' - Note: this functionality is not currently available in the official + in the type URL, for example "foo.bar.com/x/y.z" will yield + type - protobuf release, and it is not used for type URLs beginning with + name "y.z". - type.googleapis.com. - Schemes other than `http`, `https` (or the empty scheme) might be + JSON - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above specified - type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message along with - a + ==== - URL that describes the type of the serialized message. + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with + an - Protobuf library provides support to pack/unpack Any values in the form + additional field `@type` which contains the type URL. + Example: - of utility functions or additional generated methods of the Any type. + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - Example 1: Pack and unpack a message in C++. + If the embedded message type is well-known and has a custom + JSON - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + representation, that representation will be embedded adding + a field - Example 2: Pack and unpack a message in Java. + `value` which holds the custom JSON in addition to the + `@type` - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + field. Example (for message [google.protobuf.Duration][]): - Example 3: Pack and unpack a message in Python. + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: connection_id + description: connection identifier + in: path + required: true + type: string + tags: + - Query + '/ibc/core/connection/v1/connections/{connection_id}/consensus_state/revision/{revision_number}/height/{revision_height}': + get: + summary: |- + ConnectionConsensusState queries the consensus state associated with the + connection. + operationId: ConnectionConsensusState + responses: + '200': + description: A successful response. + schema: + type: object + properties: + consensus_state: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + protocol buffer message. This string must contain at least - Example 4: Pack and unpack a message in Go + one "/" character. The last segment of the URL's path must + represent - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } + the fully qualified name of the type (as in - The pack methods provided by protobuf library will by default use + `path/google.protobuf.Duration`). The name should be in a + canonical form - 'type.googleapis.com/full.type.name' as the type URL and the unpack + (e.g., leading "." is not accepted). - methods only use the fully qualified type name after the last '/' - in the type URL, for example "foo.bar.com/x/y.z" will yield type + In practice, teams usually precompile into the binary all + types that they - name "y.z". + expect it to use in the context of Any. However, for URLs + which use the + scheme `http`, `https`, or no scheme, one can optionally + set up a type + server that maps type URLs to message definitions as + follows: - JSON - ==== + * If no scheme is provided, `https` is assumed. - The JSON representation of an `Any` value uses the regular + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - representation of the deserialized, embedded message, with an + Note: this functionality is not currently available in the + official - additional field `@type` which contains the type URL. Example: + protobuf release, and it is not used for type URLs + beginning with - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + type.googleapis.com. - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - If the embedded message type is well-known and has a custom JSON + Schemes other than `http`, `https` (or the empty scheme) + might be - representation, that representation will be embedded adding a field + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a - `value` which holds the custom JSON in addition to the `@type` + URL that describes the type of the serialized message. - field. Example (for message [google.protobuf.Duration][]): - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - grpc.gateway.runtime.Error: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + Protobuf library provides support to pack/unpack Any values in + the form - protocol buffer message. This string must contain at least + of utility functions or additional generated methods of the + Any type. - one "/" character. The last segment of the URL's path must - represent - the fully qualified name of the type (as in + Example 1: Pack and unpack a message in C++. - `path/google.protobuf.Duration`). The name should be in a - canonical form + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - (e.g., leading "." is not accepted). + Example 2: Pack and unpack a message in Java. + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - In practice, teams usually precompile into the binary all types - that they + Example 3: Pack and unpack a message in Python. - expect it to use in the context of Any. However, for URLs which - use the + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - scheme `http`, `https`, or no scheme, one can optionally set up - a type + Example 4: Pack and unpack a message in Go - server that maps type URLs to message definitions as follows: + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + The pack methods provided by protobuf library will by default + use - * If no scheme is provided, `https` is assumed. + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + methods only use the fully qualified type name after the last + '/' - Note: this functionality is not currently available in the - official + in the type URL, for example "foo.bar.com/x/y.z" will yield + type - protobuf release, and it is not used for type URLs beginning - with + name "y.z". - type.googleapis.com. - Schemes other than `http`, `https` (or the empty scheme) might - be + JSON - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a + ==== - URL that describes the type of the serialized message. + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an - Protobuf library provides support to pack/unpack Any values in the - form + additional field `@type` which contains the type URL. Example: - of utility functions or additional generated methods of the Any - type. + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - Example 1: Pack and unpack a message in C++. + If the embedded message type is well-known and has a custom + JSON - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + representation, that representation will be embedded adding a + field - Example 2: Pack and unpack a message in Java. + `value` which holds the custom JSON in addition to the `@type` - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + field. Example (for message [google.protobuf.Duration][]): - Example 3: Pack and unpack a message in Python. + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: consensus state associated with the channel + client_id: + type: string + title: client ID associated with the consensus state + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + RevisionNumber the same. However some consensus algorithms may + choose to - Example 4: Pack and unpack a message in Go + reset the height in certain conditions e.g. hard forks, + state-machine - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } + breaking changes In these cases, the RevisionNumber is + incremented so that - The pack methods provided by protobuf library will by default use + height continues to be monitonically increasing even as the + RevisionHeight - 'type.googleapis.com/full.type.name' as the type URL and the unpack + gets reset + title: |- + QueryConnectionConsensusStateResponse is the response type for the + Query/ConnectionConsensusState RPC method + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - methods only use the fully qualified type name after the last '/' + protocol buffer message. This string must contain at + least - in the type URL, for example "foo.bar.com/x/y.z" will yield type + one "/" character. The last segment of the URL's path + must represent - name "y.z". + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in + a canonical form + (e.g., leading "." is not accepted). - JSON - ==== + In practice, teams usually precompile into the binary + all types that they - The JSON representation of an `Any` value uses the regular + expect it to use in the context of Any. However, for + URLs which use the - representation of the deserialized, embedded message, with an + scheme `http`, `https`, or no scheme, one can optionally + set up a type - additional field `@type` which contains the type URL. Example: + server that maps type URLs to message definitions as + follows: - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + * If no scheme is provided, `https` is assumed. - If the embedded message type is well-known and has a custom JSON + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - representation, that representation will be embedded adding a field + Note: this functionality is not currently available in + the official - `value` which holds the custom JSON in addition to the `@type` + protobuf release, and it is not used for type URLs + beginning with - field. Example (for message [google.protobuf.Duration][]): + type.googleapis.com. - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - cosmos.bank.v1beta1.DenomUnit: - type: object - properties: - denom: - type: string - description: denom represents the string name of the given denom unit (e.g uatom). - exponent: - type: integer - format: int64 - description: >- - exponent represents power of 10 exponent that one must - raise the base_denom to in order to equal the given DenomUnit's denom + Schemes other than `http`, `https` (or the empty scheme) + might be - 1 denom = 1^exponent base_denom + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a - (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' - with + URL that describes the type of the serialized message. - exponent = 6, thus: 1 atom = 10^6 uatom). - aliases: - type: array - items: - type: string - title: aliases is a list of string aliases for the given denom - description: |- - DenomUnit represents a struct that describes a given - denomination unit of the basic token. - cosmos.bank.v1beta1.Metadata: - type: object - properties: - description: - type: string - denom_units: - type: array - items: - type: object - properties: - denom: - type: string - description: >- - denom represents the string name of the given denom unit (e.g - uatom). - exponent: - type: integer - format: int64 - description: >- - exponent represents power of 10 exponent that one must - raise the base_denom to in order to equal the given DenomUnit's - denom + Protobuf library provides support to pack/unpack Any values + in the form - 1 denom = 1^exponent base_denom + of utility functions or additional generated methods of the + Any type. - (e.g. with a base_denom of uatom, one can create a DenomUnit of - 'atom' with - exponent = 6, thus: 1 atom = 10^6 uatom). - aliases: - type: array - items: - type: string - title: aliases is a list of string aliases for the given denom - description: |- - DenomUnit represents a struct that describes a given - denomination unit of the basic token. - title: denom_units represents the list of DenomUnit's for a given coin - base: - type: string - description: >- - base represents the base denom (should be the DenomUnit with exponent - = 0). - display: - type: string - description: |- - display indicates the suggested denom that should be - displayed in clients. - description: |- - Metadata represents a struct that describes - a basic token. - cosmos.bank.v1beta1.Params: - type: object - properties: - send_enabled: - type: array - items: - type: object - properties: - denom: - type: string - enabled: - type: boolean - format: boolean - description: >- - SendEnabled maps coin denom to a send_enabled status (whether a - denom is + Example 1: Pack and unpack a message in C++. - sendable). - default_send_enabled: - type: boolean - format: boolean - description: Params defines the parameters for the bank module. - cosmos.bank.v1beta1.QueryAllBalancesResponse: - type: object - properties: - balances: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - description: balances is the balances of all the coins. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + Example 2: Pack and unpack a message in Java. - was set, its value is undefined otherwise - description: >- - QueryAllBalancesResponse is the response type for the Query/AllBalances - RPC + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - method. - cosmos.bank.v1beta1.QueryBalanceResponse: - type: object - properties: - balance: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. + Example 3: Pack and unpack a message in Python. - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - description: >- - QueryBalanceResponse is the response type for the Query/Balance RPC - method. - cosmos.bank.v1beta1.QueryDenomMetadataResponse: - type: object - properties: - metadata: - type: object - properties: - description: - type: string - denom_units: - type: array - items: - type: object - properties: - denom: - type: string - description: >- - denom represents the string name of the given denom unit - (e.g uatom). - exponent: - type: integer - format: int64 - description: >- - exponent represents power of 10 exponent that one must + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - raise the base_denom to in order to equal the given - DenomUnit's denom + Example 4: Pack and unpack a message in Go - 1 denom = 1^exponent base_denom + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } - (e.g. with a base_denom of uatom, one can create a DenomUnit - of 'atom' with + The pack methods provided by protobuf library will by + default use - exponent = 6, thus: 1 atom = 10^6 uatom). - aliases: - type: array - items: - type: string - title: aliases is a list of string aliases for the given denom - description: |- - DenomUnit represents a struct that describes a given - denomination unit of the basic token. - title: denom_units represents the list of DenomUnit's for a given coin - base: - type: string - description: >- - base represents the base denom (should be the DenomUnit with - exponent = 0). - display: - type: string - description: |- - display indicates the suggested denom that should be - displayed in clients. - description: |- - Metadata represents a struct that describes - a basic token. - description: >- - QueryDenomMetadataResponse is the response type for the - Query/DenomMetadata RPC + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - method. - cosmos.bank.v1beta1.QueryDenomsMetadataResponse: - type: object - properties: - metadatas: - type: array - items: - type: object - properties: - description: - type: string - denom_units: - type: array - items: - type: object - properties: - denom: - type: string - description: >- - denom represents the string name of the given denom unit - (e.g uatom). - exponent: - type: integer - format: int64 - description: >- - exponent represents power of 10 exponent that one must + methods only use the fully qualified type name after the + last '/' - raise the base_denom to in order to equal the given - DenomUnit's denom + in the type URL, for example "foo.bar.com/x/y.z" will yield + type - 1 denom = 1^exponent base_denom + name "y.z". - (e.g. with a base_denom of uatom, one can create a - DenomUnit of 'atom' with - exponent = 6, thus: 1 atom = 10^6 uatom). - aliases: - type: array - items: - type: string - title: aliases is a list of string aliases for the given denom - description: |- - DenomUnit represents a struct that describes a given - denomination unit of the basic token. - title: denom_units represents the list of DenomUnit's for a given coin - base: - type: string - description: >- - base represents the base denom (should be the DenomUnit with - exponent = 0). - display: - type: string - description: |- - display indicates the suggested denom that should be - displayed in clients. - description: |- - Metadata represents a struct that describes - a basic token. - description: >- - metadata provides the client information for all the registered - tokens. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - was set, its value is undefined otherwise - description: >- - QueryDenomsMetadataResponse is the response type for the - Query/DenomsMetadata RPC + JSON - method. - cosmos.bank.v1beta1.QueryParamsResponse: - type: object - properties: - params: - type: object - properties: - send_enabled: - type: array - items: - type: object - properties: - denom: - type: string - enabled: - type: boolean - format: boolean - description: >- - SendEnabled maps coin denom to a send_enabled status (whether a - denom is + ==== - sendable). - default_send_enabled: - type: boolean - format: boolean - description: Params defines the parameters for the bank module. - description: >- - QueryParamsResponse defines the response type for querying x/bank - parameters. - cosmos.bank.v1beta1.QuerySupplyOfResponse: - type: object - properties: - amount: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. + The JSON representation of an `Any` value uses the regular - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - description: >- - QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC - method. - cosmos.bank.v1beta1.QueryTotalSupplyResponse: - type: object - properties: - supply: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. + representation of the deserialized, embedded message, with + an - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - title: supply is the supply of the coins - title: >- - QueryTotalSupplyResponse is the response type for the Query/TotalSupply - RPC + additional field `@type` which contains the type URL. + Example: - method - cosmos.bank.v1beta1.SendEnabled: - type: object - properties: - denom: - type: string - enabled: - type: boolean - format: boolean - description: |- - SendEnabled maps coin denom to a send_enabled status (whether a denom is - sendable). - cosmos.base.query.v1beta1.PageRequest: - type: object - properties: - key: - type: string - format: byte - description: |- - 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. - offset: - type: string - format: uint64 - description: |- - 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. - limit: - type: string - format: uint64 - description: >- - limit is the total number of results to be returned in the result - page. + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - If left empty it will default to a value to be set by each app. - count_total: - type: boolean - format: boolean - description: >- - count_total is set to true to indicate that the result set should - include + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - a count of the total number of items available for pagination in UIs. + If the embedded message type is well-known and has a custom + JSON - count_total is only respected when offset is used. It is ignored when - key + representation, that representation will be embedded adding + a field - is set. - description: |- - message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } - title: |- - PageRequest is to be embedded in gRPC request messages for efficient - pagination. Ex: - cosmos.base.query.v1beta1.PageResponse: - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: |- - total is total number of results available if PageRequest.count_total - was set, its value is undefined otherwise - description: |- - PageResponse is to be embedded in gRPC response messages where the - corresponding request message has used PageRequest. + `value` which holds the custom JSON in addition to the + `@type` - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - cosmos.base.v1beta1.Coin: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. + field. Example (for message [google.protobuf.Duration][]): - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse: - type: object - properties: - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - block: - type: object - properties: - header: + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: connection_id + description: connection identifier + in: path + required: true + type: string + - name: revision_number + in: path + required: true + type: string + format: uint64 + - name: revision_height + in: path + required: true + type: string + format: uint64 + tags: + - Query + /ibc/apps/transfer/v1/denom_traces: + get: + summary: DenomTraces queries all denomination traces. + operationId: DenomTraces + responses: + '200': + description: A successful response. + schema: type: object properties: - version: - title: basic block info + denom_traces: + type: array + items: + type: object + properties: + path: + type: string + description: >- + path defines the chain of port/channel identifiers used + for tracing the + + source of the fungible token. + base_denom: + type: string + description: base denomination of the relayed fungible token. + description: >- + DenomTrace contains the base denomination for ICS20 fungible + tokens and the + + source tracing information path. + description: denom_traces returns all denominations trace information. + pagination: + description: pagination defines the pagination in the response. type: object properties: - block: + next_key: type: string - format: uint64 - app: + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: type: string format: uint64 - description: >- - Consensus captures the consensus rules for processing a block - in the blockchain, + title: >- + total is total number of results available if + PageRequest.count_total - including all blockchain data structures and the rules of the - application's + was set, its value is undefined otherwise + description: >- + QueryConnectionsResponse is the response type for the + Query/DenomTraces RPC - state transition machine. - chain_id: - type: string - height: + method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: type: string - format: int64 - time: + code: + type: integer + format: int32 + message: type: string - format: date-time - last_block_id: + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: pagination.key + description: |- + 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. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + 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. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + 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. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + 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. + in: query + required: false + type: boolean + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true indicates that, results to be returned in the + descending order. + in: query + required: false + type: boolean + format: boolean + tags: + - Query + '/ibc/apps/transfer/v1/denom_traces/{hash}': + get: + summary: DenomTrace queries a denomination trace information. + operationId: DenomTrace + responses: + '200': + description: A successful response. + schema: + type: object + properties: + denom_trace: type: object properties: - hash: + path: type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: hashes from the app output from the prev block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: - type: string - format: byte - evidence_hash: - type: string - format: byte - title: consensus info - proposer_address: - type: string - format: byte - description: Header defines the structure of a Tendermint block header. - data: - type: object - properties: - txs: - type: array - items: - type: string - format: byte + description: >- + path defines the chain of port/channel identifiers used + for tracing the + + source of the fungible token. + base_denom: + type: string + description: base denomination of the relayed fungible token. description: >- - Txs that will be applied by state @ block.Height+1. + DenomTrace contains the base denomination for ICS20 fungible + tokens and the - NOTE: not all txs here are valid. We're just agreeing on the - order first. + source tracing information path. + description: >- + QueryDenomTraceResponse is the response type for the + Query/DenomTrace RPC - This means that block.AppHash does not include these txs. - title: Data contains the set of transactions included in the block - evidence: + method. + default: + description: An unexpected error response + schema: type: object properties: - evidence: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: type: array items: type: object properties: - duplicate_vote_evidence: - type: object - properties: - vote_a: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed message in the - consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote - from validators for - - consensus. - vote_b: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed message in the - consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote - from validators for - - consensus. - total_voting_power: - type: string - format: int64 - validator_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - DuplicateVoteEvidence contains evidence of a validator - signed two conflicting votes. - light_client_attack_evidence: - type: object - properties: - conflicting_block: - type: object - properties: - signed_header: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules - for processing a block in the - blockchain, + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: hash + description: hash (in hex format) of the denomination trace information. + in: path + required: true + type: string + tags: + - Query + /ibc/apps/transfer/v1/params: + get: + summary: Params queries all parameters of the ibc-transfer module. + operationId: IBCTransferParams + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + send_enabled: + type: boolean + format: boolean + description: >- + send_enabled enables or disables all cross-chain token + transfers from this - including all blockchain data structures - and the rules of the application's + chain. + receive_enabled: + type: boolean + format: boolean + description: >- + receive_enabled enables or disables all cross-chain token + transfers to this - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: >- - hashes from the app output from the prev - block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: - type: string - format: byte - evidence_hash: - type: string - format: byte - title: consensus info - proposer_address: - type: string - format: byte - description: >- - Header defines the structure of a Tendermint - block header. - commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: >- - BlockIdFlag indicates which BlcokID the - signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: >- - CommitSig is a part of the Vote included - in a Commit. - description: >- - Commit contains the evidence that a block - was committed by a set of validators. - validator_set: - type: object - properties: - validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for - use with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - proposer: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for - use with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - common_height: - type: string - format: int64 - byzantine_validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use - with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - LightClientAttackEvidence contains evidence of a set of - validators attempting to mislead a light client. - last_commit: + chain. + description: >- + QueryParamsResponse is the response type for the Query/Params RPC + method. + default: + description: An unexpected error response + schema: type: object properties: - height: + error: type: string - format: int64 - round: + code: type: integer format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: + message: + type: string + details: type: array items: type: object properties: - block_id_flag: + type_url: type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: BlockIdFlag indicates which BlcokID the signature is for - validator_address: + value: type: string format: byte - timestamp: + tags: + - Query +securityDefinitions: + kms: + type: basic +definitions: + CheckTxResult: + type: object + properties: + code: + type: integer + data: + type: string + gas_used: + type: integer + gas_wanted: + type: integer + info: + type: string + log: + type: string + tags: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + example: + code: 0 + data: data + log: log + gas_used: 5000 + gas_wanted: 10000 + info: info + tags: + - '' + - '' + DeliverTxResult: + type: object + properties: + code: + type: integer + data: + type: string + gas_used: + type: integer + gas_wanted: + type: integer + info: + type: string + log: + type: string + tags: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + example: + code: 5 + data: data + log: log + gas_used: 5000 + gas_wanted: 10000 + info: info + tags: + - '' + - '' + BroadcastTxCommitResult: + type: object + properties: + check_tx: + type: object + properties: + code: + type: integer + data: + type: string + gas_used: + type: integer + gas_wanted: + type: integer + info: + type: string + log: + type: string + tags: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + example: + code: 0 + data: data + log: log + gas_used: 5000 + gas_wanted: 10000 + info: info + tags: + - '' + - '' + deliver_tx: + type: object + properties: + code: + type: integer + data: + type: string + gas_used: + type: integer + gas_wanted: + type: integer + info: + type: string + log: + type: string + tags: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + example: + code: 5 + data: data + log: log + gas_used: 5000 + gas_wanted: 10000 + info: info + tags: + - '' + - '' + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + height: + type: integer + KVPair: + type: object + properties: + key: + type: string + value: + type: string + Msg: + type: string + Address: + type: string + description: bech32 encoded address + example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv + ValidatorAddress: + type: string + description: bech32 encoded address + example: terravaloper1wg2mlrxdmnnkkykgqg4znky86nyrtc45q7a85l + Coin: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + DecCoin: + type: object + properties: + denom: + type: string + example: ukrw + amount: + type: string + example: '50.000' + Hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + TxQuery: + type: object + properties: + hash: + type: string + example: D085138D913993919295FF4B0A9107F1F2CDE0D37A87CE0644E217CBF3B49656 + height: + type: number + example: 368 + tx: + type: object + properties: + msg: + type: array + items: + type: string + fee: + type: object + properties: + gas: + type: string + amount: + type: array + items: + type: object + properties: + denom: type: string - format: date-time + example: uluna + amount: + type: string + example: '50' + memo: + type: string + signature: + type: object + properties: + signature: + type: string + example: >- + MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= + pub_key: + type: object + properties: + type: + type: string + example: tendermint/PubKeySecp256k1 + value: + type: string + example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH + account_number: + type: string + example: '0' + sequence: + type: string + example: '0' + result: + type: object + properties: + log: + type: string + gas_wanted: + type: string + example: '200000' + gas_used: + type: string + example: '26354' + tags: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + PaginatedQueryTxs: + type: object + properties: + total_count: + type: number + example: 1 + count: + type: number + example: 1 + page_number: + type: number + example: 1 + page_total: + type: number + example: 1 + limit: + type: number + example: 30 + txs: + type: array + items: + type: object + properties: + hash: + type: string + example: D085138D913993919295FF4B0A9107F1F2CDE0D37A87CE0644E217CBF3B49656 + height: + type: number + example: 368 + tx: + type: object + properties: + msg: + type: array + items: + type: string + fee: + type: object + properties: + gas: + type: string + amount: + type: array + items: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + memo: + type: string + signature: + type: object + properties: signature: type: string - format: byte - description: CommitSig is a part of the Vote included in a Commit. - description: >- - Commit contains the evidence that a block was committed by a set - of validators. - description: >- - GetBlockByHeightResponse is the response type for the - Query/GetBlockByHeight RPC method. - cosmos.base.tendermint.v1beta1.GetLatestBlockResponse: + example: >- + MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= + pub_key: + type: object + properties: + type: + type: string + example: tendermint/PubKeySecp256k1 + value: + type: string + example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH + account_number: + type: string + example: '0' + sequence: + type: string + example: '0' + result: + type: object + properties: + log: + type: string + gas_wanted: + type: string + example: '200000' + gas_used: + type: string + example: '26354' + tags: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + StdTx: type: object properties: - block_id: + msg: + type: array + items: + type: string + fee: + type: object + properties: + gas: + type: string + amount: + type: array + items: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + memo: + type: string + signature: + type: object + properties: + signature: + type: string + example: >- + MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= + pub_key: + type: object + properties: + type: + type: string + example: tendermint/PubKeySecp256k1 + value: + type: string + example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH + account_number: + type: string + example: '0' + sequence: + type: string + example: '0' + UnsignedStdTx: + type: object + properties: + msg: + type: array + items: + type: string + fee: + type: object + properties: + gas: + type: string + amount: + type: array + items: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + memo: + type: string + signatures: + type: string + example: null + BlockID: + type: object + properties: + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + parts: + type: object + properties: + total: + type: number + example: 0 + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + BlockHeader: + type: object + properties: + chain_id: + type: string + example: columbus-3 + height: + type: number + example: 1 + time: + type: string + example: '2017-12-30T05:53:09.287+01:00' + num_txs: + type: number + example: 0 + last_block_id: type: object properties: hash: type: string - format: byte - part_set_header: + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + parts: type: object properties: total: - type: integer - format: int64 + type: number + example: 0 hash: type: string - format: byte - title: PartsetHeader - title: BlockID - block: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for processing a block - in the blockchain, - - including all blockchain data structures and the rules of the - application's - - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: hashes from the app output from the prev block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: - type: string - format: byte - evidence_hash: - type: string - format: byte - title: consensus info - proposer_address: - type: string - format: byte - description: Header defines the structure of a Tendermint block header. - data: - type: object - properties: - txs: - type: array - items: - type: string - format: byte - description: >- - Txs that will be applied by state @ block.Height+1. - - NOTE: not all txs here are valid. We're just agreeing on the - order first. - - This means that block.AppHash does not include these txs. - title: Data contains the set of transactions included in the block - evidence: - type: object - properties: - evidence: - type: array - items: - type: object - properties: - duplicate_vote_evidence: - type: object - properties: - vote_a: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed message in the - consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote - from validators for - - consensus. - vote_b: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed message in the - consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote - from validators for - - consensus. - total_voting_power: - type: string - format: int64 - validator_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - DuplicateVoteEvidence contains evidence of a validator - signed two conflicting votes. - light_client_attack_evidence: - type: object - properties: - conflicting_block: - type: object - properties: - signed_header: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules - for processing a block in the - blockchain, - - including all blockchain data structures - and the rules of the application's - - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: >- - hashes from the app output from the prev - block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: - type: string - format: byte - evidence_hash: - type: string - format: byte - title: consensus info - proposer_address: - type: string - format: byte - description: >- - Header defines the structure of a Tendermint - block header. - commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: >- - BlockIdFlag indicates which BlcokID the - signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: >- - CommitSig is a part of the Vote included - in a Commit. - description: >- - Commit contains the evidence that a block - was committed by a set of validators. - validator_set: - type: object - properties: - validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for - use with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - proposer: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for - use with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - common_height: - type: string - format: int64 - byzantine_validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use - with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - LightClientAttackEvidence contains evidence of a set of - validators attempting to mislead a light client. - last_commit: + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + total_txs: + type: number + example: 35 + last_commit_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + data_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + validators_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + next_validators_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + consensus_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + app_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + last_results_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + evidence_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + proposer_address: + type: string + description: bech32 encoded address + example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv + version: + type: object + properties: + block: + type: string + example: 10 + app: + type: string + example: 0 + Block: + type: object + properties: + header: + type: object + properties: + chain_id: + type: string + example: columbus-3 + height: + type: number + example: 1 + time: + type: string + example: '2017-12-30T05:53:09.287+01:00' + num_txs: + type: number + example: 0 + last_block_id: type: object properties: - height: + hash: type: string - format: int64 - round: - type: integer - format: int32 - block_id: + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + parts: type: object properties: + total: + type: number + example: 0 hash: type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: BlockIdFlag indicates which BlcokID the signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: CommitSig is a part of the Vote included in a Commit. - description: >- - Commit contains the evidence that a block was committed by a set - of validators. - description: >- - GetLatestBlockResponse is the response type for the Query/GetLatestBlock - RPC method. - cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse: - type: object - properties: - block_height: - type: string - format: int64 - validators: + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + total_txs: + type: number + example: 35 + last_commit_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + data_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + validators_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + next_validators_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + consensus_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + app_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + last_results_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + evidence_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + proposer_address: + type: string + description: bech32 encoded address + example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv + version: + type: object + properties: + block: + type: string + example: 10 + app: + type: string + example: 0 + txs: type: array items: - type: object - properties: - address: - type: string - pub_key: + type: string + evidence: + type: array + items: + type: string + last_commit: + type: object + properties: + block_id: + type: object + properties: + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + parts: + type: object + properties: + total: + type: number + example: 0 + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + precommits: + type: array + items: type: object properties: - type_url: + validator_address: type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all - types that they - - expect it to use in the context of Any. However, for URLs - which use the - - scheme `http`, `https`, or no scheme, one can optionally set - up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning - with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - value: + validator_index: type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in - the form - - of utility functions or additional generated methods of the Any - type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default - use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the last - '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with an - - additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom JSON - - representation, that representation will be embedded adding a - field - - `value` which holds the custom JSON in addition to the `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - description: Validator is the type for the validator-set. - pagination: - description: pagination defines an pagination for the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: >- - GetLatestValidatorSetResponse is the response type for the - Query/GetValidatorSetByHeight RPC method. - cosmos.base.tendermint.v1beta1.GetNodeInfoResponse: + example: '0' + height: + type: string + example: '0' + round: + type: string + example: '0' + timestamp: + type: string + example: '2017-12-30T05:53:09.287+01:00' + type: + type: number + example: 2 + block_id: + type: object + properties: + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + parts: + type: object + properties: + total: + type: number + example: 0 + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + signature: + type: string + example: >- + 7uTC74QlknqYWEwg7Vn6M8Om7FuZ0EO4bjvuj6rwH1mTUJrRuMMZvAAqT9VjNgP0RA/TDp6u/92AqrZfXJSpBQ== + BlockQuery: type: object properties: - default_node_info: + block_meta: type: object properties: - protocol_version: + header: type: object properties: - p2p: + chain_id: + type: string + example: columbus-3 + height: + type: number + example: 1 + time: + type: string + example: '2017-12-30T05:53:09.287+01:00' + num_txs: + type: number + example: 0 + last_block_id: + type: object + properties: + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + parts: + type: object + properties: + total: + type: number + example: 0 + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + total_txs: + type: number + example: 35 + last_commit_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + data_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + validators_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + next_validators_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + consensus_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + app_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + last_results_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + evidence_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + proposer_address: + type: string + description: bech32 encoded address + example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv + version: + type: object + properties: + block: + type: string + example: 10 + app: + type: string + example: 0 + block_id: + type: object + properties: + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + parts: + type: object + properties: + total: + type: number + example: 0 + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + block: + type: object + properties: + header: + type: object + properties: + chain_id: + type: string + example: columbus-3 + height: + type: number + example: 1 + time: + type: string + example: '2017-12-30T05:53:09.287+01:00' + num_txs: + type: number + example: 0 + last_block_id: + type: object + properties: + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + parts: + type: object + properties: + total: + type: number + example: 0 + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + total_txs: + type: number + example: 35 + last_commit_hash: type: string - format: uint64 - block: + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + data_hash: type: string - format: uint64 - app: + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + validators_hash: type: string - format: uint64 - default_node_id: - type: string - listen_addr: - type: string - network: - type: string - version: - type: string - channels: - type: string - format: byte - moniker: - type: string - other: - type: object - properties: - tx_index: + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + next_validators_hash: type: string - rpc_address: + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + consensus_hash: type: string - application_version: + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + app_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + last_results_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + evidence_hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + proposer_address: + type: string + description: bech32 encoded address + example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv + version: + type: object + properties: + block: + type: string + example: 10 + app: + type: string + example: 0 + txs: + type: array + items: + type: string + evidence: + type: array + items: + type: string + last_commit: + type: object + properties: + block_id: + type: object + properties: + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + parts: + type: object + properties: + total: + type: number + example: 0 + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + precommits: + type: array + items: + type: object + properties: + validator_address: + type: string + validator_index: + type: string + example: '0' + height: + type: string + example: '0' + round: + type: string + example: '0' + timestamp: + type: string + example: '2017-12-30T05:53:09.287+01:00' + type: + type: number + example: 2 + block_id: + type: object + properties: + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + parts: + type: object + properties: + total: + type: number + example: 0 + hash: + type: string + example: EE5F3404034C524501629B56E0DDC38FAD651F04 + signature: + type: string + example: >- + 7uTC74QlknqYWEwg7Vn6M8Om7FuZ0EO4bjvuj6rwH1mTUJrRuMMZvAAqT9VjNgP0RA/TDp6u/92AqrZfXJSpBQ== + DelegationDelegatorReward: + type: object + properties: + validator_address: + type: string + description: bech32 encoded address + example: terravaloper1wg2mlrxdmnnkkykgqg4znky86nyrtc45q7a85l + reward: + type: array + items: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + DelegatorTotalRewards: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + validator_address: + type: string + description: bech32 encoded address + example: terravaloper1wg2mlrxdmnnkkykgqg4znky86nyrtc45q7a85l + reward: + type: array + items: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + total: + type: array + items: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + BaseReq: + type: object + properties: + from: + type: string + example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv + description: Sender address or Keybase name to generate a transaction + memo: + type: string + example: "Sent via Terra Station \U0001F680" + chain_id: + type: string + example: columbus-3 + account_number: + type: string + example: '0' + sequence: + type: string + example: '1' + gas: + type: string + example: '200000' + gas_adjustment: + type: string + example: '1.2' + fees: + type: array + items: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + simulate: + type: boolean + example: false + description: >- + Estimate gas for a transaction (cannot be used in conjunction with + generate_only) + TendermintValidator: + type: object + properties: + address: + type: string + description: bech32 encoded address + example: terravaloper1wg2mlrxdmnnkkykgqg4znky86nyrtc45q7a85l + pub_key: + type: string + example: >- + terravalconspub1zcjduepq7mft6gfls57a0a42d7uhx656cckhfvtrlmw744jv4q0mvlv0dypskehfk8 + voting_power: + type: string + example: '1000' + proposer_priority: + type: string + example: '1000' + TextProposal: + type: object + properties: + proposal_id: + type: integer + title: + type: string + description: + type: string + proposal_type: + type: string + proposal_status: + type: string + final_tally_result: type: object properties: - name: - type: string - app_name: - type: string - version: + 'yes': type: string - git_commit: + example: '0.0000000000' + abstain: type: string - build_tags: + example: '0.0000000000' + 'no': type: string - go_version: + example: '0.0000000000' + no_with_veto: type: string - build_deps: - type: array - items: - type: object - properties: - path: - type: string - title: module path - version: - type: string - title: module version - sum: - type: string - title: checksum - title: Module is the type for VersionInfo - description: VersionInfo is the type for the GetNodeInfoResponse message. - description: >- - GetNodeInfoResponse is the request type for the Query/GetNodeInfo RPC - method. - cosmos.base.tendermint.v1beta1.GetSyncingResponse: + example: '0.0000000000' + submit_time: + type: string + total_deposit: + type: array + items: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + voting_start_time: + type: string + Proposer: type: object properties: - syncing: - type: boolean - format: boolean - description: >- - GetSyncingResponse is the response type for the Query/GetSyncing RPC - method. - cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse: + proposal_id: + type: string + proposer: + type: string + Deposit: type: object properties: - block_height: - type: string - format: int64 - validators: + amount: type: array items: type: object properties: - address: - type: string - pub_key: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all - types that they - - expect it to use in the context of Any. However, for URLs - which use the - - scheme `http`, `https`, or no scheme, one can optionally set - up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning - with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in - the form - - of utility functions or additional generated methods of the Any - type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default - use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the last - '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with an - - additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom JSON - - representation, that representation will be embedded adding a - field - - `value` which holds the custom JSON in addition to the `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - voting_power: + denom: type: string - format: int64 - proposer_priority: + example: uluna + amount: type: string - format: int64 - description: Validator is the type for the validator-set. - pagination: - description: pagination defines an pagination for the response. + example: '50' + proposal_id: + type: string + depositor: + type: string + description: bech32 encoded address + example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv + TallyResult: + type: object + properties: + 'yes': + type: string + example: '0.0000000000' + abstain: + type: string + example: '0.0000000000' + 'no': + type: string + example: '0.0000000000' + no_with_veto: + type: string + example: '0.0000000000' + Vote: + type: object + properties: + voter: + type: string + proposal_id: + type: string + option: + type: string + Validator: + type: object + properties: + operator_address: + type: string + description: bech32 encoded address + example: terravaloper1wg2mlrxdmnnkkykgqg4znky86nyrtc45q7a85l + consensus_pubkey: + type: string + example: >- + terravalconspub1zcjduepq7mft6gfls57a0a42d7uhx656cckhfvtrlmw744jv4q0mvlv0dypskehfk8 + jailed: + type: boolean + status: + type: integer + tokens: + type: string + delegator_shares: + type: string + description: type: object properties: - next_key: + moniker: type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: + identity: type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: >- - GetValidatorSetByHeightResponse is the response type for the - Query/GetValidatorSetByHeight RPC method. - cosmos.base.tendermint.v1beta1.Module: - type: object - properties: - path: + website: + type: string + details: + type: string + bond_height: type: string - title: module path - version: + example: '0' + bond_intra_tx_counter: + type: integer + example: 0 + unbonding_height: type: string - title: module version - sum: + example: '0' + unbonding_time: type: string - title: checksum - title: Module is the type for VersionInfo - cosmos.base.tendermint.v1beta1.Validator: + example: '1970-01-01T00:00:00Z' + commission: + type: object + properties: + rate: + type: string + example: '0' + max_rate: + type: string + example: '0' + max_change_rate: + type: string + example: '0' + update_time: + type: string + example: '1970-01-01T00:00:00Z' + Delegation: type: object properties: - address: + delegator_address: type: string - pub_key: + validator_address: + type: string + shares: + type: string + balance: type: object properties: - type_url: + denom: type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all types - that they - - expect it to use in the context of Any. However, for URLs which - use the - - scheme `http`, `https`, or no scheme, one can optionally set up a - type - - server that maps type URLs to message definitions as follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) might be - - used with implementation specific semantics. - value: + example: uluna + amount: type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above specified - type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in the - form - - of utility functions or additional generated methods of the Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default use - - 'type.googleapis.com/full.type.name' as the type URL and the unpack - - methods only use the fully qualified type name after the last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with an - - additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom JSON - - representation, that representation will be embedded adding a field - - `value` which holds the custom JSON in addition to the `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - voting_power: + example: '50' + UnbondingDelegation: + type: object + properties: + delegator_address: type: string - format: int64 - proposer_priority: + validator_address: type: string - format: int64 - description: Validator is the type for the validator-set. - cosmos.base.tendermint.v1beta1.VersionInfo: + entries: + type: array + items: + type: object + properties: + initial_balance: + type: string + balance: + type: string + creation_height: + type: string + completion_time: + type: string + UnbondingEntry: type: object properties: - name: + initial_balance: type: string - app_name: + balance: type: string - version: + creation_height: type: string - git_commit: + completion_time: type: string - build_tags: + Redelegation: + type: object + properties: + delegator_address: type: string - go_version: + validator_src_address: type: string - build_deps: + validator_dst_address: + type: string + entries: type: array items: type: object properties: - path: + creation_height: + type: integer + completion_time: + type: integer + initial_balance: type: string - title: module path - version: + balance: type: string - title: module version - sum: + shares_dst: type: string - title: checksum - title: Module is the type for VersionInfo - description: VersionInfo is the type for the GetNodeInfoResponse message. - tendermint.crypto.PublicKey: + RedelegationEntry: type: object properties: - ed25519: + creation_height: + type: integer + completion_time: + type: integer + initial_balance: type: string - format: byte - secp256k1: + balance: type: string - format: byte - title: PublicKey defines the keys available for use with Tendermint Validators - tendermint.p2p.DefaultNodeInfo: + shares_dst: + type: string + ValidatorDistInfo: type: object properties: - protocol_version: - type: object - properties: - p2p: - type: string - format: uint64 - block: - type: string - format: uint64 - app: - type: string - format: uint64 - default_node_id: + operator_address: type: string - listen_addr: + description: bech32 encoded address + example: terravaloper1wg2mlrxdmnnkkykgqg4znky86nyrtc45q7a85l + self_bond_rewards: + type: array + items: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + val_commission: + type: array + items: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + PublicKey: + type: object + properties: + type: type: string - network: + value: type: string - version: + SigningInfo: + type: object + properties: + address: type: string - channels: + example: terravalcons1qsdpq864szmfk8nh82qcg7lyle6k95w07acdqn + start_height: type: string - format: byte - moniker: + index_offset: type: string - other: - type: object - properties: - tx_index: - type: string - rpc_address: - type: string - tendermint.p2p.DefaultNodeInfoOther: + jailed_until: + type: string + tombstoned: + type: boolean + missed_blocks_counter: + type: string + ParamChange: type: object properties: - tx_index: + subspace: type: string - rpc_address: + example: staking + key: type: string - tendermint.p2p.ProtocolVersion: + example: MaxValidators + subkey: + type: string + example: '' + value: + type: object + Supply: type: object properties: - p2p: + total: + type: array + items: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + BaseAccount: + type: object + properties: + account_number: type: string - format: uint64 - block: + address: type: string - format: uint64 - app: + public_key: type: string - format: uint64 - tendermint.types.Block: + sequence: + type: string + Account: type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for processing a block in - the blockchain, - - including all blockchain data structures and the rules of the - application's - - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: + properties: + type: + type: string + example: auth/Account + value: + type: object + properties: + account_number: type: string - format: byte - validators_hash: + address: type: string - format: byte - title: hashes from the app output from the prev block - next_validators_hash: + public_key: type: string - format: byte - consensus_hash: + sequence: type: string - format: byte - app_hash: + BaseVestingAccount: + type: object + properties: + BaseAccount: + type: object + properties: + account_number: type: string - format: byte - last_results_hash: + address: type: string - format: byte - evidence_hash: + public_key: type: string - format: byte - title: consensus info - proposer_address: + sequence: type: string - format: byte - description: Header defines the structure of a Tendermint block header. - data: - type: object - properties: - txs: - type: array - items: + original_vesting: + type: array + items: + type: object + properties: + denom: type: string - format: byte - description: >- - Txs that will be applied by state @ block.Height+1. - - NOTE: not all txs here are valid. We're just agreeing on the - order first. - - This means that block.AppHash does not include these txs. - title: Data contains the set of transactions included in the block - evidence: - type: object - properties: - evidence: - type: array - items: - type: object - properties: - duplicate_vote_evidence: - type: object - properties: - vote_a: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed message in the - consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote - from validators for - - consensus. - vote_b: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed message in the - consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote - from validators for - - consensus. - total_voting_power: - type: string - format: int64 - validator_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - DuplicateVoteEvidence contains evidence of a validator - signed two conflicting votes. - light_client_attack_evidence: - type: object - properties: - conflicting_block: - type: object - properties: - signed_header: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for - processing a block in the blockchain, - - including all blockchain data structures and - the rules of the application's - - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: >- - hashes from the app output from the prev - block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: - type: string - format: byte - evidence_hash: - type: string - format: byte - title: consensus info - proposer_address: - type: string - format: byte - description: >- - Header defines the structure of a Tendermint - block header. - commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: >- - BlockIdFlag indicates which BlcokID the - signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: >- - CommitSig is a part of the Vote included - in a Commit. - description: >- - Commit contains the evidence that a block was - committed by a set of validators. - validator_set: - type: object - properties: - validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for - use with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - proposer: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use - with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - common_height: - type: string - format: int64 - byzantine_validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use with - Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - LightClientAttackEvidence contains evidence of a set of - validators attempting to mislead a light client. - last_commit: + example: uluna + amount: + type: string + example: '50' + delegated_free: + type: array + items: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + delegated_vesting: + type: array + items: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + end_time: + type: string + example: '0' + Schedule: + type: object + properties: + start_time: + type: string + example: '1556085600' + end_time: + type: string + example: '1556085600' + ratio: + type: string + example: '0.100000000000000000' + VestingSchedule: + type: object + properties: + denom: + type: string + example: usdr + lazy_schedules: + type: array + items: + type: object + properties: + start_time: + type: string + example: '1556085600' + end_time: + type: string + example: '1556085600' + ratio: + type: string + example: '0.100000000000000000' + BaseLazyGradedVestingAccount: + type: object + properties: + BaseVestingAccount: type: object properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: + BaseAccount: type: object properties: - hash: + account_number: type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: + address: + type: string + public_key: + type: string + sequence: + type: string + original_vesting: type: array items: type: object properties: - block_id_flag: + denom: type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: BlockIdFlag indicates which BlcokID the signature is for - validator_address: + example: uluna + amount: type: string - format: byte - timestamp: + example: '50' + delegated_free: + type: array + items: + type: object + properties: + denom: type: string - format: date-time - signature: + example: uluna + amount: type: string - format: byte - description: CommitSig is a part of the Vote included in a Commit. - description: >- - Commit contains the evidence that a block was committed by a set of - validators. - tendermint.types.BlockID: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: + example: '50' + delegated_vesting: + type: array + items: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + end_time: type: string - format: byte - title: PartsetHeader - title: BlockID - tendermint.types.BlockIDFlag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: BlockIdFlag indicates which BlcokID the signature is for - tendermint.types.Commit: + example: '0' + vesting_schedules: + type: array + items: + type: object + properties: + denom: + type: string + example: usdr + lazy_schedules: + type: array + items: + type: object + properties: + start_time: + type: string + example: '1556085600' + end_time: + type: string + example: '1556085600' + ratio: + type: string + example: '0.100000000000000000' + LazyGradedVestingAccount: type: object properties: - height: + type: type: string - format: int64 - round: - type: integer - format: int32 - block_id: + example: core/LazyGradedVestingAccount + value: type: object properties: - hash: - type: string - format: byte - part_set_header: + BaseVestingAccount: type: object properties: - total: - type: integer - format: int64 - hash: + BaseAccount: + type: object + properties: + account_number: + type: string + address: + type: string + public_key: + type: string + sequence: + type: string + original_vesting: + type: array + items: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + delegated_free: + type: array + items: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + delegated_vesting: + type: array + items: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + end_time: type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: BlockIdFlag indicates which BlcokID the signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: CommitSig is a part of the Vote included in a Commit. - description: >- - Commit contains the evidence that a block was committed by a set of - validators. - tendermint.types.CommitSig: + example: '0' + vesting_schedules: + type: array + items: + type: object + properties: + denom: + type: string + example: usdr + lazy_schedules: + type: array + items: + type: object + properties: + start_time: + type: string + example: '1556085600' + end_time: + type: string + example: '1556085600' + ratio: + type: string + example: '0.100000000000000000' + SwapReq: type: object + required: + - base_req + - offer_coin + - ask_denom properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: BlockIdFlag indicates which BlcokID the signature is for - validator_address: - type: string - format: byte - timestamp: + base_req: + type: object + properties: + from: + type: string + example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv + description: Sender address or Keybase name to generate a transaction + memo: + type: string + example: "Sent via Terra Station \U0001F680" + chain_id: + type: string + example: columbus-3 + account_number: + type: string + example: '0' + sequence: + type: string + example: '1' + gas: + type: string + example: '200000' + gas_adjustment: + type: string + example: '1.2' + fees: + type: array + items: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + simulate: + type: boolean + example: false + description: >- + Estimate gas for a transaction (cannot be used in conjunction with + generate_only) + offer_coin: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + ask_denom: type: string - format: date-time - signature: + example: uluna + receiver: type: string - format: byte - description: CommitSig is a part of the Vote included in a Commit. - tendermint.types.Data: + description: the `receiver` field can be skipped when the receiver is trader + example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv + MarketParams: type: object properties: - txs: - type: array - items: - type: string - format: byte + mint_base_pool: + type: number + example: '1000000.0' + burn_base_pool: + type: number + example: '1000000.0' + pool_recovery_period: + type: number + example: '16000' + min_stability_spread: + type: number + example: '0.02' + PrevoteReq: + type: object + properties: + base_req: + type: object + properties: + from: + type: string + example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv + description: Sender address or Keybase name to generate a transaction + memo: + type: string + example: "Sent via Terra Station \U0001F680" + chain_id: + type: string + example: columbus-3 + account_number: + type: string + example: '0' + sequence: + type: string + example: '1' + gas: + type: string + example: '200000' + gas_adjustment: + type: string + example: '1.2' + fees: + type: array + items: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + simulate: + type: boolean + example: false + description: >- + Estimate gas for a transaction (cannot be used in conjunction with + generate_only) + exchange_rate: + type: number + example: '1000.0' description: >- - Txs that will be applied by state @ block.Height+1. - - NOTE: not all txs here are valid. We're just agreeing on the order - first. - - This means that block.AppHash does not include these txs. - title: Data contains the set of transactions included in the block - tendermint.types.DuplicateVoteEvidence: + exchange rate of Luna in denom currency is to make prevote hash; this + field is required to submit prevote in case absence of hash + salt: + type: string + example: abcd + description: >- + salt is to make prevote hash; this field is required to submit prevote + in case absence of hash + hash: + type: string + example: 061bf1e27dfff121f40c826e593c8a28ec299a02 + description: hex string; hash of next vote; empty == skip prevote + validator: + type: string + description: bech32 encoded address + example: terravaloper1wg2mlrxdmnnkkykgqg4znky86nyrtc45q7a85l + VoteReq: type: object properties: - vote_a: + base_req: type: object properties: - type: + from: type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: |- - SignedMsgType is a type of signed message in the consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: + example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv + description: Sender address or Keybase name to generate a transaction + memo: type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: + example: "Sent via Terra Station \U0001F680" + chain_id: type: string - format: date-time - validator_address: + example: columbus-3 + account_number: type: string - format: byte - validator_index: - type: integer - format: int32 - signature: + example: '0' + sequence: type: string - format: byte + example: '1' + gas: + type: string + example: '200000' + gas_adjustment: + type: string + example: '1.2' + fees: + type: array + items: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + simulate: + type: boolean + example: false + description: >- + Estimate gas for a transaction (cannot be used in conjunction with + generate_only) + exchange_rate: + type: number + example: '1000.0' description: >- - Vote represents a prevote, precommit, or commit vote from validators - for - - consensus. - vote_b: + proof exchange rate of Luna in denom currency was used to make prevote + hash; initial prevote does not require this field + salt: + type: string + example: abcd + description: >- + proof salt was used to make prevote hash; initial prevote does not + require this field + validator: + type: string + description: bech32 encoded address + example: terravaloper1wg2mlrxdmnnkkykgqg4znky86nyrtc45q7a85l + AggregatePrevoteReq: + type: object + properties: + base_req: type: object properties: - type: + from: + type: string + example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv + description: Sender address or Keybase name to generate a transaction + memo: + type: string + example: "Sent via Terra Station \U0001F680" + chain_id: type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: |- - SignedMsgType is a type of signed message in the consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: + example: columbus-3 + account_number: type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: + example: '0' + sequence: type: string - format: date-time - validator_address: + example: '1' + gas: type: string - format: byte - validator_index: - type: integer - format: int32 - signature: + example: '200000' + gas_adjustment: type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote from validators - for - - consensus. - total_voting_power: + example: '1.2' + fees: + type: array + items: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + simulate: + type: boolean + example: false + description: >- + Estimate gas for a transaction (cannot be used in conjunction with + generate_only) + exchange_rates: type: string - format: int64 - validator_power: + example: '1000.0ukrw,1.2uusd,0.99usdr' + description: >- + exchange rates of Luna in denom currencies are to make aggregate + prevote hash; this field is required to submit prevote in case absence + of hash + salt: type: string - format: int64 - timestamp: + example: abcd + description: >- + salt is to make prevote hash; this field is required to submit prevote + in case absence of hash + hash: type: string - format: date-time - description: >- - DuplicateVoteEvidence contains evidence of a validator signed two - conflicting votes. - tendermint.types.Evidence: + example: 061bf1e27dfff121f40c826e593c8a28ec299a02 + description: hex string; hash of next vote; empty == skip prevote + AggregateVoteReq: type: object properties: - duplicate_vote_evidence: + base_req: type: object properties: - vote_a: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: |- - SignedMsgType is a type of signed message in the consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote from - validators for - - consensus. - vote_b: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: |- - SignedMsgType is a type of signed message in the consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote from - validators for - - consensus. - total_voting_power: + from: type: string - format: int64 - validator_power: + example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv + description: Sender address or Keybase name to generate a transaction + memo: type: string - format: int64 - timestamp: + example: "Sent via Terra Station \U0001F680" + chain_id: type: string - format: date-time + example: columbus-3 + account_number: + type: string + example: '0' + sequence: + type: string + example: '1' + gas: + type: string + example: '200000' + gas_adjustment: + type: string + example: '1.2' + fees: + type: array + items: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + simulate: + type: boolean + example: false + description: >- + Estimate gas for a transaction (cannot be used in conjunction with + generate_only) + exchange_rates: + type: string + example: '1000.0ukrw,1.2uusd,0.99usdr' description: >- - DuplicateVoteEvidence contains evidence of a validator signed two - conflicting votes. - light_client_attack_evidence: + proof exchange rates of Luna in denom currency were used to make + aggregate prevote hash + salt: + type: string + example: abcd + description: >- + proof salt was used to make prevote hash; initial prevote does not + require this field + DelegateReq: + type: object + properties: + base_req: type: object properties: - conflicting_block: - type: object - properties: - signed_header: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for processing - a block in the blockchain, - - including all blockchain data structures and the rules - of the application's - - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: hashes from the app output from the prev block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: - type: string - format: byte - evidence_hash: - type: string - format: byte - title: consensus info - proposer_address: - type: string - format: byte - description: Header defines the structure of a Tendermint block header. - commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: >- - BlockIdFlag indicates which BlcokID the - signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: >- - CommitSig is a part of the Vote included in a - Commit. - description: >- - Commit contains the evidence that a block was committed by - a set of validators. - validator_set: - type: object - properties: - validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use with - Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - proposer: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use with - Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - common_height: + from: type: string - format: int64 - byzantine_validators: + example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv + description: Sender address or Keybase name to generate a transaction + memo: + type: string + example: "Sent via Terra Station \U0001F680" + chain_id: + type: string + example: columbus-3 + account_number: + type: string + example: '0' + sequence: + type: string + example: '1' + gas: + type: string + example: '200000' + gas_adjustment: + type: string + example: '1.2' + fees: type: array items: type: object properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use with Tendermint - Validators - voting_power: + denom: type: string - format: int64 - proposer_priority: + example: uluna + amount: type: string - format: int64 - total_voting_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - LightClientAttackEvidence contains evidence of a set of validators - attempting to mislead a light client. - tendermint.types.EvidenceList: + example: '50' + simulate: + type: boolean + example: false + description: >- + Estimate gas for a transaction (cannot be used in conjunction with + generate_only) + feeder: + type: string + description: bech32 encoded address + example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv + ExchangeRateVote: type: object properties: - evidence: + exchange_rate: + type: number + example: '0.01241' + denom: + type: string + example: ukrw + voter: + type: string + description: bech32 encoded address + example: terravaloper1wg2mlrxdmnnkkykgqg4znky86nyrtc45q7a85l + ExchangeRatePrevote: + type: object + properties: + hash: + type: string + example: 061bf1e27dfff121f40c826e593c8a28ec299a02 + denom: + type: string + example: uusd + voter: + type: string + description: bech32 encoded address + example: terravaloper1wg2mlrxdmnnkkykgqg4znky86nyrtc45q7a85l + submit_block: + type: number + example: '1' + AggregateExchangeRatePrevote: + type: object + properties: + hash: + type: string + example: 061bf1e27dfff121f40c826e593c8a28ec299a02 + voter: + type: string + description: bech32 encoded address + example: terravaloper1wg2mlrxdmnnkkykgqg4znky86nyrtc45q7a85l + submit_block: + type: number + example: '1' + AggregateExchangeRateVote: + type: object + properties: + exchange_rates: type: array items: type: object properties: - duplicate_vote_evidence: - type: object - properties: - vote_a: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed message in the - consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote from - validators for - - consensus. - vote_b: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed message in the - consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote from - validators for - - consensus. - total_voting_power: - type: string - format: int64 - validator_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - DuplicateVoteEvidence contains evidence of a validator signed - two conflicting votes. - light_client_attack_evidence: - type: object - properties: - conflicting_block: - type: object - properties: - signed_header: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for - processing a block in the blockchain, - - including all blockchain data structures and the - rules of the application's - - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: hashes from the app output from the prev block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: - type: string - format: byte - evidence_hash: - type: string - format: byte - title: consensus info - proposer_address: - type: string - format: byte - description: >- - Header defines the structure of a Tendermint block - header. - commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: >- - BlockIdFlag indicates which BlcokID the - signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: >- - CommitSig is a part of the Vote included in a - Commit. - description: >- - Commit contains the evidence that a block was - committed by a set of validators. - validator_set: - type: object - properties: - validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use - with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - proposer: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use - with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - common_height: - type: string - format: int64 - byzantine_validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use with - Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - LightClientAttackEvidence contains evidence of a set of - validators attempting to mislead a light client. - tendermint.types.Header: + denom: + type: string + example: ukrw + amount: + type: string + example: '50.000' + voter: + type: string + description: bech32 encoded address + example: terravaloper1wg2mlrxdmnnkkykgqg4znky86nyrtc45q7a85l + OracleParams: + type: object + properties: + vote_period: + type: number + example: '900' + vote_threshold: + type: number + example: '0.67' + drop_threshold: + type: number + example: '10' + oracle_reward_band: + type: number + example: '0.02' + PolicyConstraints: + type: object + properties: + rate_min: + type: number + format: float + example: '0.0005' + description: 0.05% + rate_max: + type: number + format: float + example: '0.01' + description: 1% + cap: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + change_max: + type: number + format: float + example: '0.00025' + description: 0.025% + TreasuryParams: + type: object + properties: + tax_policy: + type: object + properties: + rate_min: + type: number + format: float + example: '0.0005' + description: 0.05% + rate_max: + type: number + format: float + example: '0.01' + description: 1% + cap: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + change_max: + type: number + format: float + example: '0.00025' + description: 0.025% + reward_policy: + type: object + properties: + rate_min: + type: number + format: float + example: '0.0005' + description: 0.05% + rate_max: + type: number + format: float + example: '0.01' + description: 1% + cap: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + change_max: + type: number + format: float + example: '0.00025' + description: 0.025% + seigniorage_burden_target: + type: number + format: float + example: '0.67' + description: 67% + mining_increment: + type: number + format: float + example: '1.07' + window_short: + type: integer + example: '4' + window_long: + type: integer + example: '52' + window_probation: + type: integer + example: '12' + WasmParams: type: object properties: - version: - title: basic block info + max_contract_size: + type: number + format: integer + example: '1000000' + description: allowed max contract bytes size + max_contract_gas: + type: number + format: integer + example: '1000000' + description: allowed max gas usages per each contract execution + max_contract_msg_size: + type: number + format: integer + example: '1000000' + description: allowed max contract exe msg bytes size + max_contract_data_size: + type: number + format: integer + example: '100' + description: allowed max contract return data size + event_params: type: object properties: - block: + max_attribute_num: type: string - format: uint64 - app: + example: '128' + description: 'allowed max # of contract attribute num' + max_attribute_key_length: type: string - format: uint64 - description: >- - Consensus captures the consensus rules for processing a block in the - blockchain, - - including all blockchain data structures and the rules of the - application's - - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: + example: '128' + description: allowed max length of a contract event attribute key + max_attribute_value_length: + type: string + example: '128' + description: allowed max length of a contract event attribute value + MultiSignPubKey: + type: object + properties: + threshold: + type: number + example: 1 + pubkeys: + type: array + items: + type: string + example: >- + terrapub1addwnpepq2l6pwj8h9fwxdjuge7lazu0sszpkck0nlhjag6q9drffrd93atywdt8ksu + MultiSignReq: + type: object + properties: + tx: type: object properties: - hash: - type: string - format: byte - part_set_header: + msg: + type: array + items: + type: string + fee: type: object properties: - total: - type: integer - format: int64 - hash: + gas: type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: + amount: + type: array + items: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + memo: + type: string + signatures: + type: string + example: null + chain_id: type: string - format: byte - title: hashes of block data - data_hash: + example: columbus-3 + signatures: + type: array + items: + type: object + properties: + signature: + type: string + example: >- + MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= + pub_key: + type: object + properties: + type: + type: string + example: tendermint/PubKeySecp256k1 + value: + type: string + example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH + signature_only: + type: boolean + pubkey: + type: object + properties: + threshold: + type: number + example: 1 + pubkeys: + type: array + items: + type: string + example: >- + terrapub1addwnpepq2l6pwj8h9fwxdjuge7lazu0sszpkck0nlhjag6q9drffrd93atywdt8ksu + StdSignature: + type: object + properties: + signature: type: string - format: byte - validators_hash: + example: >- + MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= + pub_key: + type: object + properties: + type: + type: string + example: tendermint/PubKeySecp256k1 + value: + type: string + example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH + EstimateFeeResp: + type: object + properties: + fee: + type: object + properties: + gas: + type: string + amount: + type: array + items: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + CodeInfo: + type: object + properties: + code_hash: type: string - format: byte - title: hashes from the app output from the prev block - next_validators_hash: + creator: type: string - format: byte - consensus_hash: + ContractInfo: + type: object + properties: + code_id: type: string - format: byte - app_hash: + address: type: string - format: byte - last_results_hash: + description: bech32 encoded address + example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv + creator: type: string - format: byte - evidence_hash: + description: bech32 encoded address + example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv + admin: type: string - format: byte - title: consensus info - proposer_address: + description: bech32 encoded address + example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv + init_msg: type: string - format: byte - description: Header defines the structure of a Tendermint block header. - tendermint.types.LightBlock: + StoreCodeReq: type: object properties: - signed_header: + base_req: type: object properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for processing a block - in the blockchain, - - including all blockchain data structures and the rules of the - application's - - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: hashes from the app output from the prev block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: - type: string - format: byte - evidence_hash: - type: string - format: byte - title: consensus info - proposer_address: - type: string - format: byte - description: Header defines the structure of a Tendermint block header. - commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: BlockIdFlag indicates which BlcokID the signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: CommitSig is a part of the Vote included in a Commit. + from: + type: string + example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv + description: Sender address or Keybase name to generate a transaction + memo: + type: string + example: "Sent via Terra Station \U0001F680" + chain_id: + type: string + example: columbus-3 + account_number: + type: string + example: '0' + sequence: + type: string + example: '1' + gas: + type: string + example: '200000' + gas_adjustment: + type: string + example: '1.2' + fees: + type: array + items: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + simulate: + type: boolean + example: false description: >- - Commit contains the evidence that a block was committed by a set - of validators. - validator_set: + Estimate gas for a transaction (cannot be used in conjunction with + generate_only) + wasm_bytes: + type: string + example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH + MigrateCodeReq: + type: object + properties: + base_req: type: object properties: - validators: + from: + type: string + example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv + description: Sender address or Keybase name to generate a transaction + memo: + type: string + example: "Sent via Terra Station \U0001F680" + chain_id: + type: string + example: columbus-3 + account_number: + type: string + example: '0' + sequence: + type: string + example: '1' + gas: + type: string + example: '200000' + gas_adjustment: + type: string + example: '1.2' + fees: + type: array + items: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + simulate: + type: boolean + example: false + description: >- + Estimate gas for a transaction (cannot be used in conjunction with + generate_only) + wasm_bytes: + type: string + example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH + InstantiateContractReq: + type: object + properties: + base_req: + type: object + properties: + from: + type: string + example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv + description: Sender address or Keybase name to generate a transaction + memo: + type: string + example: "Sent via Terra Station \U0001F680" + chain_id: + type: string + example: columbus-3 + account_number: + type: string + example: '0' + sequence: + type: string + example: '1' + gas: + type: string + example: '200000' + gas_adjustment: + type: string + example: '1.2' + fees: type: array items: type: object properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use with Tendermint - Validators - voting_power: + denom: type: string - format: int64 - proposer_priority: + example: uluna + amount: type: string - format: int64 - proposer: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use with Tendermint - Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - tendermint.types.LightClientAttackEvidence: + example: '50' + simulate: + type: boolean + example: false + description: >- + Estimate gas for a transaction (cannot be used in conjunction with + generate_only) + init_coins: + type: array + items: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + init_msg: + type: string + description: json formatted string + example: '{}' + admin: + type: string + description: bech32 encoded address + example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv + ExecuteContractReq: type: object properties: - conflicting_block: + base_req: type: object properties: - signed_header: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for processing a - block in the blockchain, - - including all blockchain data structures and the rules of - the application's - - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: hashes from the app output from the prev block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: - type: string - format: byte - evidence_hash: - type: string - format: byte - title: consensus info - proposer_address: - type: string - format: byte - description: Header defines the structure of a Tendermint block header. - commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: >- - BlockIdFlag indicates which BlcokID the signature is - for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: CommitSig is a part of the Vote included in a Commit. - description: >- - Commit contains the evidence that a block was committed by a - set of validators. - validator_set: - type: object - properties: - validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use with - Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - proposer: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use with - Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - common_height: - type: string - format: int64 - byzantine_validators: + from: + type: string + example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv + description: Sender address or Keybase name to generate a transaction + memo: + type: string + example: "Sent via Terra Station \U0001F680" + chain_id: + type: string + example: columbus-3 + account_number: + type: string + example: '0' + sequence: + type: string + example: '1' + gas: + type: string + example: '200000' + gas_adjustment: + type: string + example: '1.2' + fees: + type: array + items: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + simulate: + type: boolean + example: false + description: >- + Estimate gas for a transaction (cannot be used in conjunction with + generate_only) + coins: type: array items: type: object properties: - address: + denom: type: string - format: byte - pub_key: + example: uluna + amount: + type: string + example: '50' + exec_msg: + type: string + example: '{}' + MigrateContractReq: + type: object + properties: + base_req: + type: object + properties: + from: + type: string + example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv + description: Sender address or Keybase name to generate a transaction + memo: + type: string + example: "Sent via Terra Station \U0001F680" + chain_id: + type: string + example: columbus-3 + account_number: + type: string + example: '0' + sequence: + type: string + example: '1' + gas: + type: string + example: '200000' + gas_adjustment: + type: string + example: '1.2' + fees: + type: array + items: type: object properties: - ed25519: + denom: type: string - format: byte - secp256k1: + example: uluna + amount: type: string - format: byte - title: >- - PublicKey defines the keys available for use with Tendermint - Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: + example: '50' + simulate: + type: boolean + example: false + description: >- + Estimate gas for a transaction (cannot be used in conjunction with + generate_only) + new_code_id: + type: number + format: integer + example: 10 + migrate_msg: type: string - format: int64 - timestamp: + example: '{}' + UpdateContractAdminReq: + type: object + properties: + base_req: + type: object + properties: + from: + type: string + example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv + description: Sender address or Keybase name to generate a transaction + memo: + type: string + example: "Sent via Terra Station \U0001F680" + chain_id: + type: string + example: columbus-3 + account_number: + type: string + example: '0' + sequence: + type: string + example: '1' + gas: + type: string + example: '200000' + gas_adjustment: + type: string + example: '1.2' + fees: + type: array + items: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + simulate: + type: boolean + example: false + description: >- + Estimate gas for a transaction (cannot be used in conjunction with + generate_only) + new_admin: type: string - format: date-time - description: >- - LightClientAttackEvidence contains evidence of a set of validators - attempting to mislead a light client. - tendermint.types.PartSetHeader: + description: bech32 encoded address + example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv + ClearContractAdminReq: + type: object + properties: + base_req: + type: object + properties: + from: + type: string + example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv + description: Sender address or Keybase name to generate a transaction + memo: + type: string + example: "Sent via Terra Station \U0001F680" + chain_id: + type: string + example: columbus-3 + account_number: + type: string + example: '0' + sequence: + type: string + example: '1' + gas: + type: string + example: '200000' + gas_adjustment: + type: string + example: '1.2' + fees: + type: array + items: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + simulate: + type: boolean + example: false + description: >- + Estimate gas for a transaction (cannot be used in conjunction with + generate_only) + GenericAuthorization: + type: object + properties: + type: + type: string + example: msgauth/GenericAuthorization + value: + type: object + properties: + msg_type: + type: string + example: send + SendAuthorization: + type: object + properties: + type: + type: string + example: msgauth/SendAuthorization + value: + type: object + properties: + spend_limit: + type: array + items: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + GenericGrantInfo: type: object properties: - total: - type: integer - format: int64 - hash: + authorization: + type: object + properties: + type: + type: string + example: msgauth/GenericAuthorization + value: + type: object + properties: + msg_type: + type: string + example: send + expiration: type: string - format: byte - title: PartsetHeader - tendermint.types.SignedHeader: + example: '2021-06-24T09:33:20.012999Z' + SendGrantInfo: type: object properties: - header: + authorization: type: object properties: - version: - title: basic block info + type: + type: string + example: msgauth/SendAuthorization + value: type: object properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for processing a block in - the blockchain, - - including all blockchain data structures and the rules of the - application's - - state transition machine. + spend_limit: + type: array + items: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + expiration: + type: string + example: '2021-06-24T09:33:20.012999Z' + GrantReq: + type: object + required: + - base_req + - period + properties: + base_req: + type: object + properties: + from: + type: string + example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv + description: Sender address or Keybase name to generate a transaction + memo: + type: string + example: "Sent via Terra Station \U0001F680" chain_id: type: string - height: + example: columbus-3 + account_number: type: string - format: int64 - time: + example: '0' + sequence: type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: + example: '1' + gas: type: string - format: byte - title: hashes of block data - data_hash: + example: '200000' + gas_adjustment: type: string - format: byte - validators_hash: + example: '1.2' + fees: + type: array + items: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + simulate: + type: boolean + example: false + description: >- + Estimate gas for a transaction (cannot be used in conjunction with + generate_only) + period: + type: string + description: nano second of time duration + example: '3600000000000' + limit: + type: array + items: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + description: required when grant MsgType == send + RevokeGrantReq: + type: object + required: + - base_req + properties: + base_req: + type: object + properties: + from: type: string - format: byte - title: hashes from the app output from the prev block - next_validators_hash: + example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv + description: Sender address or Keybase name to generate a transaction + memo: type: string - format: byte - consensus_hash: + example: "Sent via Terra Station \U0001F680" + chain_id: type: string - format: byte - app_hash: + example: columbus-3 + account_number: type: string - format: byte - last_results_hash: + example: '0' + sequence: type: string - format: byte - evidence_hash: + example: '1' + gas: type: string - format: byte - title: consensus info - proposer_address: + example: '200000' + gas_adjustment: type: string - format: byte - description: Header defines the structure of a Tendermint block header. - commit: + example: '1.2' + fees: + type: array + items: + type: object + properties: + denom: + type: string + example: uluna + amount: + type: string + example: '50' + simulate: + type: boolean + example: false + description: >- + Estimate gas for a transaction (cannot be used in conjunction with + generate_only) + ExecuteGrantReq: + type: object + required: + - base_req + - msgs + properties: + base_req: type: object properties: - height: + from: type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: + example: terra1wg2mlrxdmnnkkykgqg4znky86nyrtc45q336yv + description: Sender address or Keybase name to generate a transaction + memo: + type: string + example: "Sent via Terra Station \U0001F680" + chain_id: + type: string + example: columbus-3 + account_number: + type: string + example: '0' + sequence: + type: string + example: '1' + gas: + type: string + example: '200000' + gas_adjustment: + type: string + example: '1.2' + fees: type: array items: type: object properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: BlockIdFlag indicates which BlcokID the signature is for - validator_address: - type: string - format: byte - timestamp: + denom: type: string - format: date-time - signature: + example: uluna + amount: type: string - format: byte - description: CommitSig is a part of the Vote included in a Commit. - description: >- - Commit contains the evidence that a block was committed by a set of - validators. - tendermint.types.SignedMsgType: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: |- - SignedMsgType is a type of signed message in the consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - tendermint.types.Validator: + example: '50' + simulate: + type: boolean + example: false + description: >- + Estimate gas for a transaction (cannot be used in conjunction with + generate_only) + msgs: + type: array + items: + type: string + TaxCap: type: object properties: - address: + denom: type: string - format: byte - pub_key: + example: uluna + tax_cap: + type: string + example: '50' + cosmos.auth.v1beta1.Params: + type: object + properties: + max_memo_characters: + type: string + format: uint64 + tx_sig_limit: + type: string + format: uint64 + tx_size_cost_per_byte: + type: string + format: uint64 + sig_verify_cost_ed25519: + type: string + format: uint64 + sig_verify_cost_secp256k1: + type: string + format: uint64 + description: Params defines the parameters for the auth module. + cosmos.auth.v1beta1.QueryAccountResponse: + type: object + properties: + account: type: object properties: - ed25519: + type_url: type: string - format: byte - secp256k1: + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + value: type: string format: byte - title: >- - PublicKey defines the keys available for use with Tendermint - Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - tendermint.types.ValidatorSet: + description: >- + Must be a valid serialized protocol buffer of the above specified + type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: >- + QueryAccountResponse is the response type for the Query/Account RPC + method. + cosmos.auth.v1beta1.QueryAccountsResponse: type: object properties: - validators: + accounts: type: array items: type: object properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use with Tendermint - Validators - voting_power: + type_url: type: string - format: int64 - proposer_priority: + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up + a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + value: type: string - format: int64 - proposer: + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: accounts are the existing accounts + pagination: + description: pagination defines the pagination in the response. type: object properties: - address: + next_key: type: string format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use with Tendermint - Validators - voting_power: - type: string - format: int64 - proposer_priority: + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: type: string - format: int64 - total_voting_power: - type: string - format: int64 - tendermint.types.Vote: + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryAccountsResponse is the response type for the Query/Accounts RPC + method. + cosmos.auth.v1beta1.QueryParamsResponse: type: object properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: |- - SignedMsgType is a type of signed message in the consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: + params: + description: params defines the parameters of the module. type: object properties: - hash: + max_memo_characters: type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: |- - Vote represents a prevote, precommit, or commit vote from validators for - consensus. - tendermint.version.Consensus: + format: uint64 + tx_sig_limit: + type: string + format: uint64 + tx_size_cost_per_byte: + type: string + format: uint64 + sig_verify_cost_ed25519: + type: string + format: uint64 + sig_verify_cost_secp256k1: + type: string + format: uint64 + description: QueryParamsResponse is the response type for the Query/Params RPC method. + cosmos.base.query.v1beta1.PageRequest: type: object properties: - block: + key: + type: string + format: byte + description: |- + 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. + offset: type: string format: uint64 - app: + description: |- + 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. + limit: type: string format: uint64 - description: >- - Consensus captures the consensus rules for processing a block in the - blockchain, + description: >- + limit is the total number of results to be returned in the result + page. - including all blockchain data structures and the rules of the - application's + If left empty it will default to a value to be set by each app. + count_total: + type: boolean + format: boolean + description: >- + count_total is set to true to indicate that the result set should + include - state transition machine. - cosmos.base.v1beta1.DecCoin: + 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. + reverse: + type: boolean + format: boolean + description: >- + reverse is set to true indicates that, results to be returned in the + descending order. + description: |- + message SomeRequest { + Foo some_parameter = 1; + PageRequest pagination = 2; + } + title: |- + PageRequest is to be embedded in gRPC request messages for efficient + pagination. Ex: + cosmos.base.query.v1beta1.PageResponse: type: object properties: - denom: + next_key: type: string - amount: + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise description: |- - DecCoin defines a token with a denomination and a decimal amount. + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. - NOTE: The amount field is an Dec which implements the custom method - signatures required by gogoproto. - cosmos.distribution.v1beta1.DelegationDelegatorReward: + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + google.protobuf.Any: type: object properties: - validator_address: + type_url: type: string - reward: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - DecCoin defines a token with a denomination and a decimal amount. + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - NOTE: The amount field is an Dec which implements the custom method - signatures required by gogoproto. - description: |- - DelegationDelegatorReward represents the properties - of a delegator's delegation reward. - cosmos.distribution.v1beta1.Params: - type: object - properties: - community_tax: - type: string - base_proposer_reward: - type: string - bonus_proposer_reward: - type: string - withdraw_addr_enabled: - type: boolean - format: boolean - description: Params defines the set of params for the distribution module. - cosmos.distribution.v1beta1.QueryCommunityPoolResponse: - type: object - properties: - pool: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - DecCoin defines a token with a denomination and a decimal amount. + protocol buffer message. This string must contain at least - NOTE: The amount field is an Dec which implements the custom method - signatures required by gogoproto. - description: pool defines community pool's coins. + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above specified + type. description: >- - QueryCommunityPoolResponse is the response type for the - Query/CommunityPool + `Any` contains an arbitrary serialized protocol buffer message along with + a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack - RPC method. - cosmos.distribution.v1beta1.QueryDelegationRewardsResponse: - type: object - properties: - rewards: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - DecCoin defines a token with a denomination and a decimal amount. + methods only use the fully qualified type name after the last '/' - NOTE: The amount field is an Dec which implements the custom method - signatures required by gogoproto. - description: rewards defines the rewards accrued by a delegation. - description: |- - QueryDelegationRewardsResponse is the response type for the - Query/DelegationRewards RPC method. - cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse: - type: object - properties: - rewards: - type: array - items: - type: object - properties: - validator_address: - type: string - reward: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - DecCoin defines a token with a denomination and a decimal - amount. + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". - NOTE: The amount field is an Dec which implements the custom - method - signatures required by gogoproto. - description: |- - DelegationDelegatorReward represents the properties - of a delegator's delegation reward. - description: rewards defines all the rewards accrued by a delegator. - total: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - 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. - description: total defines the sum of all the rewards. - description: |- - QueryDelegationTotalRewardsResponse is the response type for the - Query/DelegationTotalRewards RPC method. - cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse: - type: object - properties: - validators: - type: array - items: - type: string - description: validators defines the validators a delegator is delegating for. - description: |- - QueryDelegatorValidatorsResponse is the response type for the - Query/DelegatorValidators RPC method. - cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse: - type: object - properties: - withdraw_address: - type: string - description: withdraw_address defines the delegator address to query for. - description: |- - QueryDelegatorWithdrawAddressResponse is the response type for the - Query/DelegatorWithdrawAddress RPC method. - cosmos.distribution.v1beta1.QueryParamsResponse: - type: object - properties: - params: - description: params defines the parameters of the module. - type: object - properties: - community_tax: - type: string - base_proposer_reward: - type: string - bonus_proposer_reward: - type: string - withdraw_addr_enabled: - type: boolean - format: boolean - description: QueryParamsResponse is the response type for the Query/Params RPC method. - cosmos.distribution.v1beta1.QueryValidatorCommissionResponse: - type: object - properties: - commission: - description: commission defines the commision the validator received. - type: object - properties: - commission: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - DecCoin defines a token with a denomination and a decimal - amount. + JSON + ==== - NOTE: The amount field is an Dec which implements the custom - method + The JSON representation of an `Any` value uses the regular - signatures required by gogoproto. - title: |- - QueryValidatorCommissionResponse is the response type for the - Query/ValidatorCommission RPC method - cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse: - type: object - properties: - rewards: - type: object - properties: - rewards: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - DecCoin defines a token with a denomination and a decimal - amount. + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: - NOTE: The amount field is an Dec which implements the custom - method + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - signatures required by gogoproto. - description: >- - ValidatorOutstandingRewards represents outstanding (un-withdrawn) - rewards + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - for a validator inexpensive to track, allows simple sanity checks. - description: |- - QueryValidatorOutstandingRewardsResponse is the response type for the - Query/ValidatorOutstandingRewards RPC method. - cosmos.distribution.v1beta1.QueryValidatorSlashesResponse: - type: object - properties: - slashes: - type: array - items: - type: object - properties: - validator_period: - type: string - format: uint64 - fraction: - type: string - description: |- - 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. - description: slashes defines the slashes the validator received. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + If the embedded message type is well-known and has a custom JSON - was set, its value is undefined otherwise - description: |- - QueryValidatorSlashesResponse is the response type for the - Query/ValidatorSlashes RPC method. - cosmos.distribution.v1beta1.ValidatorAccumulatedCommission: - type: object - properties: - commission: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - DecCoin defines a token with a denomination and a decimal amount. + representation, that representation will be embedded adding a field - NOTE: The amount field is an Dec which implements the custom method - signatures required by gogoproto. - description: |- - ValidatorAccumulatedCommission represents accumulated commission - for a validator kept as a running counter, can be withdrawn at any time. - cosmos.distribution.v1beta1.ValidatorOutstandingRewards: - type: object - properties: - rewards: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - DecCoin defines a token with a denomination and a decimal amount. + `value` which holds the custom JSON in addition to the `@type` - NOTE: The amount field is an Dec which implements the custom method - signatures required by gogoproto. - description: |- - ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards - for a validator inexpensive to track, allows simple sanity checks. - cosmos.distribution.v1beta1.ValidatorSlashEvent: + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + grpc.gateway.runtime.Error: type: object properties: - validator_period: + error: type: string - format: uint64 - fraction: + code: + type: integer + format: int32 + message: type: string - description: |- - 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. - cosmos.evidence.v1beta1.QueryAllEvidenceResponse: - type: object - properties: - evidence: + details: type: array items: type: object @@ -44707,31 +40664,341 @@ definitions: additional field `@type` which contains the type URL. Example: - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + cosmos.bank.v1beta1.DenomUnit: + type: object + properties: + denom: + type: string + description: denom represents the string name of the given denom unit (e.g uatom). + exponent: + type: integer + format: int64 + description: >- + 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 = 1^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). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + cosmos.bank.v1beta1.Metadata: + type: object + properties: + description: + type: string + denom_units: + type: array + items: + type: object + properties: + denom: + type: string + description: >- + denom represents the string name of the given denom unit (e.g + uatom). + exponent: + type: integer + format: int64 + description: >- + 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 = 1^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). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + title: denom_units represents the list of DenomUnit's for a given coin + base: + type: string + description: >- + base represents the base denom (should be the DenomUnit with exponent + = 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: >- + symbol is the token symbol usually shown on exchanges (eg: ATOM). This + can + + be the same as the display. + description: |- + Metadata represents a struct that describes + a basic token. + cosmos.bank.v1beta1.Params: + type: object + properties: + send_enabled: + type: array + items: + type: object + properties: + denom: + type: string + enabled: + type: boolean + format: boolean + description: >- + SendEnabled maps coin denom to a send_enabled status (whether a + denom is + + sendable). + default_send_enabled: + type: boolean + format: boolean + description: Params defines the parameters for the bank module. + cosmos.bank.v1beta1.QueryAllBalancesResponse: + type: object + properties: + balances: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + 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. + description: balances is the balances of all the coins. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryAllBalancesResponse is the response type for the Query/AllBalances + RPC + + method. + cosmos.bank.v1beta1.QueryBalanceResponse: + type: object + properties: + balance: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + 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. + description: >- + QueryBalanceResponse is the response type for the Query/Balance RPC + method. + cosmos.bank.v1beta1.QueryDenomMetadataResponse: + type: object + properties: + metadata: + type: object + properties: + description: + type: string + denom_units: + type: array + items: + type: object + properties: + denom: + type: string + description: >- + denom represents the string name of the given denom unit + (e.g uatom). + exponent: + type: integer + format: int64 + description: >- + 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 = 1^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). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + title: denom_units represents the list of DenomUnit's for a given coin + base: + type: string + description: >- + base represents the base denom (should be the DenomUnit with + exponent = 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: >- + symbol is the token symbol usually shown on exchanges (eg: ATOM). + This can + + be the same as the display. + description: |- + Metadata represents a struct that describes + a basic token. + description: >- + QueryDenomMetadataResponse is the response type for the + Query/DenomMetadata RPC - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + method. + cosmos.bank.v1beta1.QueryDenomsMetadataResponse: + type: object + properties: + metadatas: + type: array + items: + type: object + properties: + description: + type: string + denom_units: + type: array + items: + type: object + properties: + denom: + type: string + description: >- + denom represents the string name of the given denom unit + (e.g uatom). + exponent: + type: integer + format: int64 + description: >- + exponent represents power of 10 exponent that one must - If the embedded message type is well-known and has a custom JSON + raise the base_denom to in order to equal the given + DenomUnit's denom - representation, that representation will be embedded adding a field + 1 denom = 1^exponent base_denom - `value` which holds the custom JSON in addition to the `@type` + (e.g. with a base_denom of uatom, one can create a + DenomUnit of 'atom' with - field. Example (for message [google.protobuf.Duration][]): + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + title: denom_units represents the list of DenomUnit's for a given coin + base: + type: string + description: >- + base represents the base denom (should be the DenomUnit with + exponent = 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: >- + symbol is the token symbol usually shown on exchanges (eg: + ATOM). This can - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - description: evidence returns all evidences. + be the same as the display. + description: |- + Metadata represents a struct that describes + a basic token. + description: >- + metadata provides the client information for all the registered + tokens. pagination: description: pagination defines the pagination in the response. type: object @@ -44751,184 +41018,60 @@ definitions: was set, its value is undefined otherwise description: >- - QueryAllEvidenceResponse is the response type for the Query/AllEvidence - RPC + QueryDenomsMetadataResponse is the response type for the + Query/DenomsMetadata RPC method. - cosmos.evidence.v1beta1.QueryEvidenceResponse: + cosmos.bank.v1beta1.QueryParamsResponse: type: object properties: - evidence: + params: type: object properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all types - that they - - expect it to use in the context of Any. However, for URLs which - use the - - scheme `http`, `https`, or no scheme, one can optionally set up a - type - - server that maps type URLs to message definitions as follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) might be + send_enabled: + type: array + items: + type: object + properties: + denom: + type: string + enabled: + type: boolean + format: boolean + description: >- + SendEnabled maps coin denom to a send_enabled status (whether a + denom is - used with implementation specific semantics. - value: + sendable). + default_send_enabled: + type: boolean + format: boolean + description: Params defines the parameters for the bank module. + description: >- + QueryParamsResponse defines the response type for querying x/bank + parameters. + cosmos.bank.v1beta1.QuerySupplyOfResponse: + type: object + properties: + amount: + type: object + properties: + denom: type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above specified - type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in the - form - - of utility functions or additional generated methods of the Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default use - - 'type.googleapis.com/full.type.name' as the type URL and the unpack - - methods only use the fully qualified type name after the last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with an - - additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom JSON - - representation, that representation will be embedded adding a field - - `value` which holds the custom JSON in addition to the `@type` - - field. Example (for message [google.protobuf.Duration][]): + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. description: >- - QueryEvidenceResponse is the response type for the Query/Evidence RPC + QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. - cosmos.gov.v1beta1.Deposit: + cosmos.bank.v1beta1.QueryTotalSupplyResponse: type: object properties: - proposal_id: - type: string - format: uint64 - depositor: - type: string - amount: + supply: type: array items: type: object @@ -44942,694 +41085,1460 @@ definitions: NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. - description: |- - Deposit defines an amount deposited by an account address to an active - proposal. - cosmos.gov.v1beta1.DepositParams: + title: supply is the supply of the coins + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + title: >- + QueryTotalSupplyResponse is the response type for the Query/TotalSupply + RPC + + method + cosmos.bank.v1beta1.SendEnabled: type: object properties: - min_deposit: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - 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. - description: Minimum deposit for a proposal to enter voting period. - max_deposit_period: + denom: type: string - description: >- - Maximum period for Atom holders to deposit on a proposal. Initial - value: 2 - months. - description: DepositParams defines the params for deposits on governance proposals. - cosmos.gov.v1beta1.Proposal: + enabled: + type: boolean + format: boolean + description: |- + SendEnabled maps coin denom to a send_enabled status (whether a denom is + sendable). + cosmos.base.v1beta1.Coin: type: object properties: - proposal_id: + denom: type: string - format: uint64 - content: + amount: + type: string + description: |- + 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. + cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse: + type: object + properties: + block_id: type: object properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all types - that they - - expect it to use in the context of Any. However, for URLs which - use the - - scheme `http`, `https`, or no scheme, one can optionally set up a - type - - server that maps type URLs to message definitions as follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) might be - - used with implementation specific semantics. - value: + hash: type: string format: byte - description: >- - Must be a valid serialized protocol buffer of the above specified - type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in the - form - - of utility functions or additional generated methods of the Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default use - - 'type.googleapis.com/full.type.name' as the type URL and the unpack - - methods only use the fully qualified type name after the last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield type - - name "y.z". + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + block: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block + in the blockchain, + including all blockchain data structures and the rules of the + application's + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: Header defines the structure of a Tendermint block header. + data: + type: object + properties: + txs: + type: array + items: + type: string + format: byte + description: >- + Txs that will be applied by state @ block.Height+1. - JSON + NOTE: not all txs here are valid. We're just agreeing on the + order first. - ==== + This means that block.AppHash does not include these txs. + title: Data contains the set of transactions included in the block + evidence: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. - The JSON representation of an `Any` value uses the regular + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote represents a prevote, precommit, or commit vote + from validators for - representation of the deserialized, embedded message, with an + consensus. + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. - additional field `@type` which contains the type URL. Example: + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote represents a prevote, precommit, or commit vote + from validators for - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + consensus. + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + DuplicateVoteEvidence contains evidence of a validator + signed two conflicting votes. + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules + for processing a block in the + blockchain, - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + including all blockchain data structures + and the rules of the application's - If the embedded message type is well-known and has a custom JSON + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: >- + hashes from the app output from the prev + block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: >- + Header defines the structure of a Tendermint + block header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: >- + BlockIdFlag indicates which BlcokID the + signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: >- + CommitSig is a part of the Vote included + in a Commit. + description: >- + Commit contains the evidence that a block + was committed by a set of validators. + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for + use with Tendermint Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for + use with Tendermint Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use + with Tendermint Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + LightClientAttackEvidence contains evidence of a set of + validators attempting to mislead a light client. + last_commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: BlockIdFlag indicates which BlcokID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: >- + Commit contains the evidence that a block was committed by a set + of validators. + description: >- + GetBlockByHeightResponse is the response type for the + Query/GetBlockByHeight RPC method. + cosmos.base.tendermint.v1beta1.GetLatestBlockResponse: + type: object + properties: + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + block: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block + in the blockchain, - representation, that representation will be embedded adding a field + including all blockchain data structures and the rules of the + application's - `value` which holds the custom JSON in addition to the `@type` + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: Header defines the structure of a Tendermint block header. + data: + type: object + properties: + txs: + type: array + items: + type: string + format: byte + description: >- + Txs that will be applied by state @ block.Height+1. - field. Example (for message [google.protobuf.Duration][]): + NOTE: not all txs here are valid. We're just agreeing on the + order first. - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - status: - type: string - enum: - - PROPOSAL_STATUS_UNSPECIFIED - - PROPOSAL_STATUS_DEPOSIT_PERIOD - - PROPOSAL_STATUS_VOTING_PERIOD - - PROPOSAL_STATUS_PASSED - - PROPOSAL_STATUS_REJECTED - - PROPOSAL_STATUS_FAILED - default: PROPOSAL_STATUS_UNSPECIFIED - description: |- - ProposalStatus enumerates the valid statuses of a proposal. + This means that block.AppHash does not include these txs. + title: Data contains the set of transactions included in the block + evidence: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. - - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - period. - - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - period. - - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - passed. - - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - been rejected. - - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - failed. - final_tally_result: - type: object - properties: - 'yes': - type: string - abstain: - type: string - 'no': - type: string - no_with_veto: - type: string - description: TallyResult defines a standard tally for a governance proposal. - submit_time: - type: string - format: date-time - deposit_end_time: - type: string - format: date-time - total_deposit: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote represents a prevote, precommit, or commit vote + from validators for - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - voting_start_time: - type: string - format: date-time - voting_end_time: - type: string - format: date-time - description: Proposal defines the core field members of a governance proposal. - cosmos.gov.v1beta1.ProposalStatus: - type: string - enum: - - PROPOSAL_STATUS_UNSPECIFIED - - PROPOSAL_STATUS_DEPOSIT_PERIOD - - PROPOSAL_STATUS_VOTING_PERIOD - - PROPOSAL_STATUS_PASSED - - PROPOSAL_STATUS_REJECTED - - PROPOSAL_STATUS_FAILED - default: PROPOSAL_STATUS_UNSPECIFIED - description: |- - ProposalStatus enumerates the valid statuses of a proposal. + consensus. + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. - - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - period. - - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - period. - - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - passed. - - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - been rejected. - - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - failed. - cosmos.gov.v1beta1.QueryDepositResponse: - type: object - properties: - deposit: - type: object - properties: - proposal_id: - type: string - format: uint64 - depositor: - type: string - amount: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote represents a prevote, precommit, or commit vote + from validators for + consensus. + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + DuplicateVoteEvidence contains evidence of a validator + signed two conflicting votes. + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules + for processing a block in the + blockchain, - NOTE: The amount field is an Int which implements the custom - method + including all blockchain data structures + and the rules of the application's - signatures required by gogoproto. - description: |- - Deposit defines an amount deposited by an account address to an active - proposal. + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: >- + hashes from the app output from the prev + block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: >- + Header defines the structure of a Tendermint + block header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: >- + BlockIdFlag indicates which BlcokID the + signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: >- + CommitSig is a part of the Vote included + in a Commit. + description: >- + Commit contains the evidence that a block + was committed by a set of validators. + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for + use with Tendermint Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for + use with Tendermint Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use + with Tendermint Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + LightClientAttackEvidence contains evidence of a set of + validators attempting to mislead a light client. + last_commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: BlockIdFlag indicates which BlcokID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: >- + Commit contains the evidence that a block was committed by a set + of validators. description: >- - QueryDepositResponse is the response type for the Query/Deposit RPC - method. - cosmos.gov.v1beta1.QueryDepositsResponse: + GetLatestBlockResponse is the response type for the Query/GetLatestBlock + RPC method. + cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse: type: object properties: - deposits: + block_height: + type: string + format: int64 + validators: type: array items: type: object properties: - proposal_id: - type: string - format: uint64 - depositor: + address: type: string - amount: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - 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. - description: >- - Deposit defines an amount deposited by an account address to an - active - - proposal. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: >- - QueryDepositsResponse is the response type for the Query/Deposits RPC - method. - cosmos.gov.v1beta1.QueryParamsResponse: - type: object - properties: - voting_params: - description: voting_params defines the parameters related to voting. - type: object - properties: - voting_period: - type: string - description: Length of the voting period. - deposit_params: - description: deposit_params defines the parameters related to deposit. - type: object - properties: - min_deposit: - type: array - items: + pub_key: type: object properties: - denom: - type: string - amount: + type_url: type: string - description: >- - 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. - description: Minimum deposit for a proposal to enter voting period. - max_deposit_period: - type: string - description: >- - Maximum period for Atom holders to deposit on a proposal. Initial - value: 2 - months. - tally_params: - description: tally_params defines the parameters related to tally. - type: object - properties: - quorum: - type: string - format: byte - description: >- - Minimum percentage of total stake needed to vote for a result to - be - considered valid. - threshold: - type: string - format: byte - description: >- - Minimum proportion of Yes votes for proposal to pass. Default - value: 0.5. - veto_threshold: - type: string - format: byte - description: >- - Minimum value of Veto votes to Total votes ratio for proposal to - be - vetoed. Default value: 1/3. - description: QueryParamsResponse is the response type for the Query/Params RPC method. - cosmos.gov.v1beta1.QueryProposalResponse: - type: object - properties: - proposal: - type: object - properties: - proposal_id: - type: string - format: uint64 - content: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - protocol buffer message. This string must contain at least + protocol buffer message. This string must contain at least - one "/" character. The last segment of the URL's path must - represent + one "/" character. The last segment of the URL's path must + represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in a - canonical form + `path/google.protobuf.Duration`). The name should be in a + canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary all - types that they + In practice, teams usually precompile into the binary all + types that they - expect it to use in the context of Any. However, for URLs - which use the + expect it to use in the context of Any. However, for URLs + which use the - scheme `http`, `https`, or no scheme, one can optionally set - up a type + scheme `http`, `https`, or no scheme, one can optionally set + up a type - server that maps type URLs to message definitions as follows: + server that maps type URLs to message definitions as + follows: - * If no scheme is provided, `https` is assumed. + * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Note: this functionality is not currently available in the - official + Note: this functionality is not currently available in the + official - protobuf release, and it is not used for type URLs beginning - with + protobuf release, and it is not used for type URLs beginning + with - type.googleapis.com. + type.googleapis.com. - Schemes other than `http`, `https` (or the empty scheme) might - be + Schemes other than `http`, `https` (or the empty scheme) + might be - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a - URL that describes the type of the serialized message. + URL that describes the type of the serialized message. - Protobuf library provides support to pack/unpack Any values in the - form + Protobuf library provides support to pack/unpack Any values in + the form - of utility functions or additional generated methods of the Any - type. + of utility functions or additional generated methods of the Any + type. - Example 1: Pack and unpack a message in C++. + Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { + Foo foo = ...; + Any any; + any.PackFrom(foo); ... - } + if (any.UnpackTo(&foo)) { + ... + } - Example 2: Pack and unpack a message in Java. + Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) + foo = Foo(...) + any = Any() + any.Pack(foo) ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) ... - } + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } - The pack methods provided by protobuf library will by default use + The pack methods provided by protobuf library will by default + use - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - methods only use the fully qualified type name after the last '/' + methods only use the fully qualified type name after the last + '/' - in the type URL, for example "foo.bar.com/x/y.z" will yield type + in the type URL, for example "foo.bar.com/x/y.z" will yield type - name "y.z". + name "y.z". - JSON + JSON - ==== + ==== - The JSON representation of an `Any` value uses the regular + The JSON representation of an `Any` value uses the regular - representation of the deserialized, embedded message, with an + representation of the deserialized, embedded message, with an - additional field `@type` which contains the type URL. Example: + additional field `@type` which contains the type URL. Example: - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - If the embedded message type is well-known and has a custom JSON + If the embedded message type is well-known and has a custom JSON - representation, that representation will be embedded adding a - field + representation, that representation will be embedded adding a + field - `value` which holds the custom JSON in addition to the `@type` + `value` which holds the custom JSON in addition to the `@type` - field. Example (for message [google.protobuf.Duration][]): + field. Example (for message [google.protobuf.Duration][]): - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - status: + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + description: Validator is the type for the validator-set. + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: type: string - enum: - - PROPOSAL_STATUS_UNSPECIFIED - - PROPOSAL_STATUS_DEPOSIT_PERIOD - - PROPOSAL_STATUS_VOTING_PERIOD - - PROPOSAL_STATUS_PASSED - - PROPOSAL_STATUS_REJECTED - - PROPOSAL_STATUS_FAILED - default: PROPOSAL_STATUS_UNSPECIFIED - description: |- - ProposalStatus enumerates the valid statuses of a proposal. + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. - - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - period. - - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - period. - - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - passed. - - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - been rejected. - - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - failed. - final_tally_result: + was set, its value is undefined otherwise + description: >- + GetLatestValidatorSetResponse is the response type for the + Query/GetValidatorSetByHeight RPC method. + cosmos.base.tendermint.v1beta1.GetNodeInfoResponse: + type: object + properties: + default_node_info: + type: object + properties: + protocol_version: type: object properties: - 'yes': + p2p: type: string - abstain: + format: uint64 + block: type: string - 'no': + format: uint64 + app: type: string - no_with_veto: + format: uint64 + default_node_id: + type: string + listen_addr: + type: string + network: + type: string + version: + type: string + channels: + type: string + format: byte + moniker: + type: string + other: + type: object + properties: + tx_index: type: string - description: TallyResult defines a standard tally for a governance proposal. - submit_time: + rpc_address: + type: string + application_version: + type: object + properties: + name: type: string - format: date-time - deposit_end_time: + app_name: type: string - format: date-time - total_deposit: + version: + type: string + git_commit: + type: string + build_tags: + type: string + go_version: + type: string + build_deps: type: array items: type: object properties: - denom: + path: type: string - amount: + title: module path + version: type: string - description: >- - 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. - voting_start_time: - type: string - format: date-time - voting_end_time: - type: string - format: date-time - description: Proposal defines the core field members of a governance proposal. + title: module version + sum: + type: string + title: checksum + title: Module is the type for VersionInfo + description: VersionInfo is the type for the GetNodeInfoResponse message. description: >- - QueryProposalResponse is the response type for the Query/Proposal RPC + GetNodeInfoResponse is the request type for the Query/GetNodeInfo RPC method. - cosmos.gov.v1beta1.QueryProposalsResponse: + cosmos.base.tendermint.v1beta1.GetSyncingResponse: type: object properties: - proposals: + syncing: + type: boolean + format: boolean + description: >- + GetSyncingResponse is the response type for the Query/GetSyncing RPC + method. + cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse: + type: object + properties: + block_height: + type: string + format: int64 + validators: type: array items: type: object properties: - proposal_id: + address: type: string - format: uint64 - content: + pub_key: type: object properties: type_url: @@ -45798,2477 +42707,3137 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - status: + voting_power: type: string - enum: - - PROPOSAL_STATUS_UNSPECIFIED - - PROPOSAL_STATUS_DEPOSIT_PERIOD - - PROPOSAL_STATUS_VOTING_PERIOD - - PROPOSAL_STATUS_PASSED - - PROPOSAL_STATUS_REJECTED - - PROPOSAL_STATUS_FAILED - default: PROPOSAL_STATUS_UNSPECIFIED - description: |- - ProposalStatus enumerates the valid statuses of a proposal. + format: int64 + proposer_priority: + type: string + format: int64 + description: Validator is the type for the validator-set. + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. - - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - period. - - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - period. - - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - passed. - - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - been rejected. - - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - failed. - final_tally_result: - type: object - properties: - 'yes': - type: string - abstain: - type: string - 'no': - type: string - no_with_veto: - type: string - description: TallyResult defines a standard tally for a governance proposal. - submit_time: + was set, its value is undefined otherwise + description: >- + GetValidatorSetByHeightResponse is the response type for the + Query/GetValidatorSetByHeight RPC method. + cosmos.base.tendermint.v1beta1.Module: + type: object + properties: + path: + type: string + title: module path + version: + type: string + title: module version + sum: + type: string + title: checksum + title: Module is the type for VersionInfo + cosmos.base.tendermint.v1beta1.Validator: + type: object + properties: + address: + type: string + pub_key: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above specified + type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + description: Validator is the type for the validator-set. + cosmos.base.tendermint.v1beta1.VersionInfo: + type: object + properties: + name: + type: string + app_name: + type: string + version: + type: string + git_commit: + type: string + build_tags: + type: string + go_version: + type: string + build_deps: + type: array + items: + type: object + properties: + path: type: string - format: date-time - deposit_end_time: + title: module path + version: type: string - format: date-time - total_deposit: - type: array - items: + title: module version + sum: + type: string + title: checksum + title: Module is the type for VersionInfo + description: VersionInfo is the type for the GetNodeInfoResponse message. + tendermint.crypto.PublicKey: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Tendermint Validators + tendermint.p2p.DefaultNodeInfo: + type: object + properties: + protocol_version: + type: object + properties: + p2p: + type: string + format: uint64 + block: + type: string + format: uint64 + app: + type: string + format: uint64 + default_node_id: + type: string + listen_addr: + type: string + network: + type: string + version: + type: string + channels: + type: string + format: byte + moniker: + type: string + other: + type: object + properties: + tx_index: + type: string + rpc_address: + type: string + tendermint.p2p.DefaultNodeInfoOther: + type: object + properties: + tx_index: + type: string + rpc_address: + type: string + tendermint.p2p.ProtocolVersion: + type: object + properties: + p2p: + type: string + format: uint64 + block: + type: string + format: uint64 + app: + type: string + format: uint64 + tendermint.types.Block: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block in + the blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: type: object properties: - denom: - type: string - amount: + total: + type: integer + format: int64 + hash: type: string - description: >- - 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. - voting_start_time: - type: string - format: date-time - voting_end_time: - type: string - format: date-time - description: Proposal defines the core field members of a governance proposal. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: type: string format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: + title: hashes of block data + data_hash: type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: |- - QueryProposalsResponse is the response type for the Query/Proposals RPC - method. - cosmos.gov.v1beta1.QueryTallyResultResponse: - type: object - properties: - tally: - type: object - properties: - 'yes': + format: byte + validators_hash: type: string - abstain: + format: byte + title: hashes from the app output from the prev block + next_validators_hash: type: string - 'no': + format: byte + consensus_hash: type: string - no_with_veto: + format: byte + app_hash: type: string - description: TallyResult defines a standard tally for a governance proposal. - description: >- - QueryTallyResultResponse is the response type for the Query/Tally RPC - method. - cosmos.gov.v1beta1.QueryVoteResponse: - type: object - properties: - vote: - type: object - properties: - proposal_id: + format: byte + last_results_hash: type: string - format: uint64 - voter: + format: byte + evidence_hash: type: string - option: + format: byte + title: consensus info + proposer_address: type: string - enum: - - VOTE_OPTION_UNSPECIFIED - - VOTE_OPTION_YES - - VOTE_OPTION_ABSTAIN - - VOTE_OPTION_NO - - VOTE_OPTION_NO_WITH_VETO - default: VOTE_OPTION_UNSPECIFIED - description: >- - VoteOption enumerates the valid vote options for a given - governance proposal. - - - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. - description: |- - Vote defines a vote on a governance proposal. - A Vote consists of a proposal ID, the voter, and the vote option. - description: QueryVoteResponse is the response type for the Query/Vote RPC method. - cosmos.gov.v1beta1.QueryVotesResponse: - type: object - properties: - votes: - type: array - items: - type: object - properties: - proposal_id: - type: string - format: uint64 - voter: - type: string - option: + format: byte + description: Header defines the structure of a Tendermint block header. + data: + type: object + properties: + txs: + type: array + items: type: string - enum: - - VOTE_OPTION_UNSPECIFIED - - VOTE_OPTION_YES - - VOTE_OPTION_ABSTAIN - - VOTE_OPTION_NO - - VOTE_OPTION_NO_WITH_VETO - default: VOTE_OPTION_UNSPECIFIED - description: >- - VoteOption enumerates the valid vote options for a given - governance proposal. + format: byte + description: >- + Txs that will be applied by state @ block.Height+1. - - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. - description: |- - Vote defines a vote on a governance proposal. - A Vote consists of a proposal ID, the voter, and the vote option. - description: votes defined the queried votes. - pagination: - description: pagination defines the pagination in the response. + NOTE: not all txs here are valid. We're just agreeing on the + order first. + + This means that block.AppHash does not include these txs. + title: Data contains the set of transactions included in the block + evidence: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote represents a prevote, precommit, or commit vote + from validators for + + consensus. + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote represents a prevote, precommit, or commit vote + from validators for + + consensus. + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + DuplicateVoteEvidence contains evidence of a validator + signed two conflicting votes. + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for + processing a block in the blockchain, + + including all blockchain data structures and + the rules of the application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: >- + hashes from the app output from the prev + block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: >- + Header defines the structure of a Tendermint + block header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: >- + BlockIdFlag indicates which BlcokID the + signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: >- + CommitSig is a part of the Vote included + in a Commit. + description: >- + Commit contains the evidence that a block was + committed by a set of validators. + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for + use with Tendermint Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use + with Tendermint Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with + Tendermint Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + LightClientAttackEvidence contains evidence of a set of + validators attempting to mislead a light client. + last_commit: type: object properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: + height: type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: QueryVotesResponse is the response type for the Query/Votes RPC method. - cosmos.gov.v1beta1.TallyParams: - type: object - properties: - quorum: - type: string - format: byte - description: |- - Minimum percentage of total stake needed to vote for a result to be - considered valid. - threshold: - type: string - format: byte - description: >- - Minimum proportion of Yes votes for proposal to pass. Default value: - 0.5. - veto_threshold: - type: string - format: byte - description: |- - Minimum value of Veto votes to Total votes ratio for proposal to be - vetoed. Default value: 1/3. - description: TallyParams defines the params for tallying votes on governance proposals. - cosmos.gov.v1beta1.TallyResult: - type: object - properties: - 'yes': - type: string - abstain: - type: string - 'no': - type: string - no_with_veto: - type: string - description: TallyResult defines a standard tally for a governance proposal. - cosmos.gov.v1beta1.Vote: - type: object - properties: - proposal_id: - type: string - format: uint64 - voter: - type: string - option: - type: string - enum: - - VOTE_OPTION_UNSPECIFIED - - VOTE_OPTION_YES - - VOTE_OPTION_ABSTAIN - - VOTE_OPTION_NO - - VOTE_OPTION_NO_WITH_VETO - default: VOTE_OPTION_UNSPECIFIED + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: BlockIdFlag indicates which BlcokID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. description: >- - VoteOption enumerates the valid vote options for a given governance - proposal. - - - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. - description: |- - Vote defines a vote on a governance proposal. - A Vote consists of a proposal ID, the voter, and the vote option. - cosmos.gov.v1beta1.VoteOption: - type: string - enum: - - VOTE_OPTION_UNSPECIFIED - - VOTE_OPTION_YES - - VOTE_OPTION_ABSTAIN - - VOTE_OPTION_NO - - VOTE_OPTION_NO_WITH_VETO - default: VOTE_OPTION_UNSPECIFIED - description: >- - VoteOption enumerates the valid vote options for a given governance - proposal. - - - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. - cosmos.gov.v1beta1.VotingParams: - type: object - properties: - voting_period: - type: string - description: Length of the voting period. - description: VotingParams defines the params for voting on governance proposals. - cosmos.mint.v1beta1.Params: - type: object - properties: - mint_denom: - type: string - title: type of coin to mint - inflation_rate_change: - type: string - title: maximum annual change in inflation rate - inflation_max: - type: string - title: maximum inflation rate - inflation_min: - type: string - title: minimum inflation rate - goal_bonded: - type: string - title: goal of percent bonded atoms - blocks_per_year: - type: string - format: uint64 - title: expected blocks per year - description: Params holds parameters for the mint module. - cosmos.mint.v1beta1.QueryAnnualProvisionsResponse: - type: object - properties: - annual_provisions: - type: string - format: byte - description: annual_provisions is the current minting annual provisions value. - description: |- - QueryAnnualProvisionsResponse is the response type for the - Query/AnnualProvisions RPC method. - cosmos.mint.v1beta1.QueryInflationResponse: - type: object - properties: - inflation: - type: string - format: byte - description: inflation is the current minting inflation value. - description: |- - QueryInflationResponse is the response type for the Query/Inflation RPC - method. - cosmos.mint.v1beta1.QueryParamsResponse: - type: object - properties: - params: - description: params defines the parameters of the module. - type: object - properties: - mint_denom: - type: string - title: type of coin to mint - inflation_rate_change: - type: string - title: maximum annual change in inflation rate - inflation_max: - type: string - title: maximum inflation rate - inflation_min: - type: string - title: minimum inflation rate - goal_bonded: - type: string - title: goal of percent bonded atoms - blocks_per_year: - type: string - format: uint64 - title: expected blocks per year - description: QueryParamsResponse is the response type for the Query/Params RPC method. - cosmos.params.v1beta1.ParamChange: - type: object - properties: - subspace: - type: string - key: - type: string - value: - type: string - description: |- - ParamChange defines an individual parameter change, for use in - ParameterChangeProposal. - cosmos.params.v1beta1.QueryParamsResponse: - type: object - properties: - param: - description: param defines the queried parameter. - type: object - properties: - subspace: - type: string - key: - type: string - value: - type: string - description: QueryParamsResponse is response type for the Query/Params RPC method. - cosmos.slashing.v1beta1.Params: + Commit contains the evidence that a block was committed by a set of + validators. + tendermint.types.BlockID: type: object properties: - signed_blocks_window: - type: string - format: int64 - min_signed_per_window: - type: string - format: byte - downtime_jail_duration: - type: string - slash_fraction_double_sign: - type: string - format: byte - slash_fraction_downtime: + hash: type: string format: byte - description: Params represents the parameters used for by the slashing module. - cosmos.slashing.v1beta1.QueryParamsResponse: - type: object - properties: - params: - type: object - properties: - signed_blocks_window: - type: string - format: int64 - min_signed_per_window: - type: string - format: byte - downtime_jail_duration: - type: string - slash_fraction_double_sign: - type: string - format: byte - slash_fraction_downtime: - type: string - format: byte - description: Params represents the parameters used for by the slashing module. - title: QueryParamsResponse is the response type for the Query/Params RPC method - cosmos.slashing.v1beta1.QuerySigningInfoResponse: - type: object - properties: - val_signing_info: + part_set_header: type: object properties: - address: - type: string - start_height: - type: string - format: int64 - title: height at which validator was first a candidate OR was unjailed - index_offset: - type: string - format: int64 - title: index offset into signed block bit array - jailed_until: - type: string - format: date-time - title: timestamp validator cannot be unjailed until - tombstoned: - type: boolean - format: boolean - title: >- - whether or not a validator has been tombstoned (killed out of - validator - - set) - missed_blocks_counter: - type: string + total: + type: integer format: int64 - title: missed blocks counter (to avoid scanning the array every time) - description: >- - ValidatorSigningInfo defines a validator's signing info for monitoring - their - - liveness activity. - title: val_signing_info is the signing info of requested val cons address - title: >- - QuerySigningInfoResponse is the response type for the Query/SigningInfo - RPC - - method - cosmos.slashing.v1beta1.QuerySigningInfosResponse: - type: object - properties: - info: - type: array - items: - type: object - properties: - address: - type: string - start_height: - type: string - format: int64 - title: height at which validator was first a candidate OR was unjailed - index_offset: - type: string - format: int64 - title: index offset into signed block bit array - jailed_until: - type: string - format: date-time - title: timestamp validator cannot be unjailed until - tombstoned: - type: boolean - format: boolean - title: >- - whether or not a validator has been tombstoned (killed out of - validator - - set) - missed_blocks_counter: - type: string - format: int64 - title: missed blocks counter (to avoid scanning the array every time) - description: >- - ValidatorSigningInfo defines a validator's signing info for - monitoring their - - liveness activity. - title: info is the signing info of all validators - pagination: - type: object - properties: - next_key: + hash: type: string format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: |- - 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; - } - title: >- - QuerySigningInfosResponse is the response type for the Query/SigningInfos - RPC - - method - cosmos.slashing.v1beta1.ValidatorSigningInfo: - type: object - properties: - address: - type: string - start_height: - type: string - format: int64 - title: height at which validator was first a candidate OR was unjailed - index_offset: - type: string - format: int64 - title: index offset into signed block bit array - jailed_until: - type: string - format: date-time - title: timestamp validator cannot be unjailed until - tombstoned: - type: boolean - format: boolean - title: >- - whether or not a validator has been tombstoned (killed out of - validator - - set) - missed_blocks_counter: - type: string - format: int64 - title: missed blocks counter (to avoid scanning the array every time) - description: >- - ValidatorSigningInfo defines a validator's signing info for monitoring - their - - liveness activity. - cosmos.staking.v1beta1.BondStatus: + title: PartsetHeader + title: BlockID + tendermint.types.BlockIDFlag: type: string enum: - - BOND_STATUS_UNSPECIFIED - - BOND_STATUS_UNBONDED - - BOND_STATUS_UNBONDING - - BOND_STATUS_BONDED - default: BOND_STATUS_UNSPECIFIED - description: |- - BondStatus is the status of a validator. - - - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. - - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. - - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. - - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. - cosmos.staking.v1beta1.Commission: - type: object - properties: - commission_rates: - description: >- - commission_rates defines the initial commission rates to be used for - creating a validator. - type: object - properties: - rate: - type: string - description: 'rate is the commission rate charged to delegators, as a fraction.' - max_rate: - type: string - description: >- - max_rate defines the maximum commission rate which validator can - ever charge, as a fraction. - max_change_rate: - type: string - description: >- - max_change_rate defines the maximum daily increase of the - validator commission, as a fraction. - update_time: - type: string - format: date-time - description: update_time is the last time the commission rate was changed. - description: Commission defines commission parameters for a given validator. - cosmos.staking.v1beta1.CommissionRates: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: BlockIdFlag indicates which BlcokID the signature is for + tendermint.types.Commit: type: object properties: - rate: - type: string - description: 'rate is the commission rate charged to delegators, as a fraction.' - max_rate: - type: string - description: >- - max_rate defines the maximum commission rate which validator can ever - charge, as a fraction. - max_change_rate: + height: type: string - description: >- - max_change_rate defines the maximum daily increase of the validator - commission, as a fraction. + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: BlockIdFlag indicates which BlcokID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. description: >- - CommissionRates defines the initial commission rates to be used for - creating - - a validator. - cosmos.staking.v1beta1.Delegation: + Commit contains the evidence that a block was committed by a set of + validators. + tendermint.types.CommitSig: type: object properties: - delegator_address: + block_id_flag: type: string - description: delegator_address is the bech32-encoded address of the delegator. + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: BlockIdFlag indicates which BlcokID the signature is for validator_address: type: string - description: validator_address is the bech32-encoded address of the validator. - shares: + format: byte + timestamp: type: string - description: shares define the delegation shares received. - description: |- - 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. - cosmos.staking.v1beta1.DelegationResponse: + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + tendermint.types.Data: type: object properties: - delegation: + txs: + type: array + items: + type: string + format: byte + description: >- + Txs that will be applied by state @ block.Height+1. + + NOTE: not all txs here are valid. We're just agreeing on the order + first. + + This means that block.AppHash does not include these txs. + title: Data contains the set of transactions included in the block + tendermint.types.DuplicateVoteEvidence: + type: object + properties: + vote_a: type: object properties: - delegator_address: + type: type: string - description: delegator_address is the bech32-encoded address of the delegator. + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + timestamp: + type: string + format: date-time validator_address: type: string - description: validator_address is the bech32-encoded address of the validator. - shares: + format: byte + validator_index: + type: integer + format: int32 + signature: type: string - description: shares define the delegation shares received. - description: |- - 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. - balance: + format: byte + description: >- + Vote represents a prevote, precommit, or commit vote from validators + for + + consensus. + vote_b: type: object properties: - denom: - type: string - amount: + type: type: string - description: |- - Coin defines a token with a denomination and an amount. + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - description: |- - DelegationResponse is equivalent to Delegation except that it contains a - balance in addition to shares which is more suitable for client responses. - cosmos.staking.v1beta1.Description: - type: object - properties: - moniker: - type: string - description: moniker defines a human-readable name for the validator. - identity: - type: string + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte description: >- - identity defines an optional identity signature (ex. UPort or - Keybase). - website: + Vote represents a prevote, precommit, or commit vote from validators + for + + consensus. + total_voting_power: type: string - description: website defines an optional website link. - security_contact: + format: int64 + validator_power: type: string - description: security_contact defines an optional email for security contact. - details: + format: int64 + timestamp: type: string - description: details define other optional details. - description: Description defines a validator description. - cosmos.staking.v1beta1.HistoricalInfo: + format: date-time + description: >- + DuplicateVoteEvidence contains evidence of a validator signed two + conflicting votes. + tendermint.types.Evidence: type: object properties: - header: + duplicate_vote_evidence: type: object properties: - version: - title: basic block info + vote_a: type: object properties: - block: + type: type: string - format: uint64 - app: + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: type: string - format: uint64 + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte description: >- - Consensus captures the consensus rules for processing a block in - the blockchain, + Vote represents a prevote, precommit, or commit vote from + validators for - including all blockchain data structures and the rules of the - application's + consensus. + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. - state transition machine. - chain_id: + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote represents a prevote, precommit, or commit vote from + validators for + + consensus. + total_voting_power: type: string - height: + format: int64 + validator_power: type: string format: int64 - time: + timestamp: type: string format: date-time - last_block_id: - title: prev block info + description: >- + DuplicateVoteEvidence contains evidence of a validator signed two + conflicting votes. + light_client_attack_evidence: + type: object + properties: + conflicting_block: type: object properties: - hash: - type: string - format: byte - part_set_header: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing + a block in the blockchain, + + including all blockchain data structures and the rules + of the application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: Header defines the structure of a Tendermint block header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: >- + BlockIdFlag indicates which BlcokID the + signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: >- + CommitSig is a part of the Vote included in a + Commit. + description: >- + Commit contains the evidence that a block was committed by + a set of validators. + validator_set: type: object properties: - total: - type: integer - format: int64 - hash: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with + Tendermint Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with + Tendermint Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: type: string - format: byte - title: PartsetHeader - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: hashes from the app output from the prev block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: + format: int64 + common_height: type: string - format: byte - evidence_hash: + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with Tendermint + Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: type: string - format: byte - title: consensus info - proposer_address: + format: int64 + timestamp: type: string - format: byte - description: Header defines the structure of a Tendermint block header. - valset: + format: date-time + description: >- + LightClientAttackEvidence contains evidence of a set of validators + attempting to mislead a light client. + tendermint.types.EvidenceList: + type: object + properties: + evidence: type: array items: type: object properties: - operator_address: - type: string - description: >- - operator_address defines the address of the validator's - operator; bech encoded in JSON. - consensus_pubkey: + duplicate_vote_evidence: type: object properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all - types that they - - expect it to use in the context of Any. However, for URLs - which use the - - scheme `http`, `https`, or no scheme, one can optionally set - up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning - with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. - used with implementation specific semantics. - value: - type: string - format: byte + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in - the form - - of utility functions or additional generated methods of the Any - type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default - use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the last - '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with an - - additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom JSON - - representation, that representation will be embedded adding a - field + Vote represents a prevote, precommit, or commit vote from + validators for - `value` which holds the custom JSON in addition to the `@type` + consensus. + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. - field. Example (for message [google.protobuf.Duration][]): + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote represents a prevote, precommit, or commit vote from + validators for - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - jailed: - type: boolean - format: boolean - description: >- - jailed defined whether the validator has been jailed from bonded - status or not. - status: - description: status is the validator status (bonded/unbonding/unbonded). - type: string - enum: - - BOND_STATUS_UNSPECIFIED - - BOND_STATUS_UNBONDED - - BOND_STATUS_UNBONDING - - BOND_STATUS_BONDED - default: BOND_STATUS_UNSPECIFIED - tokens: - type: string - description: tokens define the delegated tokens (incl. self-delegation). - delegator_shares: - type: string - description: >- - delegator_shares defines total shares issued to a validator's - delegators. - description: - description: description defines the description terms for the validator. - type: object - properties: - moniker: + consensus. + total_voting_power: type: string - description: moniker defines a human-readable name for the validator. - identity: + format: int64 + validator_power: type: string - description: >- - identity defines an optional identity signature (ex. UPort - or Keybase). - website: + format: int64 + timestamp: type: string - description: website defines an optional website link. - security_contact: + format: date-time + description: >- + DuplicateVoteEvidence contains evidence of a validator signed + two conflicting votes. + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for + processing a block in the blockchain, + + including all blockchain data structures and the + rules of the application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: >- + Header defines the structure of a Tendermint block + header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: >- + BlockIdFlag indicates which BlcokID the + signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: >- + CommitSig is a part of the Vote included in a + Commit. + description: >- + Commit contains the evidence that a block was + committed by a set of validators. + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use + with Tendermint Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use + with Tendermint Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + common_height: type: string - description: >- - security_contact defines an optional email for security - contact. - details: + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with + Tendermint Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: type: string - description: details define other optional details. - unbonding_height: - type: string - format: int64 - description: >- - unbonding_height defines, if unbonding, the height at which this - validator has begun unbonding. - unbonding_time: - type: string - format: date-time - description: >- - unbonding_time defines, if unbonding, the min time for the - validator to complete unbonding. - commission: - description: commission defines the commission parameters. - type: object - properties: - commission_rates: - description: >- - commission_rates defines the initial commission rates to be - used for creating a validator. - type: object - properties: - rate: - type: string - description: >- - rate is the commission rate charged to delegators, as a - fraction. - max_rate: - type: string - description: >- - max_rate defines the maximum commission rate which - validator can ever charge, as a fraction. - max_change_rate: - type: string - description: >- - max_change_rate defines the maximum daily increase of - the validator commission, as a fraction. - update_time: + format: int64 + timestamp: type: string format: date-time - description: >- - update_time is the last time the commission rate was - changed. - min_self_delegation: - type: string description: >- - min_self_delegation is the validator's self declared minimum - self delegation. - description: >- - 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. - description: >- - 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). - cosmos.staking.v1beta1.Params: + LightClientAttackEvidence contains evidence of a set of + validators attempting to mislead a light client. + tendermint.types.Header: type: object properties: - unbonding_time: - type: string - description: unbonding_time is the time duration of unbonding. - max_validators: - type: integer - format: int64 - description: max_validators is the maximum number of validators. - max_entries: - type: integer - format: int64 + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 description: >- - max_entries is the max entries for either unbonding delegation or - redelegation (per pair/trio). - historical_entries: - type: integer + Consensus captures the consensus rules for processing a block in the + blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. + chain_id: + type: string + height: + type: string format: int64 - description: historical_entries is the number of historical entries to persist. - bond_denom: + time: type: string - description: bond_denom defines the bondable coin denomination. - description: Params defines the parameters for the staking module. - cosmos.staking.v1beta1.Pool: - type: object - properties: - not_bonded_tokens: + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: type: string - bonded_tokens: + format: byte + title: hashes of block data + data_hash: type: string - description: |- - Pool is used for tracking bonded and not-bonded token supply of the bond - denomination. - cosmos.staking.v1beta1.QueryDelegationResponse: + format: byte + validators_hash: + type: string + format: byte + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: Header defines the structure of a Tendermint block header. + tendermint.types.LightBlock: type: object properties: - delegation_response: + signed_header: type: object properties: - delegation: + header: type: object properties: - delegator_address: - type: string - description: >- - delegator_address is the bech32-encoded address of the - delegator. - validator_address: - type: string + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 description: >- - validator_address is the bech32-encoded address of the - validator. - shares: - type: string - description: shares define the delegation shares received. - description: >- - Delegation represents the bond with tokens held by an account. It - is + Consensus captures the consensus rules for processing a block + in the blockchain, - owned by one delegator, and is associated with the voting power of - one + including all blockchain data structures and the rules of the + application's - validator. - balance: + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: Header defines the structure of a Tendermint block header. + commit: type: object properties: - denom: - type: string - amount: + height: type: string - description: >- - 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. - description: >- - DelegationResponse is equivalent to Delegation except that it contains - a - - balance in addition to shares which is more suitable for client - responses. - description: >- - QueryDelegationResponse is response type for the Query/Delegation RPC - method. - cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse: - type: object - properties: - delegation_responses: - type: array - items: - type: object - properties: - delegation: + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: BlockIdFlag indicates which BlcokID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: >- + Commit contains the evidence that a block was committed by a set + of validators. + validator_set: + type: object + properties: + validators: + type: array + items: type: object properties: - delegator_address: - type: string - description: >- - delegator_address is the bech32-encoded address of the - delegator. - validator_address: - type: string - description: >- - validator_address is the bech32-encoded address of the - validator. - shares: + address: type: string - description: shares define the delegation shares received. - description: >- - 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. - balance: - type: object - properties: - denom: + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with Tendermint + Validators + voting_power: type: string - amount: + format: int64 + proposer_priority: type: string - description: >- - 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. - description: >- - DelegationResponse is equivalent to Delegation except that it - contains a - - balance in addition to shares which is more suitable for client - responses. - description: delegation_responses defines all the delegations' info of a delegator. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: |- - QueryDelegatorDelegationsResponse is response type for the - Query/DelegatorDelegations RPC method. - cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse: - type: object - properties: - unbonding_responses: - type: array - items: - type: object - properties: - delegator_address: - type: string - description: >- - delegator_address is the bech32-encoded address of the - delegator. - validator_address: - type: string - description: >- - validator_address is the bech32-encoded address of the - validator. - entries: - type: array - items: + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: type: object properties: - creation_height: - type: string - format: int64 - description: >- - creation_height is the height which the unbonding took - place. - completion_time: - type: string - format: date-time - description: completion_time is the unix time for unbonding completion. - initial_balance: + ed25519: type: string - description: >- - initial_balance defines the tokens initially scheduled to - receive at completion. - balance: + format: byte + secp256k1: type: string - description: balance defines the tokens to receive at completion. - description: >- - UnbondingDelegationEntry defines an unbonding object with - relevant metadata. - description: entries are the unbonding delegation entries. - description: >- - UnbondingDelegation stores all of a single delegator's unbonding - bonds - - for a single validator in an time-ordered list. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: + format: byte + title: >- + PublicKey defines the keys available for use with Tendermint + Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: |- - QueryUnbondingDelegatorDelegationsResponse is response type for the - Query/UnbondingDelegatorDelegations RPC method. - cosmos.staking.v1beta1.QueryDelegatorValidatorResponse: + format: int64 + tendermint.types.LightClientAttackEvidence: type: object properties: - validator: + conflicting_block: type: object properties: - operator_address: - type: string - description: >- - operator_address defines the address of the validator's operator; - bech encoded in JSON. - consensus_pubkey: + signed_header: type: object properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all - types that they - - expect it to use in the context of Any. However, for URLs - which use the - - scheme `http`, `https`, or no scheme, one can optionally set - up a type - - server that maps type URLs to message definitions as follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning - with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) might - be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in the - form - - of utility functions or additional generated methods of the Any - type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with an - - additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom JSON - - representation, that representation will be embedded adding a - field - - `value` which holds the custom JSON in addition to the `@type` + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a + block in the blockchain, - field. Example (for message [google.protobuf.Duration][]): + including all blockchain data structures and the rules of + the application's - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - jailed: - type: boolean - format: boolean - description: >- - jailed defined whether the validator has been jailed from bonded - status or not. - status: - description: status is the validator status (bonded/unbonding/unbonded). - type: string - enum: - - BOND_STATUS_UNSPECIFIED - - BOND_STATUS_UNBONDED - - BOND_STATUS_UNBONDING - - BOND_STATUS_BONDED - default: BOND_STATUS_UNSPECIFIED - tokens: - type: string - description: tokens define the delegated tokens (incl. self-delegation). - delegator_shares: - type: string - description: >- - delegator_shares defines total shares issued to a validator's - delegators. - description: - description: description defines the description terms for the validator. - type: object - properties: - moniker: - type: string - description: moniker defines a human-readable name for the validator. - identity: - type: string - description: >- - identity defines an optional identity signature (ex. UPort or - Keybase). - website: - type: string - description: website defines an optional website link. - security_contact: - type: string + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: Header defines the structure of a Tendermint block header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: >- + BlockIdFlag indicates which BlcokID the signature is + for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. description: >- - security_contact defines an optional email for security - contact. - details: - type: string - description: details define other optional details. - unbonding_height: - type: string - format: int64 - description: >- - unbonding_height defines, if unbonding, the height at which this - validator has begun unbonding. - unbonding_time: - type: string - format: date-time - description: >- - unbonding_time defines, if unbonding, the min time for the - validator to complete unbonding. - commission: - description: commission defines the commission parameters. + Commit contains the evidence that a block was committed by a + set of validators. + validator_set: type: object properties: - commission_rates: - description: >- - commission_rates defines the initial commission rates to be - used for creating a validator. + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with + Tendermint Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: type: object properties: - rate: + address: type: string - description: >- - rate is the commission rate charged to delegators, as a - fraction. - max_rate: + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with + Tendermint Validators + voting_power: type: string - description: >- - max_rate defines the maximum commission rate which - validator can ever charge, as a fraction. - max_change_rate: + format: int64 + proposer_priority: type: string - description: >- - max_change_rate defines the maximum daily increase of the - validator commission, as a fraction. - update_time: + format: int64 + total_voting_power: type: string - format: date-time - description: update_time is the last time the commission rate was changed. - min_self_delegation: - type: string - description: >- - min_self_delegation is the validator's self declared minimum self - delegation. - description: >- - 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. - description: |- - QueryDelegatorValidatorResponse response type for the - Query/DelegatorValidator RPC method. - cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse: - type: object - properties: - validators: + format: int64 + common_height: + type: string + format: int64 + byzantine_validators: type: array items: type: object properties: - operator_address: + address: type: string - description: >- - operator_address defines the address of the validator's - operator; bech encoded in JSON. - consensus_pubkey: + format: byte + pub_key: type: object properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all - types that they - - expect it to use in the context of Any. However, for URLs - which use the - - scheme `http`, `https`, or no scheme, one can optionally set - up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning - with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - value: + ed25519: type: string format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in - the form - - of utility functions or additional generated methods of the Any - type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default - use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the last - '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with an - - additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom JSON - - representation, that representation will be embedded adding a - field - - `value` which holds the custom JSON in addition to the `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - jailed: - type: boolean - format: boolean - description: >- - jailed defined whether the validator has been jailed from bonded - status or not. - status: - description: status is the validator status (bonded/unbonding/unbonded). - type: string - enum: - - BOND_STATUS_UNSPECIFIED - - BOND_STATUS_UNBONDED - - BOND_STATUS_UNBONDING - - BOND_STATUS_BONDED - default: BOND_STATUS_UNSPECIFIED - tokens: - type: string - description: tokens define the delegated tokens (incl. self-delegation). - delegator_shares: - type: string - description: >- - delegator_shares defines total shares issued to a validator's - delegators. - description: - description: description defines the description terms for the validator. - type: object - properties: - moniker: - type: string - description: moniker defines a human-readable name for the validator. - identity: - type: string - description: >- - identity defines an optional identity signature (ex. UPort - or Keybase). - website: - type: string - description: website defines an optional website link. - security_contact: - type: string - description: >- - security_contact defines an optional email for security - contact. - details: + secp256k1: type: string - description: details define other optional details. - unbonding_height: + format: byte + title: >- + PublicKey defines the keys available for use with Tendermint + Validators + voting_power: type: string format: int64 - description: >- - unbonding_height defines, if unbonding, the height at which this - validator has begun unbonding. - unbonding_time: + proposer_priority: type: string - format: date-time - description: >- - unbonding_time defines, if unbonding, the min time for the - validator to complete unbonding. - commission: - description: commission defines the commission parameters. + format: int64 + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + LightClientAttackEvidence contains evidence of a set of validators + attempting to mislead a light client. + tendermint.types.PartSetHeader: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + tendermint.types.SignedHeader: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block in + the blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: Header defines the structure of a Tendermint block header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: type: object properties: - commission_rates: - description: >- - commission_rates defines the initial commission rates to be - used for creating a validator. - type: object - properties: - rate: - type: string - description: >- - rate is the commission rate charged to delegators, as a - fraction. - max_rate: - type: string - description: >- - max_rate defines the maximum commission rate which - validator can ever charge, as a fraction. - max_change_rate: - type: string - description: >- - max_change_rate defines the maximum daily increase of - the validator commission, as a fraction. - update_time: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: BlockIdFlag indicates which BlcokID the signature is for + validator_address: + type: string + format: byte + timestamp: type: string format: date-time - description: >- - update_time is the last time the commission rate was - changed. - min_self_delegation: - type: string - description: >- - min_self_delegation is the validator's self declared minimum - self delegation. - description: >- - 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 + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: >- + Commit contains the evidence that a block was committed by a set of + validators. + tendermint.types.SignedMsgType: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. - multiplied by exchange rate. - description: validators defines the the validators' info of a delegator. - pagination: - description: pagination defines the pagination in the response. + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + tendermint.types.Validator: + type: object + properties: + address: + type: string + format: byte + pub_key: type: object properties: - next_key: + ed25519: type: string format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: + secp256k1: type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: |- - QueryDelegatorValidatorsResponse is response type for the - Query/DelegatorValidators RPC method. - cosmos.staking.v1beta1.QueryHistoricalInfoResponse: + format: byte + title: >- + PublicKey defines the keys available for use with Tendermint + Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + tendermint.types.ValidatorSet: type: object properties: - hist: - description: hist defines the historical info at the given height. + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with Tendermint + Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: type: object properties: - header: + address: + type: string + format: byte + pub_key: type: object properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for processing a block - in the blockchain, - - including all blockchain data structures and the rules of the - application's - - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - title: prev block info - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: hashes from the app output from the prev block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: + ed25519: type: string format: byte - evidence_hash: + secp256k1: type: string format: byte - title: consensus info - proposer_address: + title: >- + PublicKey defines the keys available for use with Tendermint + Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + tendermint.types.Vote: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: type: string format: byte - description: Header defines the structure of a Tendermint block header. - valset: - type: array - items: - type: object - properties: - operator_address: - type: string - description: >- - operator_address defines the address of the validator's - operator; bech encoded in JSON. - consensus_pubkey: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - + title: PartsetHeader + title: BlockID + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: |- + Vote represents a prevote, precommit, or commit vote from validators for + consensus. + tendermint.version.Consensus: + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block in the + blockchain, - Protobuf library provides support to pack/unpack Any values - in the form + including all blockchain data structures and the rules of the + application's - of utility functions or additional generated methods of the - Any type. + state transition machine. + cosmos.base.v1beta1.DecCoin: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + 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. + cosmos.distribution.v1beta1.DelegationDelegatorReward: + type: object + properties: + validator_address: + type: string + reward: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. - Example 1: Pack and unpack a message in C++. + NOTE: The amount field is an Dec which implements the custom method + signatures required by gogoproto. + description: |- + DelegationDelegatorReward represents the properties + of a delegator's delegation reward. + cosmos.distribution.v1beta1.Params: + type: object + properties: + community_tax: + type: string + base_proposer_reward: + type: string + bonus_proposer_reward: + type: string + withdraw_addr_enabled: + type: boolean + format: boolean + description: Params defines the set of params for the distribution module. + cosmos.distribution.v1beta1.QueryCommunityPoolResponse: + type: object + properties: + pool: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + NOTE: The amount field is an Dec which implements the custom method + signatures required by gogoproto. + description: pool defines community pool's coins. + description: >- + QueryCommunityPoolResponse is the response type for the + Query/CommunityPool - Example 2: Pack and unpack a message in Java. + RPC method. + cosmos.distribution.v1beta1.QueryDelegationRewardsResponse: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + NOTE: The amount field is an Dec which implements the custom method + signatures required by gogoproto. + description: rewards defines the rewards accrued by a delegation. + description: |- + QueryDelegationRewardsResponse is the response type for the + Query/DelegationRewards RPC method. + cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + validator_address: + type: string + reward: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + DecCoin defines a token with a denomination and a decimal + amount. - Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + NOTE: The amount field is an Dec which implements the custom + method - Example 4: Pack and unpack a message in Go + signatures required by gogoproto. + description: |- + DelegationDelegatorReward represents the properties + of a delegator's delegation reward. + description: rewards defines all the rewards accrued by a delegator. + total: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } + NOTE: The amount field is an Dec which implements the custom method + signatures required by gogoproto. + description: total defines the sum of all the rewards. + description: |- + QueryDelegationTotalRewardsResponse is the response type for the + Query/DelegationTotalRewards RPC method. + cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse: + type: object + properties: + validators: + type: array + items: + type: string + description: validators defines the validators a delegator is delegating for. + description: |- + QueryDelegatorValidatorsResponse is the response type for the + Query/DelegatorValidators RPC method. + cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse: + type: object + properties: + withdraw_address: + type: string + description: withdraw_address defines the delegator address to query for. + description: |- + QueryDelegatorWithdrawAddressResponse is the response type for the + Query/DelegatorWithdrawAddress RPC method. + cosmos.distribution.v1beta1.QueryParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + community_tax: + type: string + base_proposer_reward: + type: string + bonus_proposer_reward: + type: string + withdraw_addr_enabled: + type: boolean + format: boolean + description: QueryParamsResponse is the response type for the Query/Params RPC method. + cosmos.distribution.v1beta1.QueryValidatorCommissionResponse: + type: object + properties: + commission: + description: commission defines the commision the validator received. + type: object + properties: + commission: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + DecCoin defines a token with a denomination and a decimal + amount. - The pack methods provided by protobuf library will by - default use - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + NOTE: The amount field is an Dec which implements the custom + method - methods only use the fully qualified type name after the - last '/' + signatures required by gogoproto. + title: |- + QueryValidatorCommissionResponse is the response type for the + Query/ValidatorCommission RPC method + cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse: + type: object + properties: + rewards: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + DecCoin defines a token with a denomination and a decimal + amount. - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - name "y.z". + NOTE: The amount field is an Dec which implements the custom + method + signatures required by gogoproto. + description: >- + ValidatorOutstandingRewards represents outstanding (un-withdrawn) + rewards + for a validator inexpensive to track, allows simple sanity checks. + description: |- + QueryValidatorOutstandingRewardsResponse is the response type for the + Query/ValidatorOutstandingRewards RPC method. + cosmos.distribution.v1beta1.QueryValidatorSlashesResponse: + type: object + properties: + slashes: + type: array + items: + type: object + properties: + validator_period: + type: string + format: uint64 + fraction: + type: string + description: |- + 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. + description: slashes defines the slashes the validator received. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - JSON + was set, its value is undefined otherwise + description: |- + QueryValidatorSlashesResponse is the response type for the + Query/ValidatorSlashes RPC method. + cosmos.distribution.v1beta1.ValidatorAccumulatedCommission: + type: object + properties: + commission: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + 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. + description: |- + ValidatorAccumulatedCommission represents accumulated commission + for a validator kept as a running counter, can be withdrawn at any time. + cosmos.distribution.v1beta1.ValidatorOutstandingRewards: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. - The JSON representation of an `Any` value uses the regular + NOTE: The amount field is an Dec which implements the custom method + signatures required by gogoproto. + description: |- + ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards + for a validator inexpensive to track, allows simple sanity checks. + cosmos.distribution.v1beta1.ValidatorSlashEvent: + type: object + properties: + validator_period: + type: string + format: uint64 + fraction: + type: string + description: |- + 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. + cosmos.evidence.v1beta1.QueryAllEvidenceResponse: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - representation of the deserialized, embedded message, with - an + protocol buffer message. This string must contain at least - additional field `@type` which contains the type URL. - Example: + one "/" character. The last segment of the URL's path must + represent - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + the fully qualified name of the type (as in - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + `path/google.protobuf.Duration`). The name should be in a + canonical form - If the embedded message type is well-known and has a custom - JSON + (e.g., leading "." is not accepted). - representation, that representation will be embedded adding - a field - `value` which holds the custom JSON in addition to the - `@type` + In practice, teams usually precompile into the binary all types + that they - field. Example (for message [google.protobuf.Duration][]): + expect it to use in the context of Any. However, for URLs which + use the - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - jailed: - type: boolean - format: boolean - description: >- - jailed defined whether the validator has been jailed from - bonded status or not. - status: - description: status is the validator status (bonded/unbonding/unbonded). - type: string - enum: - - BOND_STATUS_UNSPECIFIED - - BOND_STATUS_UNBONDED - - BOND_STATUS_UNBONDING - - BOND_STATUS_BONDED - default: BOND_STATUS_UNSPECIFIED - tokens: - type: string - description: tokens define the delegated tokens (incl. self-delegation). - delegator_shares: - type: string - description: >- - delegator_shares defines total shares issued to a - validator's delegators. - description: - description: description defines the description terms for the validator. - type: object - properties: - moniker: - type: string - description: moniker defines a human-readable name for the validator. - identity: - type: string - description: >- - identity defines an optional identity signature (ex. - UPort or Keybase). - website: - type: string - description: website defines an optional website link. - security_contact: - type: string - description: >- - security_contact defines an optional email for security - contact. - details: - type: string - description: details define other optional details. - unbonding_height: - type: string - format: int64 - description: >- - unbonding_height defines, if unbonding, the height at which - this validator has begun unbonding. - unbonding_time: - type: string - format: date-time - description: >- - unbonding_time defines, if unbonding, the min time for the - validator to complete unbonding. - commission: - description: commission defines the commission parameters. - type: object - properties: - commission_rates: - description: >- - commission_rates defines the initial commission rates to - be used for creating a validator. - type: object - properties: - rate: - type: string - description: >- - rate is the commission rate charged to delegators, - as a fraction. - max_rate: - type: string - description: >- - max_rate defines the maximum commission rate which - validator can ever charge, as a fraction. - max_change_rate: - type: string - description: >- - max_change_rate defines the maximum daily increase - of the validator commission, as a fraction. - update_time: - type: string - format: date-time - description: >- - update_time is the last time the commission rate was - changed. - min_self_delegation: - type: string - description: >- - min_self_delegation is the validator's self declared minimum - self delegation. - description: >- - Validator defines a validator, together with the total amount of - the + scheme `http`, `https`, or no scheme, one can optionally set up + a type - Validator's bond shares and their exchange rate to coins. - Slashing results in + server that maps type URLs to message definitions as follows: - a decrease in the exchange rate, allowing correct calculation of - future - undelegations without iterating over delegators. When coins are - delegated to + * If no scheme is provided, `https` is assumed. - this validator, the validator is credited with a delegation - whose number of + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - bond shares is based on the amount of coins delegated divided by - the current + Note: this functionality is not currently available in the + official - exchange rate. Voting power can be calculated as total bonded - shares + protobuf release, and it is not used for type URLs beginning + with - multiplied by exchange rate. - description: >- - QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo - RPC + type.googleapis.com. - method. - cosmos.staking.v1beta1.QueryParamsResponse: - type: object - properties: - params: - description: params holds all the parameters of this module. - type: object - properties: - unbonding_time: - type: string - description: unbonding_time is the time duration of unbonding. - max_validators: - type: integer - format: int64 - description: max_validators is the maximum number of validators. - max_entries: - type: integer - format: int64 - description: >- - max_entries is the max entries for either unbonding delegation or - redelegation (per pair/trio). - historical_entries: - type: integer - format: int64 - description: historical_entries is the number of historical entries to persist. - bond_denom: - type: string - description: bond_denom defines the bondable coin denomination. - description: QueryParamsResponse is response type for the Query/Params RPC method. - cosmos.staking.v1beta1.QueryPoolResponse: - type: object - properties: - pool: - description: pool defines the pool info. - type: object - properties: - not_bonded_tokens: - type: string - bonded_tokens: - type: string - description: QueryPoolResponse is response type for the Query/Pool RPC method. - cosmos.staking.v1beta1.QueryRedelegationsResponse: - type: object - properties: - redelegation_responses: - type: array - items: - type: object - properties: - redelegation: - type: object - properties: - delegator_address: - type: string - description: >- - delegator_address is the bech32-encoded address of the - delegator. - validator_src_address: - type: string - description: >- - validator_src_address is the validator redelegation source - operator address. - validator_dst_address: - type: string - description: >- - validator_dst_address is the validator redelegation - destination operator address. - entries: - type: array - items: - type: object - properties: - creation_height: - type: string - format: int64 - description: >- - creation_height defines the height which the - redelegation took place. - completion_time: - type: string - format: date-time - description: >- - completion_time defines the unix time for redelegation - completion. - initial_balance: - type: string - description: >- - initial_balance defines the initial balance when - redelegation started. - shares_dst: - type: string - description: >- - shares_dst is the amount of destination-validator - shares created by redelegation. - description: >- - RedelegationEntry defines a redelegation object with - relevant metadata. - description: entries are the redelegation entries. + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + value: + type: string + format: byte description: >- - Redelegation contains the list of a particular delegator's - redelegating bonds + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a - from a particular source validator to a particular destination - validator. - entries: - type: array - items: - type: object - properties: - redelegation_entry: - type: object - properties: - creation_height: - type: string - format: int64 - description: >- - creation_height defines the height which the - redelegation took place. - completion_time: - type: string - format: date-time - description: >- - completion_time defines the unix time for redelegation - completion. - initial_balance: - type: string - description: >- - initial_balance defines the initial balance when - redelegation started. - shares_dst: - type: string - description: >- - shares_dst is the amount of destination-validator - shares created by redelegation. - description: >- - RedelegationEntry defines a redelegation object with - relevant metadata. - balance: - type: string - description: >- - RedelegationEntryResponse is equivalent to a RedelegationEntry - except that it + URL that describes the type of the serialized message. - contains a balance in addition to shares which is more - suitable for client - responses. - description: >- - RedelegationResponse is equivalent to a Redelegation except that its - entries + Protobuf library provides support to pack/unpack Any values in the + form - contain a balance in addition to shares which is more suitable for - client + of utility functions or additional generated methods of the Any + type. - responses. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: evidence returns all evidences. pagination: description: pagination defines the pagination in the response. type: object @@ -48288,469 +45857,546 @@ definitions: was set, its value is undefined otherwise description: >- - QueryRedelegationsResponse is response type for the Query/Redelegations + QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC method. - cosmos.staking.v1beta1.QueryUnbondingDelegationResponse: + cosmos.evidence.v1beta1.QueryEvidenceResponse: type: object properties: - unbond: + evidence: type: object properties: - delegator_address: - type: string - description: delegator_address is the bech32-encoded address of the delegator. - validator_address: + type_url: type: string - description: validator_address is the bech32-encoded address of the validator. - entries: - type: array - items: - type: object - properties: - creation_height: - type: string - format: int64 - description: >- - creation_height is the height which the unbonding took - place. - completion_time: - type: string - format: date-time - description: completion_time is the unix time for unbonding completion. - initial_balance: - type: string - description: >- - initial_balance defines the tokens initially scheduled to - receive at completion. - balance: - type: string - description: balance defines the tokens to receive at completion. - description: >- - UnbondingDelegationEntry defines an unbonding object with - relevant metadata. - description: entries are the unbonding delegation entries. - description: |- - UnbondingDelegation stores all of a single delegator's unbonding bonds - for a single validator in an time-ordered list. - description: |- - QueryDelegationResponse is response type for the Query/UnbondingDelegation - RPC method. - cosmos.staking.v1beta1.QueryValidatorDelegationsResponse: - type: object - properties: - delegation_responses: - type: array - items: - type: object - properties: - delegation: - type: object - properties: - delegator_address: - type: string - description: >- - delegator_address is the bech32-encoded address of the - delegator. - validator_address: - type: string - description: >- - validator_address is the bech32-encoded address of the - validator. - shares: - type: string - description: shares define the delegation shares received. - description: >- - Delegation represents the bond with tokens held by an account. - It is + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - owned by one delegator, and is associated with the voting power - of one + protocol buffer message. This string must contain at least - validator. - balance: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. + one "/" character. The last segment of the URL's path must + represent + the fully qualified name of the type (as in - NOTE: The amount field is an Int which implements the custom - method + `path/google.protobuf.Duration`). The name should be in a + canonical form - signatures required by gogoproto. - description: >- - DelegationResponse is equivalent to Delegation except that it - contains a + (e.g., leading "." is not accepted). - balance in addition to shares which is more suitable for client - responses. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + value: type: string format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + description: >- + Must be a valid serialized protocol buffer of the above specified + type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a - was set, its value is undefined otherwise - title: |- - QueryValidatorDelegationsResponse is response type for the - Query/ValidatorDelegations RPC method - cosmos.staking.v1beta1.QueryValidatorResponse: + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: >- + QueryEvidenceResponse is the response type for the Query/Evidence RPC + method. + cosmos.gov.v1beta1.Deposit: type: object properties: - validator: + proposal_id: + type: string + format: uint64 + depositor: + type: string + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + 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. + description: |- + Deposit defines an amount deposited by an account address to an active + proposal. + cosmos.gov.v1beta1.DepositParams: + type: object + properties: + min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + 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. + description: Minimum deposit for a proposal to enter voting period. + max_deposit_period: + type: string + description: >- + Maximum period for Atom holders to deposit on a proposal. Initial + value: 2 + months. + description: DepositParams defines the params for deposits on governance proposals. + cosmos.gov.v1beta1.Proposal: + type: object + properties: + proposal_id: + type: string + format: uint64 + content: type: object properties: - operator_address: + type_url: type: string description: >- - operator_address defines the address of the validator's operator; - bech encoded in JSON. - consensus_pubkey: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + A URL/resource name that uniquely identifies the type of the + serialized - protocol buffer message. This string must contain at least + protocol buffer message. This string must contain at least - one "/" character. The last segment of the URL's path must - represent + one "/" character. The last segment of the URL's path must + represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in a - canonical form + `path/google.protobuf.Duration`). The name should be in a + canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary all - types that they + In practice, teams usually precompile into the binary all types + that they - expect it to use in the context of Any. However, for URLs - which use the + expect it to use in the context of Any. However, for URLs which + use the - scheme `http`, `https`, or no scheme, one can optionally set - up a type + scheme `http`, `https`, or no scheme, one can optionally set up a + type - server that maps type URLs to message definitions as follows: + server that maps type URLs to message definitions as follows: - * If no scheme is provided, `https` is assumed. + * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Note: this functionality is not currently available in the - official + Note: this functionality is not currently available in the + official - protobuf release, and it is not used for type URLs beginning - with + protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. - Schemes other than `http`, `https` (or the empty scheme) might - be + Schemes other than `http`, `https` (or the empty scheme) might be - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. + used with implementation specific semantics. + value: + type: string + format: byte description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a + Must be a valid serialized protocol buffer of the above specified + type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a - URL that describes the type of the serialized message. + URL that describes the type of the serialized message. - Protobuf library provides support to pack/unpack Any values in the - form + Protobuf library provides support to pack/unpack Any values in the + form - of utility functions or additional generated methods of the Any - type. + of utility functions or additional generated methods of the Any type. - Example 1: Pack and unpack a message in C++. + Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - Example 2: Pack and unpack a message in Java. + Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } - The pack methods provided by protobuf library will by default use + The pack methods provided by protobuf library will by default use - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + 'type.googleapis.com/full.type.name' as the type URL and the unpack - methods only use the fully qualified type name after the last '/' + methods only use the fully qualified type name after the last '/' - in the type URL, for example "foo.bar.com/x/y.z" will yield type + in the type URL, for example "foo.bar.com/x/y.z" will yield type - name "y.z". + name "y.z". - JSON + JSON - ==== + ==== - The JSON representation of an `Any` value uses the regular + The JSON representation of an `Any` value uses the regular - representation of the deserialized, embedded message, with an + representation of the deserialized, embedded message, with an - additional field `@type` which contains the type URL. Example: + additional field `@type` which contains the type URL. Example: - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - If the embedded message type is well-known and has a custom JSON + If the embedded message type is well-known and has a custom JSON - representation, that representation will be embedded adding a - field + representation, that representation will be embedded adding a field - `value` which holds the custom JSON in addition to the `@type` + `value` which holds the custom JSON in addition to the `@type` - field. Example (for message [google.protobuf.Duration][]): + field. Example (for message [google.protobuf.Duration][]): - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - jailed: - type: boolean - format: boolean - description: >- - jailed defined whether the validator has been jailed from bonded - status or not. - status: - description: status is the validator status (bonded/unbonding/unbonded). - type: string - enum: - - BOND_STATUS_UNSPECIFIED - - BOND_STATUS_UNBONDED - - BOND_STATUS_UNBONDING - - BOND_STATUS_BONDED - default: BOND_STATUS_UNSPECIFIED - tokens: - type: string - description: tokens define the delegated tokens (incl. self-delegation). - delegator_shares: + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + status: + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + description: |- + ProposalStatus enumerates the valid statuses of a proposal. + + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit + period. + - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting + period. + - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has + passed. + - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has + been rejected. + - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has + failed. + final_tally_result: + type: object + properties: + 'yes': type: string - description: >- - delegator_shares defines total shares issued to a validator's - delegators. - description: - description: description defines the description terms for the validator. - type: object - properties: - moniker: - type: string - description: moniker defines a human-readable name for the validator. - identity: - type: string - description: >- - identity defines an optional identity signature (ex. UPort or - Keybase). - website: - type: string - description: website defines an optional website link. - security_contact: - type: string - description: >- - security_contact defines an optional email for security - contact. - details: - type: string - description: details define other optional details. - unbonding_height: + abstain: type: string - format: int64 - description: >- - unbonding_height defines, if unbonding, the height at which this - validator has begun unbonding. - unbonding_time: + 'no': type: string - format: date-time - description: >- - unbonding_time defines, if unbonding, the min time for the - validator to complete unbonding. - commission: - description: commission defines the commission parameters. - type: object - properties: - commission_rates: - description: >- - commission_rates defines the initial commission rates to be - used for creating a validator. - type: object - properties: - rate: - type: string - description: >- - rate is the commission rate charged to delegators, as a - fraction. - max_rate: - type: string - description: >- - max_rate defines the maximum commission rate which - validator can ever charge, as a fraction. - max_change_rate: - type: string - description: >- - max_change_rate defines the maximum daily increase of the - validator commission, as a fraction. - update_time: - type: string - format: date-time - description: update_time is the last time the commission rate was changed. - min_self_delegation: + no_with_veto: type: string - description: >- - min_self_delegation is the validator's self declared minimum self - delegation. - description: >- - 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 + description: TallyResult defines a standard tally for a governance proposal. + submit_time: + type: string + format: date-time + deposit_end_time: + type: string + format: date-time + total_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. - undelegations without iterating over delegators. When coins are - delegated to + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + voting_start_time: + type: string + format: date-time + voting_end_time: + type: string + format: date-time + description: Proposal defines the core field members of a governance proposal. + cosmos.gov.v1beta1.ProposalStatus: + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + description: |- + ProposalStatus enumerates the valid statuses of a proposal. - this validator, the validator is credited with a delegation whose - number of + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit + period. + - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting + period. + - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has + passed. + - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has + been rejected. + - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has + failed. + cosmos.gov.v1beta1.QueryDepositResponse: + type: object + properties: + deposit: + type: object + properties: + proposal_id: + type: string + format: uint64 + depositor: + type: string + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. - 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 + NOTE: The amount field is an Int which implements the custom + method - multiplied by exchange rate. - title: QueryValidatorResponse is response type for the Query/Validator RPC method - cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse: + signatures required by gogoproto. + description: |- + Deposit defines an amount deposited by an account address to an active + proposal. + description: >- + QueryDepositResponse is the response type for the Query/Deposit RPC + method. + cosmos.gov.v1beta1.QueryDepositsResponse: type: object properties: - unbonding_responses: + deposits: type: array items: type: object properties: - delegator_address: + proposal_id: type: string - description: >- - delegator_address is the bech32-encoded address of the - delegator. - validator_address: + format: uint64 + depositor: type: string - description: >- - validator_address is the bech32-encoded address of the - validator. - entries: + amount: type: array items: type: object properties: - creation_height: - type: string - format: int64 - description: >- - creation_height is the height which the unbonding took - place. - completion_time: - type: string - format: date-time - description: completion_time is the unix time for unbonding completion. - initial_balance: + denom: type: string - description: >- - initial_balance defines the tokens initially scheduled to - receive at completion. - balance: + amount: type: string - description: balance defines the tokens to receive at completion. description: >- - UnbondingDelegationEntry defines an unbonding object with - relevant metadata. - description: entries are the unbonding delegation entries. + 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. description: >- - UnbondingDelegation stores all of a single delegator's unbonding - bonds + Deposit defines an amount deposited by an account address to an + active - for a single validator in an time-ordered list. + proposal. pagination: description: pagination defines the pagination in the response. type: object @@ -48769,1848 +46415,1917 @@ definitions: PageRequest.count_total was set, its value is undefined otherwise - description: |- - QueryValidatorUnbondingDelegationsResponse is response type for the - Query/ValidatorUnbondingDelegations RPC method. - cosmos.staking.v1beta1.QueryValidatorsResponse: + description: >- + QueryDepositsResponse is the response type for the Query/Deposits RPC + method. + cosmos.gov.v1beta1.QueryParamsResponse: + type: object + properties: + voting_params: + description: voting_params defines the parameters related to voting. + type: object + properties: + voting_period: + type: string + description: Length of the voting period. + deposit_params: + description: deposit_params defines the parameters related to deposit. + type: object + properties: + min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + 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. + description: Minimum deposit for a proposal to enter voting period. + max_deposit_period: + type: string + description: >- + Maximum period for Atom holders to deposit on a proposal. Initial + value: 2 + months. + tally_params: + description: tally_params defines the parameters related to tally. + type: object + properties: + quorum: + type: string + format: byte + description: >- + Minimum percentage of total stake needed to vote for a result to + be + considered valid. + threshold: + type: string + format: byte + description: >- + Minimum proportion of Yes votes for proposal to pass. Default + value: 0.5. + veto_threshold: + type: string + format: byte + description: >- + Minimum value of Veto votes to Total votes ratio for proposal to + be + vetoed. Default value: 1/3. + description: QueryParamsResponse is the response type for the Query/Params RPC method. + cosmos.gov.v1beta1.QueryProposalResponse: type: object properties: - validators: - type: array - items: - type: object - properties: - operator_address: - type: string - description: >- - operator_address defines the address of the validator's - operator; bech encoded in JSON. - consensus_pubkey: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + proposal: + type: object + properties: + proposal_id: + type: string + format: uint64 + content: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - protocol buffer message. This string must contain at least + protocol buffer message. This string must contain at least - one "/" character. The last segment of the URL's path must - represent + one "/" character. The last segment of the URL's path must + represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in a - canonical form + `path/google.protobuf.Duration`). The name should be in a + canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary all - types that they + In practice, teams usually precompile into the binary all + types that they - expect it to use in the context of Any. However, for URLs - which use the + expect it to use in the context of Any. However, for URLs + which use the - scheme `http`, `https`, or no scheme, one can optionally set - up a type + scheme `http`, `https`, or no scheme, one can optionally set + up a type - server that maps type URLs to message definitions as - follows: + server that maps type URLs to message definitions as follows: - * If no scheme is provided, `https` is assumed. + * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Note: this functionality is not currently available in the - official + Note: this functionality is not currently available in the + official - protobuf release, and it is not used for type URLs beginning - with + protobuf release, and it is not used for type URLs beginning + with - type.googleapis.com. + type.googleapis.com. - Schemes other than `http`, `https` (or the empty scheme) - might be + Schemes other than `http`, `https` (or the empty scheme) might + be - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a - URL that describes the type of the serialized message. + URL that describes the type of the serialized message. - Protobuf library provides support to pack/unpack Any values in - the form + Protobuf library provides support to pack/unpack Any values in the + form - of utility functions or additional generated methods of the Any - type. + of utility functions or additional generated methods of the Any + type. - Example 1: Pack and unpack a message in C++. + Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { ... - if (any.UnpackTo(&foo)) { - ... - } + } - Example 2: Pack and unpack a message in Java. + Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default - use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the last - '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield type - - name "y.z". - - - - JSON - - ==== + } - The JSON representation of an `Any` value uses the regular + The pack methods provided by protobuf library will by default use - representation of the deserialized, embedded message, with an + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - additional field `@type` which contains the type URL. Example: + methods only use the fully qualified type name after the last '/' - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + in the type URL, for example "foo.bar.com/x/y.z" will yield type - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + name "y.z". - If the embedded message type is well-known and has a custom JSON - representation, that representation will be embedded adding a - field - `value` which holds the custom JSON in addition to the `@type` + JSON - field. Example (for message [google.protobuf.Duration][]): + ==== - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - jailed: - type: boolean - format: boolean - description: >- - jailed defined whether the validator has been jailed from bonded - status or not. - status: - description: status is the validator status (bonded/unbonding/unbonded). - type: string - enum: - - BOND_STATUS_UNSPECIFIED - - BOND_STATUS_UNBONDED - - BOND_STATUS_UNBONDING - - BOND_STATUS_BONDED - default: BOND_STATUS_UNSPECIFIED - tokens: - type: string - description: tokens define the delegated tokens (incl. self-delegation). - delegator_shares: - type: string - description: >- - delegator_shares defines total shares issued to a validator's - delegators. - description: - description: description defines the description terms for the validator. - type: object - properties: - moniker: - type: string - description: moniker defines a human-readable name for the validator. - identity: - type: string - description: >- - identity defines an optional identity signature (ex. UPort - or Keybase). - website: - type: string - description: website defines an optional website link. - security_contact: - type: string - description: >- - security_contact defines an optional email for security - contact. - details: - type: string - description: details define other optional details. - unbonding_height: - type: string - format: int64 - description: >- - unbonding_height defines, if unbonding, the height at which this - validator has begun unbonding. - unbonding_time: - type: string - format: date-time - description: >- - unbonding_time defines, if unbonding, the min time for the - validator to complete unbonding. - commission: - description: commission defines the commission parameters. - type: object - properties: - commission_rates: - description: >- - commission_rates defines the initial commission rates to be - used for creating a validator. - type: object - properties: - rate: - type: string - description: >- - rate is the commission rate charged to delegators, as a - fraction. - max_rate: - type: string - description: >- - max_rate defines the maximum commission rate which - validator can ever charge, as a fraction. - max_change_rate: - type: string - description: >- - max_change_rate defines the maximum daily increase of - the validator commission, as a fraction. - update_time: - type: string - format: date-time - description: >- - update_time is the last time the commission rate was - changed. - min_self_delegation: - type: string - description: >- - min_self_delegation is the validator's self declared minimum - self delegation. - description: >- - Validator defines a validator, together with the total amount of the + The JSON representation of an `Any` value uses the regular - Validator's bond shares and their exchange rate to coins. Slashing - results in + representation of the deserialized, embedded message, with an - a decrease in the exchange rate, allowing correct calculation of - future + additional field `@type` which contains the type URL. Example: - undelegations without iterating over delegators. When coins are - delegated to + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - this validator, the validator is credited with a delegation whose - number of + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - bond shares is based on the amount of coins delegated divided by the - current + If the embedded message type is well-known and has a custom JSON - exchange rate. Voting power can be calculated as total bonded shares + representation, that representation will be embedded adding a + field - multiplied by exchange rate. - description: validators contains all the queried validators. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + `value` which holds the custom JSON in addition to the `@type` - was set, its value is undefined otherwise - title: >- - QueryValidatorsResponse is response type for the Query/Validators RPC - method - cosmos.staking.v1beta1.Redelegation: - type: object - properties: - delegator_address: - type: string - description: delegator_address is the bech32-encoded address of the delegator. - validator_src_address: - type: string - description: >- - validator_src_address is the validator redelegation source operator - address. - validator_dst_address: - type: string - description: >- - validator_dst_address is the validator redelegation destination - operator address. - entries: - type: array - items: - type: object - properties: - creation_height: - type: string - format: int64 - description: >- - creation_height defines the height which the redelegation took - place. - completion_time: - type: string - format: date-time - description: >- - completion_time defines the unix time for redelegation - completion. - initial_balance: - type: string - description: >- - initial_balance defines the initial balance when redelegation - started. - shares_dst: - type: string - description: >- - shares_dst is the amount of destination-validator shares created - by redelegation. - description: >- - RedelegationEntry defines a redelegation object with relevant - metadata. - description: entries are the redelegation entries. - description: >- - Redelegation contains the list of a particular delegator's redelegating - bonds + field. Example (for message [google.protobuf.Duration][]): - from a particular source validator to a particular destination validator. - cosmos.staking.v1beta1.RedelegationEntry: - type: object - properties: - creation_height: - type: string - format: int64 - description: creation_height defines the height which the redelegation took place. - completion_time: - type: string - format: date-time - description: completion_time defines the unix time for redelegation completion. - initial_balance: - type: string - description: initial_balance defines the initial balance when redelegation started. - shares_dst: - type: string - description: >- - shares_dst is the amount of destination-validator shares created by - redelegation. - description: RedelegationEntry defines a redelegation object with relevant metadata. - cosmos.staking.v1beta1.RedelegationEntryResponse: - type: object - properties: - redelegation_entry: - type: object - properties: - creation_height: - type: string - format: int64 - description: >- - creation_height defines the height which the redelegation took - place. - completion_time: - type: string - format: date-time - description: completion_time defines the unix time for redelegation completion. - initial_balance: - type: string - description: >- - initial_balance defines the initial balance when redelegation - started. - shares_dst: + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + status: type: string - description: >- - shares_dst is the amount of destination-validator shares created - by redelegation. - description: >- - RedelegationEntry defines a redelegation object with relevant - metadata. - balance: - type: string - description: >- - RedelegationEntryResponse is equivalent to a RedelegationEntry except that - it - - contains a balance in addition to shares which is more suitable for client + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + description: |- + ProposalStatus enumerates the valid statuses of a proposal. - responses. - cosmos.staking.v1beta1.RedelegationResponse: - type: object - properties: - redelegation: - type: object - properties: - delegator_address: - type: string - description: delegator_address is the bech32-encoded address of the delegator. - validator_src_address: + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit + period. + - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting + period. + - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has + passed. + - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has + been rejected. + - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has + failed. + final_tally_result: + type: object + properties: + 'yes': + type: string + abstain: + type: string + 'no': + type: string + no_with_veto: + type: string + description: TallyResult defines a standard tally for a governance proposal. + submit_time: type: string - description: >- - validator_src_address is the validator redelegation source - operator address. - validator_dst_address: + format: date-time + deposit_end_time: type: string - description: >- - validator_dst_address is the validator redelegation destination - operator address. - entries: + format: date-time + total_deposit: type: array items: type: object properties: - creation_height: - type: string - format: int64 - description: >- - creation_height defines the height which the redelegation - took place. - completion_time: - type: string - format: date-time - description: >- - completion_time defines the unix time for redelegation - completion. - initial_balance: + denom: type: string - description: >- - initial_balance defines the initial balance when - redelegation started. - shares_dst: + amount: type: string - description: >- - shares_dst is the amount of destination-validator shares - created by redelegation. description: >- - RedelegationEntry defines a redelegation object with relevant - metadata. - description: entries are the redelegation entries. - description: >- - Redelegation contains the list of a particular delegator's - redelegating bonds + Coin defines a token with a denomination and an amount. - from a particular source validator to a particular destination - validator. - entries: + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + voting_start_time: + type: string + format: date-time + voting_end_time: + type: string + format: date-time + description: Proposal defines the core field members of a governance proposal. + description: >- + QueryProposalResponse is the response type for the Query/Proposal RPC + method. + cosmos.gov.v1beta1.QueryProposalsResponse: + type: object + properties: + proposals: type: array items: type: object properties: - redelegation_entry: + proposal_id: + type: string + format: uint64 + content: type: object properties: - creation_height: - type: string - format: int64 - description: >- - creation_height defines the height which the redelegation - took place. - completion_time: - type: string - format: date-time - description: >- - completion_time defines the unix time for redelegation - completion. - initial_balance: - type: string - description: >- - initial_balance defines the initial balance when - redelegation started. - shares_dst: + type_url: type: string description: >- - shares_dst is the amount of destination-validator shares - created by redelegation. - description: >- - RedelegationEntry defines a redelegation object with relevant - metadata. - balance: - type: string - description: >- - RedelegationEntryResponse is equivalent to a RedelegationEntry - except that it + A URL/resource name that uniquely identifies the type of the + serialized - contains a balance in addition to shares which is more suitable for - client + protocol buffer message. This string must contain at least - responses. - description: >- - RedelegationResponse is equivalent to a Redelegation except that its - entries + one "/" character. The last segment of the URL's path must + represent - contain a balance in addition to shares which is more suitable for client + the fully qualified name of the type (as in - responses. - cosmos.staking.v1beta1.UnbondingDelegation: - type: object - properties: - delegator_address: - type: string - description: delegator_address is the bech32-encoded address of the delegator. - validator_address: - type: string - description: validator_address is the bech32-encoded address of the validator. - entries: - type: array - items: - type: object - properties: - creation_height: - type: string - format: int64 - description: creation_height is the height which the unbonding took place. - completion_time: - type: string - format: date-time - description: completion_time is the unix time for unbonding completion. - initial_balance: - type: string - description: >- - initial_balance defines the tokens initially scheduled to - receive at completion. - balance: - type: string - description: balance defines the tokens to receive at completion. - description: >- - UnbondingDelegationEntry defines an unbonding object with relevant - metadata. - description: entries are the unbonding delegation entries. - description: |- - UnbondingDelegation stores all of a single delegator's unbonding bonds - for a single validator in an time-ordered list. - cosmos.staking.v1beta1.UnbondingDelegationEntry: - type: object - properties: - creation_height: - type: string - format: int64 - description: creation_height is the height which the unbonding took place. - completion_time: - type: string - format: date-time - description: completion_time is the unix time for unbonding completion. - initial_balance: - type: string - description: >- - initial_balance defines the tokens initially scheduled to receive at - completion. - balance: - type: string - description: balance defines the tokens to receive at completion. - description: >- - UnbondingDelegationEntry defines an unbonding object with relevant - metadata. - cosmos.staking.v1beta1.Validator: - type: object - properties: - operator_address: - type: string - description: >- - operator_address defines the address of the validator's operator; bech - encoded in JSON. - consensus_pubkey: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + `path/google.protobuf.Duration`). The name should be in a + canonical form - protocol buffer message. This string must contain at least + (e.g., leading "." is not accepted). - one "/" character. The last segment of the URL's path must - represent - the fully qualified name of the type (as in + In practice, teams usually precompile into the binary all + types that they - `path/google.protobuf.Duration`). The name should be in a - canonical form + expect it to use in the context of Any. However, for URLs + which use the - (e.g., leading "." is not accepted). + scheme `http`, `https`, or no scheme, one can optionally set + up a type + server that maps type URLs to message definitions as + follows: - In practice, teams usually precompile into the binary all types - that they - expect it to use in the context of Any. However, for URLs which - use the + * If no scheme is provided, `https` is assumed. - scheme `http`, `https`, or no scheme, one can optionally set up a - type + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - server that maps type URLs to message definitions as follows: + Note: this functionality is not currently available in the + official + protobuf release, and it is not used for type URLs beginning + with - * If no scheme is provided, `https` is assumed. + type.googleapis.com. - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - Note: this functionality is not currently available in the - official + Schemes other than `http`, `https` (or the empty scheme) + might be - protobuf release, and it is not used for type URLs beginning with + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a - type.googleapis.com. + URL that describes the type of the serialized message. - Schemes other than `http`, `https` (or the empty scheme) might be + Protobuf library provides support to pack/unpack Any values in + the form - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above specified - type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a + of utility functions or additional generated methods of the Any + type. - URL that describes the type of the serialized message. + Example 1: Pack and unpack a message in C++. - Protobuf library provides support to pack/unpack Any values in the - form + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - of utility functions or additional generated methods of the Any type. + Example 2: Pack and unpack a message in Java. + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Example 1: Pack and unpack a message in C++. + Example 3: Pack and unpack a message in Python. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - Example 2: Pack and unpack a message in Java. + Example 4: Pack and unpack a message in Go - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } - Example 3: Pack and unpack a message in Python. + The pack methods provided by protobuf library will by default + use - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - Example 4: Pack and unpack a message in Go + methods only use the fully qualified type name after the last + '/' - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } + in the type URL, for example "foo.bar.com/x/y.z" will yield type - The pack methods provided by protobuf library will by default use + name "y.z". - 'type.googleapis.com/full.type.name' as the type URL and the unpack - methods only use the fully qualified type name after the last '/' - in the type URL, for example "foo.bar.com/x/y.z" will yield type + JSON - name "y.z". + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an - JSON + additional field `@type` which contains the type URL. Example: - ==== + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - The JSON representation of an `Any` value uses the regular + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - representation of the deserialized, embedded message, with an + If the embedded message type is well-known and has a custom JSON - additional field `@type` which contains the type URL. Example: + representation, that representation will be embedded adding a + field - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + `value` which holds the custom JSON in addition to the `@type` - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + field. Example (for message [google.protobuf.Duration][]): - If the embedded message type is well-known and has a custom JSON + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + status: + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + description: |- + ProposalStatus enumerates the valid statuses of a proposal. - representation, that representation will be embedded adding a field + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit + period. + - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting + period. + - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has + passed. + - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has + been rejected. + - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has + failed. + final_tally_result: + type: object + properties: + 'yes': + type: string + abstain: + type: string + 'no': + type: string + no_with_veto: + type: string + description: TallyResult defines a standard tally for a governance proposal. + submit_time: + type: string + format: date-time + deposit_end_time: + type: string + format: date-time + total_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. - `value` which holds the custom JSON in addition to the `@type` - field. Example (for message [google.protobuf.Duration][]): + NOTE: The amount field is an Int which implements the custom + method - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - jailed: - type: boolean - format: boolean - description: >- - jailed defined whether the validator has been jailed from bonded - status or not. - status: - description: status is the validator status (bonded/unbonding/unbonded). - type: string - enum: - - BOND_STATUS_UNSPECIFIED - - BOND_STATUS_UNBONDED - - BOND_STATUS_UNBONDING - - BOND_STATUS_BONDED - default: BOND_STATUS_UNSPECIFIED - tokens: - type: string - description: tokens define the delegated tokens (incl. self-delegation). - delegator_shares: - type: string - description: >- - delegator_shares defines total shares issued to a validator's - delegators. - description: - description: description defines the description terms for the validator. + signatures required by gogoproto. + voting_start_time: + type: string + format: date-time + voting_end_time: + type: string + format: date-time + description: Proposal defines the core field members of a governance proposal. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + QueryProposalsResponse is the response type for the Query/Proposals RPC + method. + cosmos.gov.v1beta1.QueryTallyResultResponse: + type: object + properties: + tally: type: object properties: - moniker: - type: string - description: moniker defines a human-readable name for the validator. - identity: + 'yes': type: string - description: >- - identity defines an optional identity signature (ex. UPort or - Keybase). - website: + abstain: type: string - description: website defines an optional website link. - security_contact: + 'no': type: string - description: security_contact defines an optional email for security contact. - details: + no_with_veto: type: string - description: details define other optional details. - unbonding_height: - type: string - format: int64 - description: >- - unbonding_height defines, if unbonding, the height at which this - validator has begun unbonding. - unbonding_time: - type: string - format: date-time - description: >- - unbonding_time defines, if unbonding, the min time for the validator - to complete unbonding. - commission: - description: commission defines the commission parameters. + description: TallyResult defines a standard tally for a governance proposal. + description: >- + QueryTallyResultResponse is the response type for the Query/Tally RPC + method. + cosmos.gov.v1beta1.QueryVoteResponse: + type: object + properties: + vote: type: object properties: - commission_rates: - description: >- - commission_rates defines the initial commission rates to be used - for creating a validator. - type: object - properties: - rate: - type: string - description: >- - rate is the commission rate charged to delegators, as a - fraction. - max_rate: - type: string - description: >- - max_rate defines the maximum commission rate which validator - can ever charge, as a fraction. - max_change_rate: - type: string - description: >- - max_change_rate defines the maximum daily increase of the - validator commission, as a fraction. - update_time: + proposal_id: type: string - format: date-time - description: update_time is the last time the commission rate was changed. - min_self_delegation: - type: string - description: >- - min_self_delegation is the validator's self declared minimum self - delegation. - description: >- - 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 + format: uint64 + voter: + type: string + options: + type: array + items: + type: object + properties: + option: + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + description: >- + VoteOption enumerates the valid vote options for a given + governance proposal. - multiplied by exchange rate. - cosmos.base.abci.v1beta1.ABCIMessageLog: + - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. + - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. + - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. + - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + weight: + type: string + description: WeightedVoteOption defines a unit of vote for vote split. + description: |- + Vote defines a vote on a governance proposal. + A Vote consists of a proposal ID, the voter, and the vote option. + description: QueryVoteResponse is the response type for the Query/Vote RPC method. + cosmos.gov.v1beta1.QueryVotesResponse: type: object properties: - msg_index: - type: integer - format: int64 - log: - type: string - events: + votes: type: array items: type: object properties: - type: + proposal_id: type: string - attributes: + format: uint64 + voter: + type: string + options: type: array items: type: object properties: - key: - type: string - value: + option: type: string - description: >- - Attribute defines an attribute wrapper where the key and value - are + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + description: >- + VoteOption enumerates the valid vote options for a given + governance proposal. - strings instead of raw bytes. + - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. + - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. + - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. + - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + weight: + type: string + description: WeightedVoteOption defines a unit of vote for vote split. description: |- - StringEvent defines en Event object wrapper where all the attributes - contain key/value pairs that are strings instead of raw bytes. - description: |- - Events contains a slice of Event objects that were emitted during some - execution. - description: >- - ABCIMessageLog defines a structure containing an indexed tx ABCI message - log. - cosmos.base.abci.v1beta1.Attribute: + Vote defines a vote on a governance proposal. + A Vote consists of a proposal ID, the voter, and the vote option. + description: votes defined the queried votes. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: QueryVotesResponse is the response type for the Query/Votes RPC method. + cosmos.gov.v1beta1.TallyParams: type: object properties: - key: + quorum: type: string - value: + format: byte + description: |- + Minimum percentage of total stake needed to vote for a result to be + considered valid. + threshold: type: string - description: |- - Attribute defines an attribute wrapper where the key and value are - strings instead of raw bytes. - cosmos.base.abci.v1beta1.GasInfo: + format: byte + description: >- + Minimum proportion of Yes votes for proposal to pass. Default value: + 0.5. + veto_threshold: + type: string + format: byte + description: |- + Minimum value of Veto votes to Total votes ratio for proposal to be + vetoed. Default value: 1/3. + description: TallyParams defines the params for tallying votes on governance proposals. + cosmos.gov.v1beta1.TallyResult: type: object properties: - gas_wanted: + 'yes': type: string - format: uint64 - description: GasWanted is the maximum units of work we allow this tx to perform. - gas_used: + abstain: type: string - format: uint64 - description: GasUsed is the amount of gas actually consumed. - description: GasInfo defines tx execution gas context. - cosmos.base.abci.v1beta1.Result: + 'no': + type: string + no_with_veto: + type: string + description: TallyResult defines a standard tally for a governance proposal. + cosmos.gov.v1beta1.Vote: type: object properties: - data: + proposal_id: type: string - format: byte - description: >- - Data is any data returned from message or handler execution. It MUST - be - - length prefixed in order to separate data from multiple message - executions. - log: + format: uint64 + voter: type: string - description: Log contains the log information from message or handler execution. - events: + options: type: array items: type: object properties: - type: + option: type: string - attributes: - type: array - items: - type: object - properties: - key: - type: string - format: byte - value: - type: string - format: byte - index: - type: boolean - format: boolean - description: >- - EventAttribute is a single key-value pair, associated with an - event. - description: >- - Event allows application developers to attach additional information - to + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + description: >- + VoteOption enumerates the valid vote options for a given + governance proposal. - ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and - ResponseDeliverTx. + - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. + - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. + - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. + - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + weight: + type: string + description: WeightedVoteOption defines a unit of vote for vote split. + description: |- + Vote defines a vote on a governance proposal. + A Vote consists of a proposal ID, the voter, and the vote option. + cosmos.gov.v1beta1.VoteOption: + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + description: >- + VoteOption enumerates the valid vote options for a given governance + proposal. - Later, transactions may be queried using these events. + - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. + - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. + - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. + - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + cosmos.gov.v1beta1.VotingParams: + type: object + properties: + voting_period: + type: string + description: Length of the voting period. + description: VotingParams defines the params for voting on governance proposals. + cosmos.gov.v1beta1.WeightedVoteOption: + type: object + properties: + option: + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED description: >- - Events contains a slice of Event objects that were emitted during - message + VoteOption enumerates the valid vote options for a given governance + proposal. - or handler execution. - description: Result is the union of ResponseFormat and ResponseCheckTx. - cosmos.base.abci.v1beta1.StringEvent: + - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. + - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. + - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. + - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + weight: + type: string + description: WeightedVoteOption defines a unit of vote for vote split. + cosmos.mint.v1beta1.Params: type: object properties: - type: + mint_denom: type: string - attributes: - type: array - items: - type: object - properties: - key: - type: string - value: - type: string - description: |- - Attribute defines an attribute wrapper where the key and value are - strings instead of raw bytes. + title: type of coin to mint + inflation_rate_change: + type: string + title: maximum annual change in inflation rate + inflation_max: + type: string + title: maximum inflation rate + inflation_min: + type: string + title: minimum inflation rate + goal_bonded: + type: string + title: goal of percent bonded atoms + blocks_per_year: + type: string + format: uint64 + title: expected blocks per year + description: Params holds parameters for the mint module. + cosmos.mint.v1beta1.QueryAnnualProvisionsResponse: + type: object + properties: + annual_provisions: + type: string + format: byte + description: annual_provisions is the current minting annual provisions value. description: |- - StringEvent defines en Event object wrapper where all the attributes - contain key/value pairs that are strings instead of raw bytes. - cosmos.base.abci.v1beta1.TxResponse: + QueryAnnualProvisionsResponse is the response type for the + Query/AnnualProvisions RPC method. + cosmos.mint.v1beta1.QueryInflationResponse: type: object properties: - height: + inflation: type: string - format: int64 - title: The block height - txhash: + format: byte + description: inflation is the current minting inflation value. + description: |- + QueryInflationResponse is the response type for the Query/Inflation RPC + method. + cosmos.mint.v1beta1.QueryParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + mint_denom: + type: string + title: type of coin to mint + inflation_rate_change: + type: string + title: maximum annual change in inflation rate + inflation_max: + type: string + title: maximum inflation rate + inflation_min: + type: string + title: minimum inflation rate + goal_bonded: + type: string + title: goal of percent bonded atoms + blocks_per_year: + type: string + format: uint64 + title: expected blocks per year + description: QueryParamsResponse is the response type for the Query/Params RPC method. + cosmos.params.v1beta1.ParamChange: + type: object + properties: + subspace: type: string - description: The transaction hash. - codespace: + key: type: string - title: Namespace for the Code - code: - type: integer - format: int64 - description: Response code. - data: + value: type: string - description: 'Result bytes, if any.' - raw_log: + description: |- + ParamChange defines an individual parameter change, for use in + ParameterChangeProposal. + cosmos.params.v1beta1.QueryParamsResponse: + type: object + properties: + param: + description: param defines the queried parameter. + type: object + properties: + subspace: + type: string + key: + type: string + value: + type: string + description: QueryParamsResponse is response type for the Query/Params RPC method. + cosmos.slashing.v1beta1.Params: + type: object + properties: + signed_blocks_window: type: string - description: |- - The output of the application's logger (raw string). May be - non-deterministic. - logs: - type: array - items: - type: object - properties: - msg_index: - type: integer - format: int64 - log: - type: string - events: - type: array - items: - type: object - properties: - type: - type: string - attributes: - type: array - items: - type: object - properties: - key: - type: string - value: - type: string - description: >- - Attribute defines an attribute wrapper where the key and - value are - - strings instead of raw bytes. - description: >- - StringEvent defines en Event object wrapper where all the - attributes - - contain key/value pairs that are strings instead of raw bytes. - description: >- - Events contains a slice of Event objects that were emitted - during some - - execution. - description: >- - ABCIMessageLog defines a structure containing an indexed tx ABCI - message log. - description: >- - The output of the application's logger (typed). May be - non-deterministic. - info: + format: int64 + min_signed_per_window: type: string - description: Additional information. May be non-deterministic. - gas_wanted: + format: byte + downtime_jail_duration: + type: string + slash_fraction_double_sign: type: string - format: int64 - description: Amount of gas requested for transaction. - gas_used: + format: byte + slash_fraction_downtime: type: string - format: int64 - description: Amount of gas consumed by transaction. - tx: + format: byte + description: Params represents the parameters used for by the slashing module. + cosmos.slashing.v1beta1.QueryParamsResponse: + type: object + properties: + params: type: object properties: - type_url: + signed_blocks_window: type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all types - that they - - expect it to use in the context of Any. However, for URLs which - use the - - scheme `http`, `https`, or no scheme, one can optionally set up a - type - - server that maps type URLs to message definitions as follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) might be - - used with implementation specific semantics. - value: + format: int64 + min_signed_per_window: + type: string + format: byte + downtime_jail_duration: + type: string + slash_fraction_double_sign: + type: string + format: byte + slash_fraction_downtime: type: string format: byte + description: Params represents the parameters used for by the slashing module. + title: QueryParamsResponse is the response type for the Query/Params RPC method + cosmos.slashing.v1beta1.QuerySigningInfoResponse: + type: object + properties: + val_signing_info: + type: object + properties: + address: + type: string + start_height: + type: string + format: int64 + title: Height at which validator was first a candidate OR was unjailed + index_offset: + type: string + format: int64 description: >- - Must be a valid serialized protocol buffer of the above specified - type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in the - form - - of utility functions or additional generated methods of the Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default use - - 'type.googleapis.com/full.type.name' as the type URL and the unpack - - methods only use the fully qualified type name after the last '/' + Index which is incremented each time the validator was a bonded - in the type URL, for example "foo.bar.com/x/y.z" will yield type + in a block and may have signed a precommit or not. This in + conjunction with the - name "y.z". + `SignedBlocksWindow` param determines the index in the + `MissedBlocksBitArray`. + jailed_until: + type: string + format: date-time + description: >- + Timestamp until which the validator is jailed due to liveness + downtime. + tombstoned: + type: boolean + format: boolean + description: >- + 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. + missed_blocks_counter: + type: string + format: int64 + description: >- + A counter kept to avoid unnecessary array reads. + Note that `Sum(MissedBlocksBitArray)` always equals + `MissedBlocksCounter`. + description: >- + ValidatorSigningInfo defines a validator's signing info for monitoring + their - JSON + liveness activity. + title: val_signing_info is the signing info of requested val cons address + title: >- + QuerySigningInfoResponse is the response type for the Query/SigningInfo + RPC - ==== + method + cosmos.slashing.v1beta1.QuerySigningInfosResponse: + type: object + properties: + info: + type: array + items: + type: object + properties: + address: + type: string + start_height: + type: string + format: int64 + title: Height at which validator was first a candidate OR was unjailed + index_offset: + type: string + format: int64 + description: >- + Index which is incremented each time the validator was a bonded - The JSON representation of an `Any` value uses the regular + in a block and may have signed a precommit or not. This in + conjunction with the - representation of the deserialized, embedded message, with an + `SignedBlocksWindow` param determines the index in the + `MissedBlocksBitArray`. + jailed_until: + type: string + format: date-time + description: >- + Timestamp until which the validator is jailed due to liveness + downtime. + tombstoned: + type: boolean + format: boolean + description: >- + Whether or not a validator has been tombstoned (killed out of + validator set). It is set - additional field `@type` which contains the type URL. Example: + once the validator commits an equivocation or for any other + configured misbehiavor. + missed_blocks_counter: + type: string + format: int64 + description: >- + A counter kept to avoid unnecessary array reads. - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + Note that `Sum(MissedBlocksBitArray)` always equals + `MissedBlocksCounter`. + description: >- + ValidatorSigningInfo defines a validator's signing info for + monitoring their - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + liveness activity. + title: info is the signing info of all validators + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - If the embedded message type is well-known and has a custom JSON + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. - representation, that representation will be embedded adding a field + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + title: >- + QuerySigningInfosResponse is the response type for the Query/SigningInfos + RPC - `value` which holds the custom JSON in addition to the `@type` + method + cosmos.slashing.v1beta1.ValidatorSigningInfo: + type: object + properties: + address: + type: string + start_height: + type: string + format: int64 + title: Height at which validator was first a candidate OR was unjailed + index_offset: + type: string + format: int64 + description: >- + Index which is incremented each time the validator was a bonded - field. Example (for message [google.protobuf.Duration][]): + in a block and may have signed a precommit or not. This in conjunction + with the - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - timestamp: + `SignedBlocksWindow` param determines the index in the + `MissedBlocksBitArray`. + jailed_until: type: string + format: date-time description: >- - Time of the previous block. For heights > 1, it's the weighted median - of + Timestamp until which the validator is jailed due to liveness + downtime. + tombstoned: + type: boolean + format: boolean + description: >- + Whether or not a validator has been tombstoned (killed out of + validator set). It is set - the timestamps of the valid votes in the block.LastCommit. For height - == 1, + once the validator commits an equivocation or for any other configured + misbehiavor. + missed_blocks_counter: + type: string + format: int64 + description: >- + A counter kept to avoid unnecessary array reads. - it's genesis time. + Note that `Sum(MissedBlocksBitArray)` always equals + `MissedBlocksCounter`. description: >- - TxResponse defines a structure containing relevant tx data and metadata. - The + ValidatorSigningInfo defines a validator's signing info for monitoring + their - tags are stringified and the log is JSON decoded. - cosmos.crypto.multisig.v1beta1.CompactBitArray: - type: object - properties: - extra_bits_stored: - type: integer - format: int64 - elems: - type: string - format: byte - description: |- - 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. - cosmos.tx.signing.v1beta1.SignMode: + liveness activity. + cosmos.staking.v1beta1.BondStatus: type: string enum: - - SIGN_MODE_UNSPECIFIED - - SIGN_MODE_DIRECT - - SIGN_MODE_TEXTUAL - - SIGN_MODE_LEGACY_AMINO_JSON - default: SIGN_MODE_UNSPECIFIED + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED description: |- - SignMode represents a signing mode with its own security guarantees. + BondStatus is the status of a validator. - - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be - rejected - - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is - verified with raw bytes from Tx - - SIGN_MODE_TEXTUAL: 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 - - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses - Amino JSON and will be removed in the future - cosmos.tx.v1beta1.AuthInfo: + - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. + - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. + - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. + - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. + cosmos.staking.v1beta1.Commission: type: object properties: - signer_infos: - type: array - items: - $ref: '#/definitions/cosmos.tx.v1beta1.SignerInfo' - description: >- - 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. - fee: + commission_rates: description: >- - 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. + commission_rates defines the initial commission rates to be used for + creating a validator. type: object properties: - amount: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - 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. - title: amount is the amount of coins to be paid as a fee - gas_limit: + rate: type: string - format: uint64 - title: >- - gas_limit is the maximum gas that can be used in transaction - processing - - before an out of gas error occurs - payer: + description: 'rate is the commission rate charged to delegators, as a fraction.' + max_rate: type: string description: >- - 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. - granter: + max_rate defines the maximum commission rate which validator can + ever charge, as a fraction. + max_change_rate: type: string - title: >- - 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 + description: >- + max_change_rate defines the maximum daily increase of the + validator commission, as a fraction. + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + description: Commission defines commission parameters for a given validator. + cosmos.staking.v1beta1.CommissionRates: + type: object + properties: + rate: + type: string + description: 'rate is the commission rate charged to delegators, as a fraction.' + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which validator can ever + charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the validator + commission, as a fraction. + description: >- + CommissionRates defines the initial commission rates to be used for + creating - not support fee grants, this will fail + a validator. + cosmos.staking.v1beta1.Delegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the bech32-encoded address of the delegator. + validator_address: + type: string + description: validator_address is the bech32-encoded address of the validator. + shares: + type: string + description: shares define the delegation shares received. description: |- - AuthInfo describes the fee and signer modes that are used to sign a - transaction. - cosmos.tx.v1beta1.BroadcastMode: - type: string - enum: - - BROADCAST_MODE_UNSPECIFIED - - BROADCAST_MODE_BLOCK - - BROADCAST_MODE_SYNC - - BROADCAST_MODE_ASYNC - default: BROADCAST_MODE_UNSPECIFIED - description: >- - BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC - method. + 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. + cosmos.staking.v1beta1.DelegationResponse: + type: object + properties: + delegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the bech32-encoded address of the delegator. + validator_address: + type: string + description: validator_address is the bech32-encoded address of the validator. + shares: + type: string + description: shares define the delegation shares received. + description: |- + 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. + balance: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. - - BROADCAST_MODE_UNSPECIFIED: zero-value for mode ordering - - BROADCAST_MODE_BLOCK: BROADCAST_MODE_BLOCK defines a tx broadcasting mode where the client waits for - the tx to be committed in a block. - - BROADCAST_MODE_SYNC: BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for - a CheckTx execution response only. - - BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns - immediately. - cosmos.tx.v1beta1.BroadcastTxRequest: + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: |- + DelegationResponse is equivalent to Delegation except that it contains a + balance in addition to shares which is more suitable for client responses. + cosmos.staking.v1beta1.Description: type: object properties: - tx_bytes: + moniker: type: string - format: byte - description: tx_bytes is the raw transaction. - mode: + description: moniker defines a human-readable name for the validator. + identity: type: string - enum: - - BROADCAST_MODE_UNSPECIFIED - - BROADCAST_MODE_BLOCK - - BROADCAST_MODE_SYNC - - BROADCAST_MODE_ASYNC - default: BROADCAST_MODE_UNSPECIFIED description: >- - BroadcastMode specifies the broadcast mode for the TxService.Broadcast - RPC method. - - - BROADCAST_MODE_UNSPECIFIED: zero-value for mode ordering - - BROADCAST_MODE_BLOCK: BROADCAST_MODE_BLOCK defines a tx broadcasting mode where the client waits for - the tx to be committed in a block. - - BROADCAST_MODE_SYNC: BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for - a CheckTx execution response only. - - BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns - immediately. - description: |- - BroadcastTxRequest is the request type for the Service.BroadcastTxRequest - RPC method. - cosmos.tx.v1beta1.BroadcastTxResponse: + identity defines an optional identity signature (ex. UPort or + Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: security_contact defines an optional email for security contact. + details: + type: string + description: details define other optional details. + description: Description defines a validator description. + cosmos.staking.v1beta1.HistoricalInfo: type: object properties: - tx_response: + header: type: object properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block in + the blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. + chain_id: + type: string height: type: string format: int64 - title: The block height - txhash: + time: type: string - description: The transaction hash. - codespace: + format: date-time + last_block_id: + title: prev block info + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + last_commit_hash: type: string - title: Namespace for the Code - code: - type: integer - format: int64 - description: Response code. - data: + format: byte + title: hashes of block data + data_hash: type: string - description: 'Result bytes, if any.' - raw_log: + format: byte + validators_hash: type: string - description: |- - The output of the application's logger (raw string). May be - non-deterministic. - logs: - type: array - items: + format: byte + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: Header defines the structure of a Tendermint block header. + valset: + type: array + items: + type: object + properties: + operator_address: + type: string + description: >- + operator_address defines the address of the validator's + operator; bech encoded in JSON. + consensus_pubkey: type: object properties: - msg_index: - type: integer - format: int64 - log: + type_url: type: string - events: - type: array - items: - type: object - properties: - type: - type: string - attributes: - type: array - items: - type: object - properties: - key: - type: string - value: - type: string - description: >- - Attribute defines an attribute wrapper where the key - and value are - - strings instead of raw bytes. - description: >- - StringEvent defines en Event object wrapper where all the - attributes - - contain key/value pairs that are strings instead of raw - bytes. description: >- - Events contains a slice of Event objects that were emitted - during some - - execution. - description: >- - ABCIMessageLog defines a structure containing an indexed tx ABCI - message log. - description: >- - The output of the application's logger (typed). May be - non-deterministic. - info: - type: string - description: Additional information. May be non-deterministic. - gas_wanted: - type: string - format: int64 - description: Amount of gas requested for transaction. - gas_used: - type: string - format: int64 - description: Amount of gas consumed by transaction. - tx: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + A URL/resource name that uniquely identifies the type of the + serialized - protocol buffer message. This string must contain at least + protocol buffer message. This string must contain at least - one "/" character. The last segment of the URL's path must - represent + one "/" character. The last segment of the URL's path must + represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in a - canonical form + `path/google.protobuf.Duration`). The name should be in a + canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary all - types that they + In practice, teams usually precompile into the binary all + types that they - expect it to use in the context of Any. However, for URLs - which use the + expect it to use in the context of Any. However, for URLs + which use the - scheme `http`, `https`, or no scheme, one can optionally set - up a type + scheme `http`, `https`, or no scheme, one can optionally set + up a type - server that maps type URLs to message definitions as follows: + server that maps type URLs to message definitions as + follows: - * If no scheme is provided, `https` is assumed. + * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Note: this functionality is not currently available in the - official + Note: this functionality is not currently available in the + official - protobuf release, and it is not used for type URLs beginning - with + protobuf release, and it is not used for type URLs beginning + with - type.googleapis.com. + type.googleapis.com. - Schemes other than `http`, `https` (or the empty scheme) might - be + Schemes other than `http`, `https` (or the empty scheme) + might be - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a - URL that describes the type of the serialized message. + URL that describes the type of the serialized message. - Protobuf library provides support to pack/unpack Any values in the - form + Protobuf library provides support to pack/unpack Any values in + the form - of utility functions or additional generated methods of the Any - type. + of utility functions or additional generated methods of the Any + type. - Example 1: Pack and unpack a message in C++. + Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { + Foo foo = ...; + Any any; + any.PackFrom(foo); ... - } + if (any.UnpackTo(&foo)) { + ... + } - Example 2: Pack and unpack a message in Java. + Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) + foo = Foo(...) + any = Any() + any.Pack(foo) ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) ... - } + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } - The pack methods provided by protobuf library will by default use + The pack methods provided by protobuf library will by default + use - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - methods only use the fully qualified type name after the last '/' + methods only use the fully qualified type name after the last + '/' - in the type URL, for example "foo.bar.com/x/y.z" will yield type + in the type URL, for example "foo.bar.com/x/y.z" will yield type - name "y.z". + name "y.z". - JSON + JSON - ==== + ==== - The JSON representation of an `Any` value uses the regular + The JSON representation of an `Any` value uses the regular - representation of the deserialized, embedded message, with an + representation of the deserialized, embedded message, with an - additional field `@type` which contains the type URL. Example: + additional field `@type` which contains the type URL. Example: - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + jailed: + type: boolean + format: boolean + description: >- + jailed defined whether the validator has been jailed from bonded + status or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: + type: string + description: >- + delegator_shares defines total shares issued to a validator's + delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. UPort + or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: >- + security_contact defines an optional email for security + contact. + details: + type: string + description: details define other optional details. + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this + validator has begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the + validator to complete unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be + used for creating a validator. + type: object + properties: + rate: + type: string + description: >- + rate is the commission rate charged to delegators, as a + fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which + validator can ever charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of + the validator commission, as a fraction. + update_time: + type: string + format: date-time + description: >- + update_time is the last time the commission rate was + changed. + min_self_delegation: + type: string + description: >- + min_self_delegation is the validator's self declared minimum + self delegation. + description: >- + 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 - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + exchange rate. Voting power can be calculated as total bonded shares - If the embedded message type is well-known and has a custom JSON + multiplied by exchange rate. + description: >- + HistoricalInfo contains header and validator information for a given + block. - representation, that representation will be embedded adding a - field + It is stored as part of staking module's state, which persists the `n` + most - `value` which holds the custom JSON in addition to the `@type` + recent HistoricalInfo - field. Example (for message [google.protobuf.Duration][]): + (`n` is set by the staking module's `historical_entries` parameter). + cosmos.staking.v1beta1.Params: + type: object + properties: + unbonding_time: + type: string + description: unbonding_time is the time duration of unbonding. + max_validators: + type: integer + format: int64 + description: max_validators is the maximum number of validators. + max_entries: + type: integer + format: int64 + description: >- + max_entries is the max entries for either unbonding delegation or + redelegation (per pair/trio). + historical_entries: + type: integer + format: int64 + description: historical_entries is the number of historical entries to persist. + bond_denom: + type: string + description: bond_denom defines the bondable coin denomination. + power_reduction: + type: string + title: >- + power_reduction is the amount of staking tokens required for 1 unit of + consensus-engine power + description: Params defines the parameters for the staking module. + cosmos.staking.v1beta1.Pool: + type: object + properties: + not_bonded_tokens: + type: string + bonded_tokens: + type: string + description: |- + Pool is used for tracking bonded and not-bonded token supply of the bond + denomination. + cosmos.staking.v1beta1.QueryDelegationResponse: + type: object + properties: + delegation_response: + type: object + properties: + delegation: + type: object + properties: + delegator_address: + type: string + description: >- + delegator_address is the bech32-encoded address of the + delegator. + validator_address: + type: string + description: >- + validator_address is the bech32-encoded address of the + validator. + shares: + type: string + description: shares define the delegation shares received. + description: >- + Delegation represents the bond with tokens held by an account. It + is - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - timestamp: - type: string + owned by one delegator, and is associated with the voting power of + one + + validator. + balance: + type: object + properties: + denom: + type: string + amount: + type: string description: >- - Time of the previous block. For heights > 1, it's the weighted - median of + Coin defines a token with a denomination and an amount. - the timestamps of the valid votes in the block.LastCommit. For - height == 1, - it's genesis time. + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. description: >- - TxResponse defines a structure containing relevant tx data and - metadata. The + DelegationResponse is equivalent to Delegation except that it contains + a - tags are stringified and the log is JSON decoded. - description: |- - BroadcastTxResponse is the response type for the - Service.BroadcastTx method. - cosmos.tx.v1beta1.Fee: + balance in addition to shares which is more suitable for client + responses. + description: >- + QueryDelegationResponse is response type for the Query/Delegation RPC + method. + cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse: type: object properties: - amount: + delegation_responses: type: array items: type: object properties: - denom: - type: string - amount: - type: string - description: |- - 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. - title: amount is the amount of coins to be paid as a fee - gas_limit: - type: string - format: uint64 - title: >- - gas_limit is the maximum gas that can be used in transaction - processing - - before an out of gas error occurs - payer: - type: string - description: >- - if unset, the first signer is responsible for paying the fees. If set, - the specified account must pay the fees. + delegation: + type: object + properties: + delegator_address: + type: string + description: >- + delegator_address is the bech32-encoded address of the + delegator. + validator_address: + type: string + description: >- + validator_address is the bech32-encoded address of the + validator. + shares: + type: string + description: shares define the delegation shares received. + description: >- + Delegation represents the bond with tokens held by an account. + It is - the payer must be a tx signer (and thus have signed this field in - AuthInfo). + owned by one delegator, and is associated with the voting power + of one - setting this field does *not* change the ordering of required signers - for the transaction. - granter: - type: string - title: >- - if set, the fee payer (either the first signer or the value of the - payer field) requests that a fee grant be used + validator. + balance: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. - 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 - description: >- - Fee includes the amount of coins paid in fees and the maximum + NOTE: The amount field is an Int which implements the custom + method - gas to be used by the transaction. The ratio yields an effective - "gasprice", + signatures required by gogoproto. + description: >- + DelegationResponse is equivalent to Delegation except that it + contains a - which must be above some miminum to be accepted into the mempool. - cosmos.tx.v1beta1.GetTxResponse: - type: object - properties: - tx: - $ref: '#/definitions/cosmos.tx.v1beta1.Tx' - description: tx is the queried transaction. - tx_response: + balance in addition to shares which is more suitable for client + responses. + description: delegation_responses defines all the delegations' info of a delegator. + pagination: + description: pagination defines the pagination in the response. type: object properties: - height: - type: string - format: int64 - title: The block height - txhash: - type: string - description: The transaction hash. - codespace: - type: string - title: Namespace for the Code - code: - type: integer - format: int64 - description: Response code. - data: + next_key: type: string - description: 'Result bytes, if any.' - raw_log: + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: type: string - description: |- - The output of the application's logger (raw string). May be - non-deterministic. - logs: - type: array - items: - type: object - properties: - msg_index: - type: integer - format: int64 - log: - type: string - events: - type: array - items: - type: object - properties: - type: - type: string - attributes: - type: array - items: - type: object - properties: - key: - type: string - value: - type: string - description: >- - Attribute defines an attribute wrapper where the key - and value are + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - strings instead of raw bytes. + was set, its value is undefined otherwise + description: |- + QueryDelegatorDelegationsResponse is response type for the + Query/DelegatorDelegations RPC method. + cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse: + type: object + properties: + unbonding_responses: + type: array + items: + type: object + properties: + delegator_address: + type: string + description: >- + delegator_address is the bech32-encoded address of the + delegator. + validator_address: + type: string + description: >- + validator_address is the bech32-encoded address of the + validator. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 description: >- - StringEvent defines en Event object wrapper where all the - attributes - - contain key/value pairs that are strings instead of raw - bytes. - description: >- - Events contains a slice of Event objects that were emitted - during some + creation_height is the height which the unbonding took + place. + completion_time: + type: string + format: date-time + description: completion_time is the unix time for unbonding completion. + initial_balance: + type: string + description: >- + initial_balance defines the tokens initially scheduled to + receive at completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + description: >- + UnbondingDelegationEntry defines an unbonding object with + relevant metadata. + description: entries are the unbonding delegation entries. + description: >- + UnbondingDelegation stores all of a single delegator's unbonding + bonds - execution. - description: >- - ABCIMessageLog defines a structure containing an indexed tx ABCI - message log. - description: >- - The output of the application's logger (typed). May be - non-deterministic. - info: + for a single validator in an time-ordered list. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: type: string - description: Additional information. May be non-deterministic. - gas_wanted: + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: type: string - format: int64 - description: Amount of gas requested for transaction. - gas_used: + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + QueryUnbondingDelegatorDelegationsResponse is response type for the + Query/UnbondingDelegatorDelegations RPC method. + cosmos.staking.v1beta1.QueryDelegatorValidatorResponse: + type: object + properties: + validator: + type: object + properties: + operator_address: type: string - format: int64 - description: Amount of gas consumed by transaction. - tx: + description: >- + operator_address defines the address of the validator's operator; + bech encoded in JSON. + consensus_pubkey: type: object properties: type_url: @@ -50775,117 +48490,136 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - timestamp: + jailed: + type: boolean + format: boolean + description: >- + jailed defined whether the validator has been jailed from bonded + status or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: type: string description: >- - Time of the previous block. For heights > 1, it's the weighted - median of + delegator_shares defines total shares issued to a validator's + delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. UPort or + Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: >- + security_contact defines an optional email for security + contact. + details: + type: string + description: details define other optional details. + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this + validator has begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the + validator to complete unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be + used for creating a validator. + type: object + properties: + rate: + type: string + description: >- + rate is the commission rate charged to delegators, as a + fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which + validator can ever charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the + validator commission, as a fraction. + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + min_self_delegation: + type: string + description: >- + min_self_delegation is the validator's self declared minimum self + delegation. + description: >- + Validator defines a validator, together with the total amount of the - the timestamps of the valid votes in the block.LastCommit. For - height == 1, + Validator's bond shares and their exchange rate to coins. Slashing + results in - it's genesis time. - description: >- - TxResponse defines a structure containing relevant tx data and - metadata. The + a decrease in the exchange rate, allowing correct calculation of + future - tags are stringified and the log is JSON decoded. - description: GetTxResponse is the response type for the Service.GetTx method. - cosmos.tx.v1beta1.GetTxsEventResponse: - type: object - properties: - txs: - type: array - items: - $ref: '#/definitions/cosmos.tx.v1beta1.Tx' - description: txs is the list of queried transactions. - tx_responses: + 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. + description: |- + QueryDelegatorValidatorResponse response type for the + Query/DelegatorValidator RPC method. + cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse: + type: object + properties: + validators: type: array items: type: object properties: - height: - type: string - format: int64 - title: The block height - txhash: - type: string - description: The transaction hash. - codespace: - type: string - title: Namespace for the Code - code: - type: integer - format: int64 - description: Response code. - data: - type: string - description: 'Result bytes, if any.' - raw_log: + operator_address: type: string - description: |- - The output of the application's logger (raw string). May be - non-deterministic. - logs: - type: array - items: - type: object - properties: - msg_index: - type: integer - format: int64 - log: - type: string - events: - type: array - items: - type: object - properties: - type: - type: string - attributes: - type: array - items: - type: object - properties: - key: - type: string - value: - type: string - description: >- - Attribute defines an attribute wrapper where the - key and value are - - strings instead of raw bytes. - description: >- - StringEvent defines en Event object wrapper where all - the attributes - - contain key/value pairs that are strings instead of raw - bytes. - description: >- - Events contains a slice of Event objects that were emitted - during some - - execution. - description: >- - ABCIMessageLog defines a structure containing an indexed tx - ABCI message log. description: >- - The output of the application's logger (typed). May be - non-deterministic. - info: - type: string - description: Additional information. May be non-deterministic. - gas_wanted: - type: string - format: int64 - description: Amount of gas requested for transaction. - gas_used: - type: string - format: int64 - description: Amount of gas consumed by transaction. - tx: + operator_address defines the address of the validator's + operator; bech encoded in JSON. + consensus_pubkey: type: object properties: type_url: @@ -51054,24 +48788,124 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - timestamp: + jailed: + type: boolean + format: boolean + description: >- + jailed defined whether the validator has been jailed from bonded + status or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: type: string description: >- - Time of the previous block. For heights > 1, it's the weighted - median of + delegator_shares defines total shares issued to a validator's + delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. UPort + or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: >- + security_contact defines an optional email for security + contact. + details: + type: string + description: details define other optional details. + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this + validator has begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the + validator to complete unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be + used for creating a validator. + type: object + properties: + rate: + type: string + description: >- + rate is the commission rate charged to delegators, as a + fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which + validator can ever charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of + the validator commission, as a fraction. + update_time: + type: string + format: date-time + description: >- + update_time is the last time the commission rate was + changed. + min_self_delegation: + type: string + description: >- + min_self_delegation is the validator's self declared minimum + self delegation. + description: >- + Validator defines a validator, together with the total amount of the - the timestamps of the valid votes in the block.LastCommit. For - height == 1, + Validator's bond shares and their exchange rate to coins. Slashing + results in - it's genesis time. - description: >- - TxResponse defines a structure containing relevant tx data and - metadata. The + a decrease in the exchange rate, allowing correct calculation of + future - tags are stringified and the log is JSON decoded. - description: tx_responses is the list of queried TxResponses. + 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. + description: validators defines the the validators' info of a delegator. pagination: - description: pagination defines an pagination for the response. + description: pagination defines the pagination in the response. type: object properties: next_key: @@ -51089,768 +48923,1075 @@ definitions: was set, its value is undefined otherwise description: |- - GetTxsEventResponse is the response type for the Service.TxsByEvents - RPC method. - cosmos.tx.v1beta1.ModeInfo: + QueryDelegatorValidatorsResponse is response type for the + Query/DelegatorValidators RPC method. + cosmos.staking.v1beta1.QueryHistoricalInfoResponse: type: object properties: - single: - title: single represents a single signer + hist: + description: hist defines the historical info at the given height. type: object properties: - mode: - title: mode is the signing mode of the single signer - type: string - enum: - - SIGN_MODE_UNSPECIFIED - - SIGN_MODE_DIRECT - - SIGN_MODE_TEXTUAL - - SIGN_MODE_LEGACY_AMINO_JSON - default: SIGN_MODE_UNSPECIFIED - description: >- - SignMode represents a signing mode with its own security - guarantees. + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block + in the blockchain, - - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be - rejected - - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is - verified with raw bytes from Tx - - SIGN_MODE_TEXTUAL: SIGN_MODE_TEXTUAL is a future signing mode that will verify some - human-readable textual representation on top of the binary - representation + including all blockchain data structures and the rules of the + application's - from SIGN_MODE_DIRECT - - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses - Amino JSON and will be removed in the future - multi: - $ref: '#/definitions/cosmos.tx.v1beta1.ModeInfo.Multi' - title: multi represents a nested multisig signer - description: ModeInfo describes the signing mode of a single or nested multisig signer. - cosmos.tx.v1beta1.ModeInfo.Multi: - type: object - properties: - bitarray: - title: bitarray specifies which keys within the multisig are signing - type: object - properties: - extra_bits_stored: - type: integer - format: int64 - elems: - type: string - format: byte - description: >- - CompactBitArray is an implementation of a space efficient bit array. + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + title: prev block info + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + last_commit_hash: + type: string + format: byte + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: Header defines the structure of a Tendermint block header. + valset: + type: array + items: + type: object + properties: + operator_address: + type: string + description: >- + operator_address defines the address of the validator's + operator; bech encoded in JSON. + consensus_pubkey: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - This is used to ensure that the encoded data takes up a minimal amount - of + protocol buffer message. This string must contain at + least - space after proto encoding. + one "/" character. The last segment of the URL's path + must represent - This is not thread safe, and is not intended for concurrent usage. - mode_infos: - type: array - items: - $ref: '#/definitions/cosmos.tx.v1beta1.ModeInfo' - title: |- - mode_infos is the corresponding modes of the signers of the multisig - which could include nested multisig public keys - title: Multi is the mode info for a multisig public key - cosmos.tx.v1beta1.ModeInfo.Single: - type: object - properties: - mode: - title: mode is the signing mode of the single signer - type: string - enum: - - SIGN_MODE_UNSPECIFIED - - SIGN_MODE_DIRECT - - SIGN_MODE_TEXTUAL - - SIGN_MODE_LEGACY_AMINO_JSON - default: SIGN_MODE_UNSPECIFIED - description: >- - SignMode represents a signing mode with its own security guarantees. + the fully qualified name of the type (as in - - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be - rejected - - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is - verified with raw bytes from Tx - - SIGN_MODE_TEXTUAL: SIGN_MODE_TEXTUAL is a future signing mode that will verify some - human-readable textual representation on top of the binary - representation + `path/google.protobuf.Duration`). The name should be in + a canonical form - from SIGN_MODE_DIRECT - - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses - Amino JSON and will be removed in the future - title: |- - 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 - cosmos.tx.v1beta1.OrderBy: - type: string - enum: - - ORDER_BY_UNSPECIFIED - - ORDER_BY_ASC - - ORDER_BY_DESC - default: ORDER_BY_UNSPECIFIED - description: >- - - ORDER_BY_UNSPECIFIED: ORDER_BY_UNSPECIFIED specifies an unknown sorting - order. OrderBy defaults to ASC in this case. - - ORDER_BY_ASC: ORDER_BY_ASC defines ascending order - - ORDER_BY_DESC: ORDER_BY_DESC defines descending order - title: OrderBy defines the sorting order - cosmos.tx.v1beta1.SignerInfo: - type: object - properties: - public_key: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + (e.g., leading "." is not accepted). - protocol buffer message. This string must contain at least - one "/" character. The last segment of the URL's path must - represent + In practice, teams usually precompile into the binary + all types that they - the fully qualified name of the type (as in + expect it to use in the context of Any. However, for + URLs which use the - `path/google.protobuf.Duration`). The name should be in a - canonical form + scheme `http`, `https`, or no scheme, one can optionally + set up a type - (e.g., leading "." is not accepted). + server that maps type URLs to message definitions as + follows: - In practice, teams usually precompile into the binary all types - that they + * If no scheme is provided, `https` is assumed. - expect it to use in the context of Any. However, for URLs which - use the + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - scheme `http`, `https`, or no scheme, one can optionally set up a - type + Note: this functionality is not currently available in + the official - server that maps type URLs to message definitions as follows: + protobuf release, and it is not used for type URLs + beginning with + type.googleapis.com. - * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + Schemes other than `http`, `https` (or the empty scheme) + might be - Note: this functionality is not currently available in the - official + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a - protobuf release, and it is not used for type URLs beginning with + URL that describes the type of the serialized message. - type.googleapis.com. + Protobuf library provides support to pack/unpack Any values + in the form - Schemes other than `http`, `https` (or the empty scheme) might be + of utility functions or additional generated methods of the + Any type. - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above specified - type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a - URL that describes the type of the serialized message. + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + Example 2: Pack and unpack a message in Java. - Protobuf library provides support to pack/unpack Any values in the - form + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - of utility functions or additional generated methods of the Any type. + Example 3: Pack and unpack a message in Python. + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - Example 1: Pack and unpack a message in C++. + Example 4: Pack and unpack a message in Go - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } - Example 2: Pack and unpack a message in Java. + The pack methods provided by protobuf library will by + default use - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - Example 3: Pack and unpack a message in Python. + methods only use the fully qualified type name after the + last '/' - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + in the type URL, for example "foo.bar.com/x/y.z" will yield + type - Example 4: Pack and unpack a message in Go + name "y.z". - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - The pack methods provided by protobuf library will by default use - 'type.googleapis.com/full.type.name' as the type URL and the unpack + JSON - methods only use the fully qualified type name after the last '/' + ==== - in the type URL, for example "foo.bar.com/x/y.z" will yield type + The JSON representation of an `Any` value uses the regular - name "y.z". + representation of the deserialized, embedded message, with + an + additional field `@type` which contains the type URL. + Example: + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - JSON + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - ==== + If the embedded message type is well-known and has a custom + JSON - The JSON representation of an `Any` value uses the regular + representation, that representation will be embedded adding + a field - representation of the deserialized, embedded message, with an + `value` which holds the custom JSON in addition to the + `@type` - additional field `@type` which contains the type URL. Example: + field. Example (for message [google.protobuf.Duration][]): - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + jailed: + type: boolean + format: boolean + description: >- + jailed defined whether the validator has been jailed from + bonded status or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: + type: string + description: >- + delegator_shares defines total shares issued to a + validator's delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. + UPort or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: >- + security_contact defines an optional email for security + contact. + details: + type: string + description: details define other optional details. + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which + this validator has begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the + validator to complete unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to + be used for creating a validator. + type: object + properties: + rate: + type: string + description: >- + rate is the commission rate charged to delegators, + as a fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which + validator can ever charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase + of the validator commission, as a fraction. + update_time: + type: string + format: date-time + description: >- + update_time is the last time the commission rate was + changed. + min_self_delegation: + type: string + description: >- + min_self_delegation is the validator's self declared minimum + self delegation. + description: >- + Validator defines a validator, together with the total amount of + the - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + Validator's bond shares and their exchange rate to coins. + Slashing results in - If the embedded message type is well-known and has a custom JSON + a decrease in the exchange rate, allowing correct calculation of + future - representation, that representation will be embedded adding a field + undelegations without iterating over delegators. When coins are + delegated to - `value` which holds the custom JSON in addition to the `@type` + this validator, the validator is credited with a delegation + whose number of - field. Example (for message [google.protobuf.Duration][]): + bond shares is based on the amount of coins delegated divided by + the current - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - mode_info: - $ref: '#/definitions/cosmos.tx.v1beta1.ModeInfo' - title: |- - mode_info describes the signing mode of the signer and is a nested - structure to support nested multisig pubkey's - sequence: - type: string - format: uint64 - description: >- - sequence is the sequence of the account, which describes the + exchange rate. Voting power can be calculated as total bonded + shares - number of committed transactions signed by a given address. It is used - to + multiplied by exchange rate. + description: >- + QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo + RPC - prevent replay attacks. - description: |- - SignerInfo describes the public key and signing mode of a single top-level - signer. - cosmos.tx.v1beta1.SimulateRequest: - type: object - properties: - tx: - $ref: '#/definitions/cosmos.tx.v1beta1.Tx' - description: tx is the transaction to simulate. - description: |- - SimulateRequest is the request type for the Service.Simulate - RPC method. - cosmos.tx.v1beta1.SimulateResponse: + method. + cosmos.staking.v1beta1.QueryParamsResponse: type: object properties: - gas_info: - description: gas_info is the information about gas used in the simulation. + params: + description: params holds all the parameters of this module. type: object properties: - gas_wanted: + unbonding_time: type: string - format: uint64 + description: unbonding_time is the time duration of unbonding. + max_validators: + type: integer + format: int64 + description: max_validators is the maximum number of validators. + max_entries: + type: integer + format: int64 description: >- - GasWanted is the maximum units of work we allow this tx to - perform. - gas_used: + max_entries is the max entries for either unbonding delegation or + redelegation (per pair/trio). + historical_entries: + type: integer + format: int64 + description: historical_entries is the number of historical entries to persist. + bond_denom: type: string - format: uint64 - description: GasUsed is the amount of gas actually consumed. - result: - description: result is the result of the simulation. + description: bond_denom defines the bondable coin denomination. + power_reduction: + type: string + title: >- + power_reduction is the amount of staking tokens required for 1 + unit of consensus-engine power + description: QueryParamsResponse is response type for the Query/Params RPC method. + cosmos.staking.v1beta1.QueryPoolResponse: + type: object + properties: + pool: + description: pool defines the pool info. type: object properties: - data: + not_bonded_tokens: type: string - format: byte - description: >- - Data is any data returned from message or handler execution. It - MUST be - - length prefixed in order to separate data from multiple message - executions. - log: + bonded_tokens: type: string - description: >- - Log contains the log information from message or handler - execution. - events: - type: array - items: + description: QueryPoolResponse is response type for the Query/Pool RPC method. + cosmos.staking.v1beta1.QueryRedelegationsResponse: + type: object + properties: + redelegation_responses: + type: array + items: + type: object + properties: + redelegation: type: object properties: - type: + delegator_address: type: string - attributes: + description: >- + delegator_address is the bech32-encoded address of the + delegator. + validator_src_address: + type: string + description: >- + validator_src_address is the validator redelegation source + operator address. + validator_dst_address: + type: string + description: >- + validator_dst_address is the validator redelegation + destination operator address. + entries: type: array items: type: object properties: - key: + creation_height: type: string - format: byte - value: + format: int64 + description: >- + creation_height defines the height which the + redelegation took place. + completion_time: type: string - format: byte - index: - type: boolean - format: boolean + format: date-time + description: >- + completion_time defines the unix time for redelegation + completion. + initial_balance: + type: string + description: >- + initial_balance defines the initial balance when + redelegation started. + shares_dst: + type: string + description: >- + shares_dst is the amount of destination-validator + shares created by redelegation. description: >- - EventAttribute is a single key-value pair, associated with - an event. + RedelegationEntry defines a redelegation object with + relevant metadata. + description: entries are the redelegation entries. description: >- - Event allows application developers to attach additional - information to + Redelegation contains the list of a particular delegator's + redelegating bonds - ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and - ResponseDeliverTx. + from a particular source validator to a particular destination + validator. + entries: + type: array + items: + type: object + properties: + redelegation_entry: + type: object + properties: + creation_height: + type: string + format: int64 + description: >- + creation_height defines the height which the + redelegation took place. + completion_time: + type: string + format: date-time + description: >- + completion_time defines the unix time for redelegation + completion. + initial_balance: + type: string + description: >- + initial_balance defines the initial balance when + redelegation started. + shares_dst: + type: string + description: >- + shares_dst is the amount of destination-validator + shares created by redelegation. + description: >- + RedelegationEntry defines a redelegation object with + relevant metadata. + balance: + type: string + description: >- + RedelegationEntryResponse is equivalent to a RedelegationEntry + except that it - Later, transactions may be queried using these events. - description: >- - Events contains a slice of Event objects that were emitted during - message + contains a balance in addition to shares which is more + suitable for client - or handler execution. + responses. + description: >- + RedelegationResponse is equivalent to a Redelegation except that its + entries + + contain a balance in addition to shares which is more suitable for + client + + responses. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryRedelegationsResponse is response type for the Query/Redelegations + RPC + + method. + cosmos.staking.v1beta1.QueryUnbondingDelegationResponse: + type: object + properties: + unbond: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the bech32-encoded address of the delegator. + validator_address: + type: string + description: validator_address is the bech32-encoded address of the validator. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: >- + creation_height is the height which the unbonding took + place. + completion_time: + type: string + format: date-time + description: completion_time is the unix time for unbonding completion. + initial_balance: + type: string + description: >- + initial_balance defines the tokens initially scheduled to + receive at completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + description: >- + UnbondingDelegationEntry defines an unbonding object with + relevant metadata. + description: entries are the unbonding delegation entries. + description: |- + UnbondingDelegation stores all of a single delegator's unbonding bonds + for a single validator in an time-ordered list. description: |- - SimulateResponse is the response type for the - Service.SimulateRPC method. - cosmos.tx.v1beta1.Tx: + QueryDelegationResponse is response type for the Query/UnbondingDelegation + RPC method. + cosmos.staking.v1beta1.QueryValidatorDelegationsResponse: type: object properties: - body: - title: body is the processable content of the transaction - type: object - properties: - messages: - type: array - items: + delegation_responses: + type: array + items: + type: object + properties: + delegation: type: object properties: - type_url: + delegator_address: type: string description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all - types that they - - expect it to use in the context of Any. However, for URLs - which use the - - scheme `http`, `https`, or no scheme, one can optionally set - up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning - with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - value: + delegator_address is the bech32-encoded address of the + delegator. + validator_address: type: string - format: byte description: >- - Must be a valid serialized protocol buffer of the above - specified type. + validator_address is the bech32-encoded address of the + validator. + shares: + type: string + description: shares define the delegation shares received. description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in - the form - - of utility functions or additional generated methods of the Any - type. - - - Example 1: Pack and unpack a message in C++. + Delegation represents the bond with tokens held by an account. + It is - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + owned by one delegator, and is associated with the voting power + of one - Example 2: Pack and unpack a message in Java. + validator. + balance: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - Example 3: Pack and unpack a message in Python. + NOTE: The amount field is an Int which implements the custom + method - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + signatures required by gogoproto. + description: >- + DelegationResponse is equivalent to Delegation except that it + contains a - Example 4: Pack and unpack a message in Go + balance in addition to shares which is more suitable for client + responses. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } + was set, its value is undefined otherwise + title: |- + QueryValidatorDelegationsResponse is response type for the + Query/ValidatorDelegations RPC method + cosmos.staking.v1beta1.QueryValidatorResponse: + type: object + properties: + validator: + type: object + properties: + operator_address: + type: string + description: >- + operator_address defines the address of the validator's operator; + bech encoded in JSON. + consensus_pubkey: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - The pack methods provided by protobuf library will by default - use + protocol buffer message. This string must contain at least - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + one "/" character. The last segment of the URL's path must + represent - methods only use the fully qualified type name after the last - '/' + the fully qualified name of the type (as in - in the type URL, for example "foo.bar.com/x/y.z" will yield type + `path/google.protobuf.Duration`). The name should be in a + canonical form - name "y.z". + (e.g., leading "." is not accepted). + In practice, teams usually precompile into the binary all + types that they - JSON + expect it to use in the context of Any. However, for URLs + which use the - ==== + scheme `http`, `https`, or no scheme, one can optionally set + up a type - The JSON representation of an `Any` value uses the regular + server that maps type URLs to message definitions as follows: - representation of the deserialized, embedded message, with an - additional field `@type` which contains the type URL. Example: + * If no scheme is provided, `https` is assumed. - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + Note: this functionality is not currently available in the + official - If the embedded message type is well-known and has a custom JSON + protobuf release, and it is not used for type URLs beginning + with - representation, that representation will be embedded adding a - field + type.googleapis.com. - `value` which holds the custom JSON in addition to the `@type` - field. Example (for message [google.protobuf.Duration][]): + Schemes other than `http`, `https` (or the empty scheme) might + be - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. description: >- - 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. - memo: - type: string - title: memo is any arbitrary memo to be added to the transaction - timeout_height: - type: string - format: uint64 - title: |- - timeout is the block height after which this transaction will not - be processed by the chain - extension_options: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all - types that they - - expect it to use in the context of Any. However, for URLs - which use the - - scheme `http`, `https`, or no scheme, one can optionally set - up a type - - server that maps type URLs to message definitions as - follows: - + `Any` contains an arbitrary serialized protocol buffer message + along with a - * If no scheme is provided, `https` is assumed. + URL that describes the type of the serialized message. - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - Note: this functionality is not currently available in the - official + Protobuf library provides support to pack/unpack Any values in the + form - protobuf release, and it is not used for type URLs beginning - with + of utility functions or additional generated methods of the Any + type. - type.googleapis.com. + Example 1: Pack and unpack a message in C++. - Schemes other than `http`, `https` (or the empty scheme) - might be + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a + Example 2: Pack and unpack a message in Java. - URL that describes the type of the serialized message. + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + Example 3: Pack and unpack a message in Python. - Protobuf library provides support to pack/unpack Any values in - the form + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - of utility functions or additional generated methods of the Any - type. + Example 4: Pack and unpack a message in Go + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } - Example 1: Pack and unpack a message in C++. + The pack methods provided by protobuf library will by default use - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - Example 2: Pack and unpack a message in Java. + methods only use the fully qualified type name after the last '/' - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + in the type URL, for example "foo.bar.com/x/y.z" will yield type - Example 3: Pack and unpack a message in Python. + name "y.z". - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - Example 4: Pack and unpack a message in Go - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } + JSON - The pack methods provided by protobuf library will by default - use + ==== - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + The JSON representation of an `Any` value uses the regular - methods only use the fully qualified type name after the last - '/' + representation of the deserialized, embedded message, with an - in the type URL, for example "foo.bar.com/x/y.z" will yield type + additional field `@type` which contains the type URL. Example: - name "y.z". + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + If the embedded message type is well-known and has a custom JSON - JSON + representation, that representation will be embedded adding a + field - ==== + `value` which holds the custom JSON in addition to the `@type` - The JSON representation of an `Any` value uses the regular + field. Example (for message [google.protobuf.Duration][]): - representation of the deserialized, embedded message, with an + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + jailed: + type: boolean + format: boolean + description: >- + jailed defined whether the validator has been jailed from bonded + status or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: + type: string + description: >- + delegator_shares defines total shares issued to a validator's + delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. UPort or + Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: >- + security_contact defines an optional email for security + contact. + details: + type: string + description: details define other optional details. + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this + validator has begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the + validator to complete unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be + used for creating a validator. + type: object + properties: + rate: + type: string + description: >- + rate is the commission rate charged to delegators, as a + fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which + validator can ever charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the + validator commission, as a fraction. + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + min_self_delegation: + type: string + description: >- + min_self_delegation is the validator's self declared minimum self + delegation. + description: >- + Validator defines a validator, together with the total amount of the - additional field `@type` which contains the type URL. Example: + Validator's bond shares and their exchange rate to coins. Slashing + results in - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + a decrease in the exchange rate, allowing correct calculation of + future - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + undelegations without iterating over delegators. When coins are + delegated to - If the embedded message type is well-known and has a custom JSON + this validator, the validator is credited with a delegation whose + number of - representation, that representation will be embedded adding a - field + bond shares is based on the amount of coins delegated divided by the + current - `value` which holds the custom JSON in addition to the `@type` + exchange rate. Voting power can be calculated as total bonded shares - field. Example (for message [google.protobuf.Duration][]): + multiplied by exchange rate. + title: QueryValidatorResponse is response type for the Query/Validator RPC method + cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse: + type: object + properties: + unbonding_responses: + type: array + items: + type: object + properties: + delegator_address: + type: string + description: >- + delegator_address is the bech32-encoded address of the + delegator. + validator_address: + type: string + description: >- + validator_address is the bech32-encoded address of the + validator. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: >- + creation_height is the height which the unbonding took + place. + completion_time: + type: string + format: date-time + description: completion_time is the unix time for unbonding completion. + initial_balance: + type: string + description: >- + initial_balance defines the tokens initially scheduled to + receive at completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + description: >- + UnbondingDelegationEntry defines an unbonding object with + relevant metadata. + description: entries are the unbonding delegation entries. + description: >- + UnbondingDelegation stores all of a single delegator's unbonding + bonds - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } + for a single validator in an time-ordered list. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 title: >- - extension_options are arbitrary options that can be added by - chains - - when the default options are not sufficient. If any of these are - present + total is total number of results available if + PageRequest.count_total - and can't be handled, the transaction will be rejected - non_critical_extension_options: - type: array - items: + was set, its value is undefined otherwise + description: |- + QueryValidatorUnbondingDelegationsResponse is response type for the + Query/ValidatorUnbondingDelegations RPC method. + cosmos.staking.v1beta1.QueryValidatorsResponse: + type: object + properties: + validators: + type: array + items: + type: object + properties: + operator_address: + type: string + description: >- + operator_address defines the address of the validator's + operator; bech encoded in JSON. + consensus_pubkey: type: object properties: type_url: @@ -51961,708 +50102,970 @@ definitions: Example 4: Pack and unpack a message in Go - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default - use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the last - '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with an - - additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom JSON - - representation, that representation will be embedded adding a - field - - `value` which holds the custom JSON in addition to the `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - title: >- - 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 - description: TxBody is the body of a transaction that all signers sign over. - auth_info: - $ref: '#/definitions/cosmos.tx.v1beta1.AuthInfo' - title: |- - auth_info is the authorization related content of the transaction, - specifically signers, signer modes and fee - signatures: - type: array - items: - type: string - format: byte - description: >- - 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. - description: Tx is the standard type used for broadcasting transactions. - cosmos.tx.v1beta1.TxBody: - type: object - properties: - messages: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all types - that they - - expect it to use in the context of Any. However, for URLs which - use the - - scheme `http`, `https`, or no scheme, one can optionally set up - a type - - server that maps type URLs to message definitions as follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning - with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) might - be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in the - form - - of utility functions or additional generated methods of the Any - type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default use - - 'type.googleapis.com/full.type.name' as the type URL and the unpack - - methods only use the fully qualified type name after the last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with an - - additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom JSON - - representation, that representation will be embedded adding a field - - `value` which holds the custom JSON in addition to the `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - description: >- - 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. - memo: - type: string - title: memo is any arbitrary memo to be added to the transaction - timeout_height: - type: string - format: uint64 - title: |- - timeout is the block height after which this transaction will not - be processed by the chain - extension_options: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all types - that they - - expect it to use in the context of Any. However, for URLs which - use the - - scheme `http`, `https`, or no scheme, one can optionally set up - a type - - server that maps type URLs to message definitions as follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning - with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) might - be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a - - URL that describes the type of the serialized message. + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + The pack methods provided by protobuf library will by default + use - Protobuf library provides support to pack/unpack Any values in the - form + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - of utility functions or additional generated methods of the Any - type. + methods only use the fully qualified type name after the last + '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type - Example 1: Pack and unpack a message in C++. + name "y.z". - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + JSON - Example 3: Pack and unpack a message in Python. + ==== - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + The JSON representation of an `Any` value uses the regular - Example 4: Pack and unpack a message in Go + representation of the deserialized, embedded message, with an - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } + additional field `@type` which contains the type URL. Example: - The pack methods provided by protobuf library will by default use + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - 'type.googleapis.com/full.type.name' as the type URL and the unpack + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - methods only use the fully qualified type name after the last '/' + If the embedded message type is well-known and has a custom JSON - in the type URL, for example "foo.bar.com/x/y.z" will yield type + representation, that representation will be embedded adding a + field - name "y.z". + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + jailed: + type: boolean + format: boolean + description: >- + jailed defined whether the validator has been jailed from bonded + status or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: + type: string + description: >- + delegator_shares defines total shares issued to a validator's + delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. UPort + or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: >- + security_contact defines an optional email for security + contact. + details: + type: string + description: details define other optional details. + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this + validator has begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the + validator to complete unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be + used for creating a validator. + type: object + properties: + rate: + type: string + description: >- + rate is the commission rate charged to delegators, as a + fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which + validator can ever charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of + the validator commission, as a fraction. + update_time: + type: string + format: date-time + description: >- + update_time is the last time the commission rate was + changed. + min_self_delegation: + type: string + description: >- + min_self_delegation is the validator's self declared minimum + self delegation. + description: >- + Validator defines a validator, together with the total amount of the - JSON + Validator's bond shares and their exchange rate to coins. Slashing + results in - ==== + a decrease in the exchange rate, allowing correct calculation of + future - The JSON representation of an `Any` value uses the regular + undelegations without iterating over delegators. When coins are + delegated to - representation of the deserialized, embedded message, with an + this validator, the validator is credited with a delegation whose + number of - additional field `@type` which contains the type URL. Example: + bond shares is based on the amount of coins delegated divided by the + current - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + exchange rate. Voting power can be calculated as total bonded shares - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + multiplied by exchange rate. + description: validators contains all the queried validators. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - If the embedded message type is well-known and has a custom JSON + was set, its value is undefined otherwise + title: >- + QueryValidatorsResponse is response type for the Query/Validators RPC + method + cosmos.staking.v1beta1.Redelegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the bech32-encoded address of the delegator. + validator_src_address: + type: string + description: >- + validator_src_address is the validator redelegation source operator + address. + validator_dst_address: + type: string + description: >- + validator_dst_address is the validator redelegation destination + operator address. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: >- + creation_height defines the height which the redelegation took + place. + completion_time: + type: string + format: date-time + description: >- + completion_time defines the unix time for redelegation + completion. + initial_balance: + type: string + description: >- + initial_balance defines the initial balance when redelegation + started. + shares_dst: + type: string + description: >- + shares_dst is the amount of destination-validator shares created + by redelegation. + description: >- + RedelegationEntry defines a redelegation object with relevant + metadata. + description: entries are the redelegation entries. + description: >- + Redelegation contains the list of a particular delegator's redelegating + bonds - representation, that representation will be embedded adding a field + from a particular source validator to a particular destination validator. + cosmos.staking.v1beta1.RedelegationEntry: + type: object + properties: + creation_height: + type: string + format: int64 + description: creation_height defines the height which the redelegation took place. + completion_time: + type: string + format: date-time + description: completion_time defines the unix time for redelegation completion. + initial_balance: + type: string + description: initial_balance defines the initial balance when redelegation started. + shares_dst: + type: string + description: >- + shares_dst is the amount of destination-validator shares created by + redelegation. + description: RedelegationEntry defines a redelegation object with relevant metadata. + cosmos.staking.v1beta1.RedelegationEntryResponse: + type: object + properties: + redelegation_entry: + type: object + properties: + creation_height: + type: string + format: int64 + description: >- + creation_height defines the height which the redelegation took + place. + completion_time: + type: string + format: date-time + description: completion_time defines the unix time for redelegation completion. + initial_balance: + type: string + description: >- + initial_balance defines the initial balance when redelegation + started. + shares_dst: + type: string + description: >- + shares_dst is the amount of destination-validator shares created + by redelegation. + description: >- + RedelegationEntry defines a redelegation object with relevant + metadata. + balance: + type: string + description: >- + RedelegationEntryResponse is equivalent to a RedelegationEntry except that + it - `value` which holds the custom JSON in addition to the `@type` + contains a balance in addition to shares which is more suitable for client - field. Example (for message [google.protobuf.Duration][]): + responses. + cosmos.staking.v1beta1.RedelegationResponse: + type: object + properties: + redelegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the bech32-encoded address of the delegator. + validator_src_address: + type: string + description: >- + validator_src_address is the validator redelegation source + operator address. + validator_dst_address: + type: string + description: >- + validator_dst_address is the validator redelegation destination + operator address. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: >- + creation_height defines the height which the redelegation + took place. + completion_time: + type: string + format: date-time + description: >- + completion_time defines the unix time for redelegation + completion. + initial_balance: + type: string + description: >- + initial_balance defines the initial balance when + redelegation started. + shares_dst: + type: string + description: >- + shares_dst is the amount of destination-validator shares + created by redelegation. + description: >- + RedelegationEntry defines a redelegation object with relevant + metadata. + description: entries are the redelegation entries. + description: >- + Redelegation contains the list of a particular delegator's + redelegating bonds - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - title: >- - extension_options are arbitrary options that can be added by chains + from a particular source validator to a particular destination + validator. + entries: + type: array + items: + type: object + properties: + redelegation_entry: + type: object + properties: + creation_height: + type: string + format: int64 + description: >- + creation_height defines the height which the redelegation + took place. + completion_time: + type: string + format: date-time + description: >- + completion_time defines the unix time for redelegation + completion. + initial_balance: + type: string + description: >- + initial_balance defines the initial balance when + redelegation started. + shares_dst: + type: string + description: >- + shares_dst is the amount of destination-validator shares + created by redelegation. + description: >- + RedelegationEntry defines a redelegation object with relevant + metadata. + balance: + type: string + description: >- + RedelegationEntryResponse is equivalent to a RedelegationEntry + except that it - when the default options are not sufficient. If any of these are - present + contains a balance in addition to shares which is more suitable for + client - and can't be handled, the transaction will be rejected - non_critical_extension_options: + responses. + description: >- + RedelegationResponse is equivalent to a Redelegation except that its + entries + + contain a balance in addition to shares which is more suitable for client + + responses. + cosmos.staking.v1beta1.UnbondingDelegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the bech32-encoded address of the delegator. + validator_address: + type: string + description: validator_address is the bech32-encoded address of the validator. + entries: type: array items: type: object properties: - type_url: + creation_height: + type: string + format: int64 + description: creation_height is the height which the unbonding took place. + completion_time: + type: string + format: date-time + description: completion_time is the unix time for unbonding completion. + initial_balance: type: string description: >- - A URL/resource name that uniquely identifies the type of the - serialized + initial_balance defines the tokens initially scheduled to + receive at completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + description: >- + UnbondingDelegationEntry defines an unbonding object with relevant + metadata. + description: entries are the unbonding delegation entries. + description: |- + UnbondingDelegation stores all of a single delegator's unbonding bonds + for a single validator in an time-ordered list. + cosmos.staking.v1beta1.UnbondingDelegationEntry: + type: object + properties: + creation_height: + type: string + format: int64 + description: creation_height is the height which the unbonding took place. + completion_time: + type: string + format: date-time + description: completion_time is the unix time for unbonding completion. + initial_balance: + type: string + description: >- + initial_balance defines the tokens initially scheduled to receive at + completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + description: >- + UnbondingDelegationEntry defines an unbonding object with relevant + metadata. + cosmos.staking.v1beta1.Validator: + type: object + properties: + operator_address: + type: string + description: >- + operator_address defines the address of the validator's operator; bech + encoded in JSON. + consensus_pubkey: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - protocol buffer message. This string must contain at least + protocol buffer message. This string must contain at least - one "/" character. The last segment of the URL's path must - represent + one "/" character. The last segment of the URL's path must + represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in a - canonical form + `path/google.protobuf.Duration`). The name should be in a + canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary all types - that they + In practice, teams usually precompile into the binary all types + that they - expect it to use in the context of Any. However, for URLs which - use the + expect it to use in the context of Any. However, for URLs which + use the - scheme `http`, `https`, or no scheme, one can optionally set up - a type + scheme `http`, `https`, or no scheme, one can optionally set up a + type - server that maps type URLs to message definitions as follows: + server that maps type URLs to message definitions as follows: - * If no scheme is provided, `https` is assumed. + * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Note: this functionality is not currently available in the - official + Note: this functionality is not currently available in the + official - protobuf release, and it is not used for type URLs beginning - with + protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. - Schemes other than `http`, `https` (or the empty scheme) might - be + Schemes other than `http`, `https` (or the empty scheme) might be - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above specified + type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a - URL that describes the type of the serialized message. + URL that describes the type of the serialized message. - Protobuf library provides support to pack/unpack Any values in the - form + Protobuf library provides support to pack/unpack Any values in the + form - of utility functions or additional generated methods of the Any - type. + of utility functions or additional generated methods of the Any type. - Example 1: Pack and unpack a message in C++. + Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { ... - if (any.UnpackTo(&foo)) { - ... - } + } - Example 2: Pack and unpack a message in Java. + Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } + } - The pack methods provided by protobuf library will by default use + The pack methods provided by protobuf library will by default use - 'type.googleapis.com/full.type.name' as the type URL and the unpack + 'type.googleapis.com/full.type.name' as the type URL and the unpack - methods only use the fully qualified type name after the last '/' + methods only use the fully qualified type name after the last '/' - in the type URL, for example "foo.bar.com/x/y.z" will yield type + in the type URL, for example "foo.bar.com/x/y.z" will yield type - name "y.z". + name "y.z". - JSON + JSON - ==== + ==== - The JSON representation of an `Any` value uses the regular + The JSON representation of an `Any` value uses the regular - representation of the deserialized, embedded message, with an + representation of the deserialized, embedded message, with an - additional field `@type` which contains the type URL. Example: + additional field `@type` which contains the type URL. Example: - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - If the embedded message type is well-known and has a custom JSON + If the embedded message type is well-known and has a custom JSON - representation, that representation will be embedded adding a field + representation, that representation will be embedded adding a field - `value` which holds the custom JSON in addition to the `@type` + `value` which holds the custom JSON in addition to the `@type` - field. Example (for message [google.protobuf.Duration][]): + field. Example (for message [google.protobuf.Duration][]): - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - title: >- - extension_options are arbitrary options that can be added by chains + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + jailed: + type: boolean + format: boolean + description: >- + jailed defined whether the validator has been jailed from bonded + status or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: + type: string + description: >- + delegator_shares defines total shares issued to a validator's + delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. UPort or + Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: security_contact defines an optional email for security contact. + details: + type: string + description: details define other optional details. + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this + validator has begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the validator + to complete unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be used + for creating a validator. + type: object + properties: + rate: + type: string + description: >- + rate is the commission rate charged to delegators, as a + fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which validator + can ever charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the + validator commission, as a fraction. + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + min_self_delegation: + type: string + description: >- + min_self_delegation is the validator's self declared minimum self + delegation. + description: >- + Validator defines a validator, together with the total amount of the - when the default options are not sufficient. If any of these are - present + Validator's bond shares and their exchange rate to coins. Slashing results + in - and can't be handled, they will be ignored - description: TxBody is the body of a transaction that all signers sign over. - tendermint.abci.Event: + 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. + cosmos.base.abci.v1beta1.ABCIMessageLog: type: object properties: - type: + msg_index: + type: integer + format: int64 + log: type: string - attributes: + events: type: array items: type: object properties: - key: - type: string - format: byte - value: + type: type: string - format: byte - index: - type: boolean - format: boolean - description: 'EventAttribute is a single key-value pair, associated with an event.' - description: >- - Event allows application developers to attach additional information to - - ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and - ResponseDeliverTx. + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + description: >- + Attribute defines an attribute wrapper where the key and value + are - Later, transactions may be queried using these events. - tendermint.abci.EventAttribute: + strings instead of raw bytes. + description: |- + StringEvent defines en Event object wrapper where all the attributes + contain key/value pairs that are strings instead of raw bytes. + description: |- + Events contains a slice of Event objects that were emitted during some + execution. + description: >- + ABCIMessageLog defines a structure containing an indexed tx ABCI message + log. + cosmos.base.abci.v1beta1.Attribute: type: object properties: key: type: string - format: byte value: type: string - format: byte - index: - type: boolean - format: boolean - description: 'EventAttribute is a single key-value pair, associated with an event.' - cosmos.upgrade.v1beta1.Plan: + description: |- + Attribute defines an attribute wrapper where the key and value are + strings instead of raw bytes. + cosmos.base.abci.v1beta1.GasInfo: type: object properties: - name: + gas_wanted: + type: string + format: uint64 + description: GasWanted is the maximum units of work we allow this tx to perform. + gas_used: + type: string + format: uint64 + description: GasUsed is the amount of gas actually consumed. + description: GasInfo defines tx execution gas context. + cosmos.base.abci.v1beta1.Result: + type: object + properties: + data: type: string + format: byte description: >- - Sets the name for the upgrade. This name will be used by the upgraded + Data is any data returned from message or handler execution. It MUST + be - version of the software to apply any special "on-upgrade" commands - during + length prefixed in order to separate data from multiple message + executions. + log: + type: string + description: Log contains the log information from message or handler execution. + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + format: byte + value: + type: string + format: byte + index: + type: boolean + format: boolean + description: >- + EventAttribute is a single key-value pair, associated with an + event. + description: >- + Event allows application developers to attach additional information + to - the first BeginBlock method after the upgrade is applied. It is also - used + ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and + ResponseDeliverTx. - to detect whether a software version can handle a given upgrade. If no + Later, transactions may be queried using these events. + description: >- + Events contains a slice of Event objects that were emitted during + message + + or handler execution. + description: Result is the union of ResponseFormat and ResponseCheckTx. + cosmos.base.abci.v1beta1.StringEvent: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + description: |- + Attribute defines an attribute wrapper where the key and value are + strings instead of raw bytes. + description: |- + StringEvent defines en Event object wrapper where all the attributes + contain key/value pairs that are strings instead of raw bytes. + cosmos.base.abci.v1beta1.TxResponse: + type: object + properties: + height: + type: string + format: int64 + title: The block height + txhash: + type: string + description: The transaction hash. + codespace: + type: string + title: Namespace for the Code + code: + type: integer + format: int64 + description: Response code. + data: + type: string + description: 'Result bytes, if any.' + raw_log: + type: string + description: |- + The output of the application's logger (raw string). May be + non-deterministic. + logs: + type: array + items: + type: object + properties: + msg_index: + type: integer + format: int64 + log: + type: string + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + description: >- + Attribute defines an attribute wrapper where the key and + value are - upgrade handler with this name has been set in the software, it will - be + strings instead of raw bytes. + description: >- + StringEvent defines en Event object wrapper where all the + attributes - assumed that the software is out-of-date when the upgrade Time or - Height is + contain key/value pairs that are strings instead of raw bytes. + description: >- + Events contains a slice of Event objects that were emitted + during some - reached and the software will exit. - time: + execution. + description: >- + ABCIMessageLog defines a structure containing an indexed tx ABCI + message log. + description: >- + The output of the application's logger (typed). May be + non-deterministic. + info: type: string - format: date-time - description: |- - The time after which the upgrade must be performed. - Leave set to its zero value to use a pre-defined Height instead. - height: + description: Additional information. May be non-deterministic. + gas_wanted: type: string format: int64 - description: |- - The height at which the upgrade must be performed. - Only used if Time is not set. - info: + description: Amount of gas requested for transaction. + gas_used: type: string - title: |- - Any application specific upgrade info to be included on-chain - such as a git commit that validators could automatically upgrade to - upgraded_client_state: + format: int64 + description: Amount of gas consumed by transaction. + tx: type: object properties: type_url: @@ -52821,84 +51224,599 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + timestamp: + type: string + description: >- + 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. + description: >- + TxResponse defines a structure containing relevant tx data and metadata. + The + + tags are stringified and the log is JSON decoded. + cosmos.crypto.multisig.v1beta1.CompactBitArray: + type: object + properties: + extra_bits_stored: + type: integer + format: int64 + elems: + type: string + format: byte + description: |- + 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. + cosmos.tx.signing.v1beta1.SignMode: + type: string + enum: + - SIGN_MODE_UNSPECIFIED + - SIGN_MODE_DIRECT + - SIGN_MODE_TEXTUAL + - SIGN_MODE_LEGACY_AMINO_JSON + default: SIGN_MODE_UNSPECIFIED + description: |- + SignMode represents a signing mode with its own security guarantees. + + - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be + rejected + - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is + verified with raw bytes from Tx + - SIGN_MODE_TEXTUAL: 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 + - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses + Amino JSON and will be removed in the future + cosmos.tx.v1beta1.AuthInfo: + type: object + properties: + signer_infos: + type: array + items: + $ref: '#/definitions/cosmos.tx.v1beta1.SignerInfo' + description: >- + 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. + fee: + description: >- + 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. + type: object + properties: + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + 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. + title: amount is the amount of coins to be paid as a fee + gas_limit: + type: string + format: uint64 + title: >- + gas_limit is the maximum gas that can be used in transaction + processing + + before an out of gas error occurs + payer: + type: string + description: >- + 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. + granter: + type: string + title: >- + 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 + description: |- + AuthInfo describes the fee and signer modes that are used to sign a + transaction. + cosmos.tx.v1beta1.BroadcastMode: + type: string + enum: + - BROADCAST_MODE_UNSPECIFIED + - BROADCAST_MODE_BLOCK + - BROADCAST_MODE_SYNC + - BROADCAST_MODE_ASYNC + default: BROADCAST_MODE_UNSPECIFIED + description: >- + BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC + method. + + - BROADCAST_MODE_UNSPECIFIED: zero-value for mode ordering + - BROADCAST_MODE_BLOCK: BROADCAST_MODE_BLOCK defines a tx broadcasting mode where the client waits for + the tx to be committed in a block. + - BROADCAST_MODE_SYNC: BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for + a CheckTx execution response only. + - BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns + immediately. + cosmos.tx.v1beta1.BroadcastTxRequest: + type: object + properties: + tx_bytes: + type: string + format: byte + description: tx_bytes is the raw transaction. + mode: + type: string + enum: + - BROADCAST_MODE_UNSPECIFIED + - BROADCAST_MODE_BLOCK + - BROADCAST_MODE_SYNC + - BROADCAST_MODE_ASYNC + default: BROADCAST_MODE_UNSPECIFIED + description: >- + BroadcastMode specifies the broadcast mode for the TxService.Broadcast + RPC method. + + - BROADCAST_MODE_UNSPECIFIED: zero-value for mode ordering + - BROADCAST_MODE_BLOCK: BROADCAST_MODE_BLOCK defines a tx broadcasting mode where the client waits for + the tx to be committed in a block. + - BROADCAST_MODE_SYNC: BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for + a CheckTx execution response only. + - BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns + immediately. + description: |- + BroadcastTxRequest is the request type for the Service.BroadcastTxRequest + RPC method. + cosmos.tx.v1beta1.BroadcastTxResponse: + type: object + properties: + tx_response: + type: object + properties: + height: + type: string + format: int64 + title: The block height + txhash: + type: string + description: The transaction hash. + codespace: + type: string + title: Namespace for the Code + code: + type: integer + format: int64 + description: Response code. + data: + type: string + description: 'Result bytes, if any.' + raw_log: + type: string + description: |- + The output of the application's logger (raw string). May be + non-deterministic. + logs: + type: array + items: + type: object + properties: + msg_index: + type: integer + format: int64 + log: + type: string + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + description: >- + Attribute defines an attribute wrapper where the key + and value are + + strings instead of raw bytes. + description: >- + StringEvent defines en Event object wrapper where all the + attributes + + contain key/value pairs that are strings instead of raw + bytes. + description: >- + Events contains a slice of Event objects that were emitted + during some + + execution. + description: >- + ABCIMessageLog defines a structure containing an indexed tx ABCI + message log. + description: >- + The output of the application's logger (typed). May be + non-deterministic. + info: + type: string + description: Additional information. May be non-deterministic. + gas_wanted: + type: string + format: int64 + description: Amount of gas requested for transaction. + gas_used: + type: string + format: int64 + description: Amount of gas consumed by transaction. + tx: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + timestamp: + type: string + description: >- + 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. + description: >- + TxResponse defines a structure containing relevant tx data and + metadata. The + + tags are stringified and the log is JSON decoded. + description: |- + BroadcastTxResponse is the response type for the + Service.BroadcastTx method. + cosmos.tx.v1beta1.Fee: + type: object + properties: + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + 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. + title: amount is the amount of coins to be paid as a fee + gas_limit: + type: string + format: uint64 title: >- - IBC-enabled chains can opt-in to including the upgraded client state - in its upgrade plan - - This will make the chain commit to the correct upgraded (self) client - state before the upgrade occurs, + gas_limit is the maximum gas that can be used in transaction + processing - so that connecting chains can verify that the new upgraded client is - valid by verifying a proof on the + before an out of gas error occurs + payer: + type: string + description: >- + if unset, the first signer is responsible for paying the fees. If set, + the specified account must pay the fees. - previous version of the chain. + the payer must be a tx signer (and thus have signed this field in + AuthInfo). - This will allow IBC connections to persist smoothly across planned - chain upgrades - description: >- - Plan specifies information about a planned upgrade and when it should - occur. - cosmos.upgrade.v1beta1.QueryAppliedPlanResponse: - type: object - properties: - height: + setting this field does *not* change the ordering of required signers + for the transaction. + granter: type: string - format: int64 - description: height is the block height at which the plan was applied. + title: >- + 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 description: >- - QueryAppliedPlanResponse is the response type for the Query/AppliedPlan - RPC + Fee includes the amount of coins paid in fees and the maximum - method. - cosmos.upgrade.v1beta1.QueryCurrentPlanResponse: + 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. + cosmos.tx.v1beta1.GetTxResponse: type: object properties: - plan: - description: plan is the current upgrade plan. + tx: + $ref: '#/definitions/cosmos.tx.v1beta1.Tx' + description: tx is the queried transaction. + tx_response: type: object properties: - name: + height: type: string - description: >- - 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 + format: int64 + title: The block height + txhash: + type: string + description: The transaction hash. + codespace: + type: string + title: Namespace for the Code + code: + type: integer + format: int64 + description: Response code. + data: + type: string + description: 'Result bytes, if any.' + raw_log: + type: string + description: |- + The output of the application's logger (raw string). May be + non-deterministic. + logs: + type: array + items: + type: object + properties: + msg_index: + type: integer + format: int64 + log: + type: string + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + description: >- + Attribute defines an attribute wrapper where the key + and value are - upgrade handler with this name has been set in the software, it - will be + strings instead of raw bytes. + description: >- + StringEvent defines en Event object wrapper where all the + attributes - assumed that the software is out-of-date when the upgrade Time or - Height is + contain key/value pairs that are strings instead of raw + bytes. + description: >- + Events contains a slice of Event objects that were emitted + during some - reached and the software will exit. - time: + execution. + description: >- + ABCIMessageLog defines a structure containing an indexed tx ABCI + message log. + description: >- + The output of the application's logger (typed). May be + non-deterministic. + info: type: string - format: date-time - description: |- - The time after which the upgrade must be performed. - Leave set to its zero value to use a pre-defined Height instead. - height: + description: Additional information. May be non-deterministic. + gas_wanted: type: string format: int64 - description: |- - The height at which the upgrade must be performed. - Only used if Time is not set. - info: + description: Amount of gas requested for transaction. + gas_used: type: string - title: >- - Any application specific upgrade info to be included on-chain - - such as a git commit that validators could automatically upgrade - to - upgraded_client_state: + format: int64 + description: Amount of gas consumed by transaction. + tx: type: object properties: type_url: @@ -53059,33 +51977,438 @@ definitions: field. Example (for message [google.protobuf.Duration][]): - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - title: >- - IBC-enabled chains can opt-in to including the upgraded client - state in its upgrade plan + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + timestamp: + type: string + description: >- + 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. + description: >- + TxResponse defines a structure containing relevant tx data and + metadata. The + + tags are stringified and the log is JSON decoded. + description: GetTxResponse is the response type for the Service.GetTx method. + cosmos.tx.v1beta1.GetTxsEventResponse: + type: object + properties: + txs: + type: array + items: + $ref: '#/definitions/cosmos.tx.v1beta1.Tx' + description: txs is the list of queried transactions. + tx_responses: + type: array + items: + type: object + properties: + height: + type: string + format: int64 + title: The block height + txhash: + type: string + description: The transaction hash. + codespace: + type: string + title: Namespace for the Code + code: + type: integer + format: int64 + description: Response code. + data: + type: string + description: 'Result bytes, if any.' + raw_log: + type: string + description: |- + The output of the application's logger (raw string). May be + non-deterministic. + logs: + type: array + items: + type: object + properties: + msg_index: + type: integer + format: int64 + log: + type: string + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + description: >- + Attribute defines an attribute wrapper where the + key and value are + + strings instead of raw bytes. + description: >- + StringEvent defines en Event object wrapper where all + the attributes + + contain key/value pairs that are strings instead of raw + bytes. + description: >- + Events contains a slice of Event objects that were emitted + during some + + execution. + description: >- + ABCIMessageLog defines a structure containing an indexed tx + ABCI message log. + description: >- + The output of the application's logger (typed). May be + non-deterministic. + info: + type: string + description: Additional information. May be non-deterministic. + gas_wanted: + type: string + format: int64 + description: Amount of gas requested for transaction. + gas_used: + type: string + format: int64 + description: Amount of gas consumed by transaction. + tx: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + timestamp: + type: string + description: >- + 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. + description: >- + TxResponse defines a structure containing relevant tx data and + metadata. The + + tags are stringified and the log is JSON decoded. + description: tx_responses is the list of queried TxResponses. + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + GetTxsEventResponse is the response type for the Service.TxsByEvents + RPC method. + cosmos.tx.v1beta1.ModeInfo: + type: object + properties: + single: + title: single represents a single signer + type: object + properties: + mode: + title: mode is the signing mode of the single signer + type: string + enum: + - SIGN_MODE_UNSPECIFIED + - SIGN_MODE_DIRECT + - SIGN_MODE_TEXTUAL + - SIGN_MODE_LEGACY_AMINO_JSON + default: SIGN_MODE_UNSPECIFIED + description: >- + SignMode represents a signing mode with its own security + guarantees. + + - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be + rejected + - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is + verified with raw bytes from Tx + - SIGN_MODE_TEXTUAL: 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 + - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses + Amino JSON and will be removed in the future + multi: + $ref: '#/definitions/cosmos.tx.v1beta1.ModeInfo.Multi' + title: multi represents a nested multisig signer + description: ModeInfo describes the signing mode of a single or nested multisig signer. + cosmos.tx.v1beta1.ModeInfo.Multi: + type: object + properties: + bitarray: + title: bitarray specifies which keys within the multisig are signing + type: object + properties: + extra_bits_stored: + type: integer + format: int64 + elems: + type: string + format: byte + description: >- + 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 - This will make the chain commit to the correct upgraded (self) - client state before the upgrade occurs, + space after proto encoding. - so that connecting chains can verify that the new upgraded client - is valid by verifying a proof on the + This is not thread safe, and is not intended for concurrent usage. + mode_infos: + type: array + items: + $ref: '#/definitions/cosmos.tx.v1beta1.ModeInfo' + title: |- + mode_infos is the corresponding modes of the signers of the multisig + which could include nested multisig public keys + title: Multi is the mode info for a multisig public key + cosmos.tx.v1beta1.ModeInfo.Single: + type: object + properties: + mode: + title: mode is the signing mode of the single signer + type: string + enum: + - SIGN_MODE_UNSPECIFIED + - SIGN_MODE_DIRECT + - SIGN_MODE_TEXTUAL + - SIGN_MODE_LEGACY_AMINO_JSON + default: SIGN_MODE_UNSPECIFIED + description: >- + SignMode represents a signing mode with its own security guarantees. - previous version of the chain. + - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be + rejected + - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is + verified with raw bytes from Tx + - SIGN_MODE_TEXTUAL: SIGN_MODE_TEXTUAL is a future signing mode that will verify some + human-readable textual representation on top of the binary + representation - This will allow IBC connections to persist smoothly across planned - chain upgrades + from SIGN_MODE_DIRECT + - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses + Amino JSON and will be removed in the future + title: |- + 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 + cosmos.tx.v1beta1.OrderBy: + type: string + enum: + - ORDER_BY_UNSPECIFIED + - ORDER_BY_ASC + - ORDER_BY_DESC + default: ORDER_BY_UNSPECIFIED description: >- - QueryCurrentPlanResponse is the response type for the Query/CurrentPlan - RPC - - method. - cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse: + - ORDER_BY_UNSPECIFIED: ORDER_BY_UNSPECIFIED specifies an unknown sorting + order. OrderBy defaults to ASC in this case. + - ORDER_BY_ASC: ORDER_BY_ASC defines ascending order + - ORDER_BY_DESC: ORDER_BY_DESC defines descending order + title: OrderBy defines the sorting order + cosmos.tx.v1beta1.SignerInfo: type: object properties: - upgraded_consensus_state: + public_key: type: object properties: type_url: @@ -53244,1250 +52567,2097 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - description: >- - QueryUpgradedConsensusStateResponse is the response type for the - Query/UpgradedConsensusState + mode_info: + $ref: '#/definitions/cosmos.tx.v1beta1.ModeInfo' + title: |- + mode_info describes the signing mode of the signer and is a nested + structure to support nested multisig pubkey's + sequence: + type: string + format: uint64 + description: >- + sequence is the sequence of the account, which describes the - RPC method. - terra.tx.v1beta1.ComputeTaxRequest: - type: object - properties: - tx: - $ref: '#/definitions/cosmos.tx.v1beta1.Tx' - description: tx is the transaction to simulate. - description: |- - ComputeTaxRequest is the request type for the Service.ComputeTax - RPC method. - terra.tx.v1beta1.ComputeTaxResponse: - type: object - properties: - tax_amount: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. + number of committed transactions signed by a given address. It is used + to - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - title: amount is the amount of coins to be paid as a fee + prevent replay attacks. description: |- - ComputeTaxResponse is the response type for the Service.ComputeTax - RPC method. - terra.market.v1beta1.Params: - type: object - properties: - mint_base_pool: - type: string - format: byte - burn_base_pool: - type: string - format: byte - pool_recovery_period: - type: string - format: uint64 - min_stability_spread: - type: string - format: byte - description: Params defines the parameters for the market module. - terra.market.v1beta1.QueryBurnPoolDeltaResponse: - type: object - properties: - burn_pool_delta: - type: string - format: byte - title: >- - burn_pool_delta defines the gap between the BurnPool and the - BurnBasePool - description: >- - QueryBurnPoolDeltaResponse is the response type for the - Query/BurnPoolDelta RPC method. - terra.market.v1beta1.QueryMintPoolDeltaResponse: + SignerInfo describes the public key and signing mode of a single top-level + signer. + cosmos.tx.v1beta1.SimulateRequest: type: object properties: - mint_pool_delta: + tx: + $ref: '#/definitions/cosmos.tx.v1beta1.Tx' + description: |- + tx is the transaction to simulate. + Deprecated. Send raw tx bytes instead. + tx_bytes: type: string format: byte - title: >- - mint_pool_delta defines the gap between the MintPool and the - MintBasePool - description: >- - QueryMintPoolDeltaResponse is the response type for the - Query/MintPoolDelta RPC method. - terra.market.v1beta1.QueryParamsResponse: + description: tx_bytes is the raw transaction. + description: |- + SimulateRequest is the request type for the Service.Simulate + RPC method. + cosmos.tx.v1beta1.SimulateResponse: type: object properties: - params: - description: params defines the parameters of the module. + gas_info: + description: gas_info is the information about gas used in the simulation. type: object properties: - mint_base_pool: - type: string - format: byte - burn_base_pool: - type: string - format: byte - pool_recovery_period: + gas_wanted: type: string format: uint64 - min_stability_spread: + description: >- + GasWanted is the maximum units of work we allow this tx to + perform. + gas_used: type: string - format: byte - description: QueryParamsResponse is the response type for the Query/Params RPC method. - terra.market.v1beta1.QuerySwapResponse: - type: object - properties: - return_coin: - description: >- - return_coin defines the coin returned as a result of the swap - simulation. + format: uint64 + description: GasUsed is the amount of gas actually consumed. + result: + description: result is the result of the simulation. type: object properties: - denom: + data: type: string - amount: + format: byte + description: >- + Data is any data returned from message or handler execution. It + MUST be + + length prefixed in order to separate data from multiple message + executions. + log: type: string - description: QuerySwapResponse is the response type for the Query/Swap RPC method. - terra.oracle.v1beta1.AggregateExchangeRatePrevote: - type: object - properties: - hash: - type: string - voter: - type: string - submit_block: - type: string - format: uint64 - title: >- - struct for aggregate prevoting on the ExchangeRateVote. + description: >- + Log contains the log information from message or handler + execution. + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + format: byte + value: + type: string + format: byte + index: + type: boolean + format: boolean + description: >- + EventAttribute is a single key-value pair, associated with + an event. + description: >- + Event allows application developers to attach additional + information to - The purpose of aggregate prevote is to hide vote exchange rates with hash + ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and + ResponseDeliverTx. - which is formatted as hex string in SHA256("{salt}:{exchange - rate}{denom},...,{exchange rate}{denom}:{voter}") - terra.oracle.v1beta1.AggregateExchangeRateVote: - type: object - properties: - exchange_rate_tuples: - type: array - items: - type: object - properties: - denom: - type: string - exchange_rate: - type: string - title: >- - ExchangeRateTuple - struct to store interpreted exchange rates data - to store - voter: - type: string - description: |- - MsgAggregateExchangeRateVote - struct for voting on - the exchange rates of Luna denominated in various Terra assets. - terra.oracle.v1beta1.Denom: - type: object - properties: - name: - type: string - tobin_tax: - type: string - title: Denom - the object to hold configurations of each denom - terra.oracle.v1beta1.ExchangeRateTuple: - type: object - properties: - denom: - type: string - exchange_rate: - type: string - title: >- - ExchangeRateTuple - struct to store interpreted exchange rates data to - store - terra.oracle.v1beta1.Params: - type: object - properties: - vote_period: - type: string - format: uint64 - vote_threshold: - type: string - reward_band: - type: string - reward_distribution_window: - type: string - format: uint64 - whitelist: - type: array - items: - type: object - properties: - name: - type: string - tobin_tax: - type: string - title: Denom - the object to hold configurations of each denom - slash_fraction: - type: string - slash_window: - type: string - format: uint64 - min_valid_per_window: - type: string - description: Params defines the parameters for the oracle module. - terra.oracle.v1beta1.QueryActivesResponse: - type: object - properties: - actives: - type: array - items: - type: string - description: >- - actives defines a list of the denomination which oracle prices aggreed - upon. + Later, transactions may be queried using these events. + description: >- + Events contains a slice of Event objects that were emitted during + message + + or handler execution. description: |- - QueryActivesResponse is response type for the - Query/Actives RPC method. - terra.oracle.v1beta1.QueryAggregatePrevoteResponse: + SimulateResponse is the response type for the + Service.SimulateRPC method. + cosmos.tx.v1beta1.Tx: type: object properties: - aggregate_prevote: + body: + title: body is the processable content of the transaction type: object properties: - hash: - type: string - voter: - type: string - submit_block: - type: string - format: uint64 - title: >- - struct for aggregate prevoting on the ExchangeRateVote. + messages: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - The purpose of aggregate prevote is to hide vote exchange rates with - hash + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - which is formatted as hex string in SHA256("{salt}:{exchange - rate}{denom},...,{exchange rate}{denom}:{voter}") - description: |- - QueryAggregatePrevoteResponse is response type for the - Query/AggregatePrevote RPC method. - terra.oracle.v1beta1.QueryAggregatePrevotesResponse: - type: object - properties: - aggregate_prevotes: - type: array - items: - type: object - properties: - hash: - type: string - voter: - type: string - submit_block: - type: string - format: uint64 - title: >- - struct for aggregate prevoting on the ExchangeRateVote. + If the embedded message type is well-known and has a custom JSON - The purpose of aggregate prevote is to hide vote exchange rates with - hash + representation, that representation will be embedded adding a + field - which is formatted as hex string in SHA256("{salt}:{exchange - rate}{denom},...,{exchange rate}{denom}:{voter}") - title: >- - aggregate_prevotes defines all oracle aggregate prevotes submitted in - the current vote period - description: |- - QueryAggregatePrevotesResponse is response type for the - Query/AggregatePrevotes RPC method. - terra.oracle.v1beta1.QueryAggregateVoteResponse: - type: object - properties: - aggregate_vote: - title: >- - aggregate_vote defines oracle aggregate vote submitted by a validator - in the current vote period - type: object - properties: - exchange_rate_tuples: + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: >- + 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. + memo: + type: string + description: >- + 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 + https://github.com/cosmos/cosmos-sdk/issues/9122). + timeout_height: + type: string + format: uint64 + title: |- + timeout is the block height after which this transaction will not + be processed by the chain + extension_options: type: array items: type: object properties: - denom: + type_url: type: string - exchange_rate: + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: type: string - title: >- - ExchangeRateTuple - struct to store interpreted exchange rates - data to store - voter: - type: string - description: |- - MsgAggregateExchangeRateVote - struct for voting on - the exchange rates of Luna denominated in various Terra assets. - description: |- - QueryAggregateVoteResponse is response type for the - Query/AggregateVote RPC method. - terra.oracle.v1beta1.QueryAggregateVotesResponse: - type: object - properties: - aggregate_votes: - type: array - items: - type: object - properties: - exchange_rate_tuples: - type: array - items: - type: object - properties: - denom: - type: string - exchange_rate: - type: string - title: >- - ExchangeRateTuple - struct to store interpreted exchange rates - data to store - voter: - type: string - description: |- - MsgAggregateExchangeRateVote - struct for voting on - the exchange rates of Luna denominated in various Terra assets. - title: >- - aggregate_votes defines all oracle aggregate votes submitted in the - current vote period - description: |- - QueryAggregateVotesResponse is response type for the - Query/AggregateVotes RPC method. - terra.oracle.v1beta1.QueryExchangeRateResponse: - type: object - properties: - exchange_rate: - type: string - title: >- - exchange_rate defines the exchange rate of Luna denominated in various - Terra - description: |- - QueryExchangeRateResponse is response type for the - Query/ExchangeRate RPC method. - terra.oracle.v1beta1.QueryExchangeRatesResponse: - type: object - properties: - exchange_rates: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - DecCoin defines a token with a denomination and a decimal amount. + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a - NOTE: The amount field is an Dec which implements the custom method - signatures required by gogoproto. - description: >- - exchange_rates defines a list of the exchange rate for all whitelisted - denoms. - description: |- - QueryExchangeRatesResponse is response type for the - Query/ExchangeRates RPC method. - terra.oracle.v1beta1.QueryFeederDelegationResponse: - type: object - properties: - feeder_addr: - type: string - title: feeder_addr defines the feeder delegation of a validator - description: |- - QueryFeederDelegationResponse is response type for the - Query/FeederDelegation RPC method. - terra.oracle.v1beta1.QueryMissCounterResponse: - type: object - properties: - miss_counter: - type: string - format: uint64 - title: miss_counter defines the oracle miss counter of a validator - description: |- - QueryMissCounterResponse is response type for the - Query/MissCounter RPC method. - terra.oracle.v1beta1.QueryParamsResponse: - type: object - properties: - params: - description: params defines the parameters of the module. - type: object - properties: - vote_period: - type: string - format: uint64 - vote_threshold: - type: string - reward_band: - type: string - reward_distribution_window: - type: string - format: uint64 - whitelist: + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: >- + 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 + non_critical_extension_options: type: array items: type: object properties: - name: + type_url: type: string - tobin_tax: + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: type: string - title: Denom - the object to hold configurations of each denom - slash_fraction: - type: string - slash_window: - type: string - format: uint64 - min_valid_per_window: - type: string - description: QueryParamsResponse is the response type for the Query/Params RPC method. - terra.oracle.v1beta1.QueryTobinTaxResponse: - type: object - properties: - tobin_tax: - type: string - title: tobin_taxe defines the tobin tax of a denom - description: |- - QueryTobinTaxResponse is response type for the - Query/TobinTax RPC method. - terra.oracle.v1beta1.QueryTobinTaxesResponse: - type: object - properties: - tobin_taxes: - type: array - items: - type: object - properties: - name: - type: string - tobin_tax: - type: string - title: Denom - the object to hold configurations of each denom - title: tobin_taxes defines a list of the tobin tax of all whitelisted denoms - description: |- - QueryTobinTaxesResponse is response type for the - Query/TobinTaxes RPC method. - terra.oracle.v1beta1.QueryVoteTargetsResponse: - type: object - properties: - vote_targets: - type: array - items: - type: string - description: |- - vote_targets defines a list of the denomination in which everyone - should vote in the current vote period. - description: |- - QueryVoteTargetsResponse is response type for the - Query/VoteTargets RPC method. - terra.treasury.v1beta1.Params: - type: object - properties: - tax_policy: - type: object - properties: - rate_min: - type: string - rate_max: - type: string - cap: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + URL that describes the type of the serialized message. - NOTE: The amount field is an Int which implements the custom - method - signatures required by gogoproto. - change_rate_max: - type: string - title: >- - PolicyConstraints - defines policy constraints can be applied in tax & - reward policies - reward_policy: - type: object - properties: - rate_min: - type: string - rate_max: - type: string - cap: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. + Protobuf library provides support to pack/unpack Any values in + the form + of utility functions or additional generated methods of the Any + type. - NOTE: The amount field is an Int which implements the custom - method - signatures required by gogoproto. - change_rate_max: - type: string - title: >- - PolicyConstraints - defines policy constraints can be applied in tax & - reward policies - seigniorage_burden_target: - type: string - mining_increment: - type: string - window_short: - type: string - format: uint64 - window_long: - type: string - format: uint64 - window_probation: - type: string - format: uint64 - description: Params defines the parameters for the oracle module. - terra.treasury.v1beta1.PolicyConstraints: - type: object - properties: - rate_min: - type: string - rate_max: - type: string - cap: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. + Example 1: Pack and unpack a message in C++. - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - change_rate_max: - type: string - title: >- - PolicyConstraints - defines policy constraints can be applied in tax & - reward policies - terra.treasury.v1beta1.QueryIndicatorsResponse: - type: object - properties: - trl_year: - type: string - trl_month: - type: string - description: |- - QueryIndicatorsResponse is response type for the - Query/Indicators RPC method. - terra.treasury.v1beta1.QueryParamsResponse: - type: object - properties: - params: - description: params defines the parameters of the module. - type: object - properties: - tax_policy: - type: object - properties: - rate_min: - type: string - rate_max: - type: string - cap: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + Example 2: Pack and unpack a message in Java. - NOTE: The amount field is an Int which implements the custom - method + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - signatures required by gogoproto. - change_rate_max: - type: string - title: >- - PolicyConstraints - defines policy constraints can be applied in - tax & reward policies - reward_policy: - type: object - properties: - rate_min: - type: string - rate_max: - type: string - cap: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. + Example 3: Pack and unpack a message in Python. + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - NOTE: The amount field is an Int which implements the custom - method + Example 4: Pack and unpack a message in Go - signatures required by gogoproto. - change_rate_max: - type: string + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } title: >- - PolicyConstraints - defines policy constraints can be applied in - tax & reward policies - seigniorage_burden_target: - type: string - mining_increment: - type: string - window_short: - type: string - format: uint64 - window_long: - type: string - format: uint64 - window_probation: - type: string - format: uint64 - description: QueryParamsResponse is the response type for the Query/Params RPC method. - terra.treasury.v1beta1.QueryRewardWeightResponse: - type: object - properties: - reward_weight: - type: string - description: |- - QueryRewardWeightResponse is response type for the - Query/RewardWeight RPC method. - terra.treasury.v1beta1.QuerySeigniorageProceedsResponse: - type: object - properties: - seigniorage_proceeds: - type: string - description: |- - QuerySeigniorageProceedsResponse is response type for the - Query/SeigniorageProceeds RPC method. - terra.treasury.v1beta1.QueryTaxCapResponse: - type: object - properties: - tax_cap: - type: string - description: |- - QueryTaxCapResponse is response type for the - Query/TaxCap RPC method. - terra.treasury.v1beta1.QueryTaxCapsResponse: - type: object - properties: - tax_caps: + 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 + description: TxBody is the body of a transaction that all signers sign over. + auth_info: + $ref: '#/definitions/cosmos.tx.v1beta1.AuthInfo' + title: |- + auth_info is the authorization related content of the transaction, + specifically signers, signer modes and fee + signatures: type: array items: - type: object - properties: - denom: - type: string - tax_cap: - type: string - description: |- - QueryTaxCapsResponseItem is response item type for the - Query/TaxCaps RPC method. - description: |- - QueryTaxCapsResponse is response type for the - Query/TaxCaps RPC method. - terra.treasury.v1beta1.QueryTaxCapsResponseItem: - type: object - properties: - denom: - type: string - tax_cap: - type: string - description: |- - QueryTaxCapsResponseItem is response item type for the - Query/TaxCaps RPC method. - terra.treasury.v1beta1.QueryTaxProceedsResponse: + type: string + format: byte + description: >- + 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. + description: Tx is the standard type used for broadcasting transactions. + cosmos.tx.v1beta1.TxBody: type: object properties: - tax_proceeds: + messages: type: array items: type: object properties: - denom: + type_url: type: string - amount: + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up + a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + value: type: string - description: |- - Coin defines a token with a denomination and an amount. + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - description: |- - QueryTaxProceedsResponse is response type for the - Query/TaxProceeds RPC method. - terra.treasury.v1beta1.QueryTaxRateResponse: - type: object - properties: - tax_rate: - type: string - description: |- - QueryTaxRateResponse is response type for the - Query/TaxRate RPC method. - terra.msgauth.v1beta1.AuthorizationGrant: - type: object - properties: - authorization: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: >- + 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. + memo: + type: string + description: >- + memo is any arbitrary note/comment to be added to the transaction. - protocol buffer message. This string must contain at least + WARNING: in clients, any publicly exposed text should not be called + memo, - one "/" character. The last segment of the URL's path must - represent + but should be called `note` instead (see + https://github.com/cosmos/cosmos-sdk/issues/9122). + timeout_height: + type: string + format: uint64 + title: |- + timeout is the block height after which this transaction will not + be processed by the chain + extension_options: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - the fully qualified name of the type (as in + protocol buffer message. This string must contain at least - `path/google.protobuf.Duration`). The name should be in a - canonical form + one "/" character. The last segment of the URL's path must + represent - (e.g., leading "." is not accepted). + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a + canonical form - In practice, teams usually precompile into the binary all types - that they + (e.g., leading "." is not accepted). - expect it to use in the context of Any. However, for URLs which - use the - scheme `http`, `https`, or no scheme, one can optionally set up a - type + In practice, teams usually precompile into the binary all types + that they - server that maps type URLs to message definitions as follows: + expect it to use in the context of Any. However, for URLs which + use the + scheme `http`, `https`, or no scheme, one can optionally set up + a type - * If no scheme is provided, `https` is assumed. + server that maps type URLs to message definitions as follows: - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - Note: this functionality is not currently available in the - official + * If no scheme is provided, `https` is assumed. - protobuf release, and it is not used for type URLs beginning with + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - type.googleapis.com. + Note: this functionality is not currently available in the + official + protobuf release, and it is not used for type URLs beginning + with - Schemes other than `http`, `https` (or the empty scheme) might be + type.googleapis.com. - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above specified - type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a - URL that describes the type of the serialized message. + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + URL that describes the type of the serialized message. - Protobuf library provides support to pack/unpack Any values in the - form - of utility functions or additional generated methods of the Any type. + Protobuf library provides support to pack/unpack Any values in the + form + of utility functions or additional generated methods of the Any + type. - Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); ... - } + if (any.UnpackTo(&foo)) { + ... + } - Example 2: Pack and unpack a message in Java. + Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) + foo = Foo(...) + any = Any() + any.Pack(foo) ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) ... - } + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } - The pack methods provided by protobuf library will by default use + The pack methods provided by protobuf library will by default use - 'type.googleapis.com/full.type.name' as the type URL and the unpack + 'type.googleapis.com/full.type.name' as the type URL and the unpack - methods only use the fully qualified type name after the last '/' + methods only use the fully qualified type name after the last '/' - in the type URL, for example "foo.bar.com/x/y.z" will yield type + in the type URL, for example "foo.bar.com/x/y.z" will yield type - name "y.z". + name "y.z". - JSON + JSON - ==== + ==== - The JSON representation of an `Any` value uses the regular + The JSON representation of an `Any` value uses the regular - representation of the deserialized, embedded message, with an + representation of the deserialized, embedded message, with an - additional field `@type` which contains the type URL. Example: + additional field `@type` which contains the type URL. Example: - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - If the embedded message type is well-known and has a custom JSON + If the embedded message type is well-known and has a custom JSON - representation, that representation will be embedded adding a field + representation, that representation will be embedded adding a field - `value` which holds the custom JSON in addition to the `@type` + `value` which holds the custom JSON in addition to the `@type` - field. Example (for message [google.protobuf.Duration][]): + field. Example (for message [google.protobuf.Duration][]): - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - expiration: - type: string - format: date-time - title: AuthorizationGrant represent the stored grant instance in the keeper store - terra.msgauth.v1beta1.QueryAllGrantsResponse: - type: object - properties: - grants: + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: >- + 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 + non_critical_extension_options: type: array items: type: object properties: - authorization: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - protocol buffer message. This string must contain at least + protocol buffer message. This string must contain at least - one "/" character. The last segment of the URL's path must - represent + one "/" character. The last segment of the URL's path must + represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in a - canonical form + `path/google.protobuf.Duration`). The name should be in a + canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary all - types that they + In practice, teams usually precompile into the binary all types + that they - expect it to use in the context of Any. However, for URLs - which use the + expect it to use in the context of Any. However, for URLs which + use the - scheme `http`, `https`, or no scheme, one can optionally set - up a type + scheme `http`, `https`, or no scheme, one can optionally set up + a type - server that maps type URLs to message definitions as - follows: + server that maps type URLs to message definitions as follows: - * If no scheme is provided, `https` is assumed. + * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Note: this functionality is not currently available in the - official + Note: this functionality is not currently available in the + official - protobuf release, and it is not used for type URLs beginning - with + protobuf release, and it is not used for type URLs beginning + with - type.googleapis.com. + type.googleapis.com. - Schemes other than `http`, `https` (or the empty scheme) - might be + Schemes other than `http`, `https` (or the empty scheme) might + be - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. + used with implementation specific semantics. + value: + type: string + format: byte description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a - URL that describes the type of the serialized message. + URL that describes the type of the serialized message. - Protobuf library provides support to pack/unpack Any values in - the form + Protobuf library provides support to pack/unpack Any values in the + form - of utility functions or additional generated methods of the Any - type. + of utility functions or additional generated methods of the Any + type. - Example 1: Pack and unpack a message in C++. + Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - Example 2: Pack and unpack a message in Java. + Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } - The pack methods provided by protobuf library will by default - use + The pack methods provided by protobuf library will by default use - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + 'type.googleapis.com/full.type.name' as the type URL and the unpack - methods only use the fully qualified type name after the last - '/' + methods only use the fully qualified type name after the last '/' - in the type URL, for example "foo.bar.com/x/y.z" will yield type + in the type URL, for example "foo.bar.com/x/y.z" will yield type - name "y.z". + name "y.z". - JSON + JSON - ==== + ==== - The JSON representation of an `Any` value uses the regular + The JSON representation of an `Any` value uses the regular - representation of the deserialized, embedded message, with an + representation of the deserialized, embedded message, with an - additional field `@type` which contains the type URL. Example: + additional field `@type` which contains the type URL. Example: - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - If the embedded message type is well-known and has a custom JSON + If the embedded message type is well-known and has a custom JSON - representation, that representation will be embedded adding a - field + representation, that representation will be embedded adding a field - `value` which holds the custom JSON in addition to the `@type` + `value` which holds the custom JSON in addition to the `@type` - field. Example (for message [google.protobuf.Duration][]): + field. Example (for message [google.protobuf.Duration][]): - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - expiration: - type: string - format: date-time - title: >- - AuthorizationGrant represent the stored grant instance in the keeper - store - description: >- - QueryAllGrantsResponse is the response type for the Query/AllGrants RPC - method. - terra.msgauth.v1beta1.QueryGrantsResponse: + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: >- + 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 + description: TxBody is the body of a transaction that all signers sign over. + tendermint.abci.Event: type: object properties: - grants: + type: + type: string + attributes: type: array items: type: object properties: - authorization: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all - types that they - - expect it to use in the context of Any. However, for URLs - which use the - - scheme `http`, `https`, or no scheme, one can optionally set - up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. + key: + type: string + format: byte + value: + type: string + format: byte + index: + type: boolean + format: boolean + description: 'EventAttribute is a single key-value pair, associated with an event.' + description: >- + Event allows application developers to attach additional information to - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and + ResponseDeliverTx. - Note: this functionality is not currently available in the - official + Later, transactions may be queried using these events. + tendermint.abci.EventAttribute: + type: object + properties: + key: + type: string + format: byte + value: + type: string + format: byte + index: + type: boolean + format: boolean + description: 'EventAttribute is a single key-value pair, associated with an event.' + cosmos.upgrade.v1beta1.Plan: + type: object + properties: + name: + type: string + description: >- + Sets the name for the upgrade. This name will be used by the upgraded - protobuf release, and it is not used for type URLs beginning - with + version of the software to apply any special "on-upgrade" commands + during - type.googleapis.com. + 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 - Schemes other than `http`, `https` (or the empty scheme) - might be + upgrade handler with this name has been set in the software, it will + be - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a + assumed that the software is out-of-date when the upgrade Time or + Height is - URL that describes the type of the serialized message. + reached and the software will exit. + height: + type: string + format: int64 + description: |- + The height at which the upgrade must be performed. + Only used if Time is not set. + info: + type: string + title: |- + Any application specific upgrade info to be included on-chain + such as a git commit that validators could automatically upgrade to + description: >- + Plan specifies information about a planned upgrade and when it should + occur. + cosmos.upgrade.v1beta1.QueryAppliedPlanResponse: + type: object + properties: + height: + type: string + format: int64 + description: height is the block height at which the plan was applied. + description: >- + QueryAppliedPlanResponse is the response type for the Query/AppliedPlan + RPC + method. + cosmos.upgrade.v1beta1.QueryCurrentPlanResponse: + type: object + properties: + plan: + description: plan is the current upgrade plan. + type: object + properties: + name: + type: string + description: >- + Sets the name for the upgrade. This name will be used by the + upgraded - Protobuf library provides support to pack/unpack Any values in - the form + version of the software to apply any special "on-upgrade" commands + during - of utility functions or additional generated methods of the Any - type. + 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 - Example 1: Pack and unpack a message in C++. + upgrade handler with this name has been set in the software, it + will be - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + assumed that the software is out-of-date when the upgrade Time or + Height is - Example 2: Pack and unpack a message in Java. + reached and the software will exit. + height: + type: string + format: int64 + description: |- + The height at which the upgrade must be performed. + Only used if Time is not set. + info: + type: string + title: >- + Any application specific upgrade info to be included on-chain - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + such as a git commit that validators could automatically upgrade + to + description: >- + QueryCurrentPlanResponse is the response type for the Query/CurrentPlan + RPC - Example 3: Pack and unpack a message in Python. + method. + cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse: + type: object + properties: + upgraded_consensus_state: + type: string + format: byte + description: >- + QueryUpgradedConsensusStateResponse is the response type for the + Query/UpgradedConsensusState - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + RPC method. + terra.tx.v1beta1.ComputeTaxRequest: + type: object + properties: + tx: + $ref: '#/definitions/cosmos.tx.v1beta1.Tx' + description: tx is the transaction to simulate. + description: |- + ComputeTaxRequest is the request type for the Service.ComputeTax + RPC method. + terra.tx.v1beta1.ComputeTaxResponse: + type: object + properties: + tax_amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. - Example 4: Pack and unpack a message in Go + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + title: amount is the amount of coins to be paid as a fee + description: |- + ComputeTaxResponse is the response type for the Service.ComputeTax + RPC method. + terra.market.v1beta1.Params: + type: object + properties: + mint_base_pool: + type: string + format: byte + burn_base_pool: + type: string + format: byte + pool_recovery_period: + type: string + format: uint64 + min_stability_spread: + type: string + format: byte + description: Params defines the parameters for the market module. + terra.market.v1beta1.QueryBurnPoolDeltaResponse: + type: object + properties: + burn_pool_delta: + type: string + format: byte + title: >- + burn_pool_delta defines the gap between the BurnPool and the + BurnBasePool + description: >- + QueryBurnPoolDeltaResponse is the response type for the + Query/BurnPoolDelta RPC method. + terra.market.v1beta1.QueryMintPoolDeltaResponse: + type: object + properties: + mint_pool_delta: + type: string + format: byte + title: >- + mint_pool_delta defines the gap between the MintPool and the + MintBasePool + description: >- + QueryMintPoolDeltaResponse is the response type for the + Query/MintPoolDelta RPC method. + terra.market.v1beta1.QueryParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + mint_base_pool: + type: string + format: byte + burn_base_pool: + type: string + format: byte + pool_recovery_period: + type: string + format: uint64 + min_stability_spread: + type: string + format: byte + description: QueryParamsResponse is the response type for the Query/Params RPC method. + terra.market.v1beta1.QuerySwapResponse: + type: object + properties: + return_coin: + description: >- + return_coin defines the coin returned as a result of the swap + simulation. + type: object + properties: + denom: + type: string + amount: + type: string + description: QuerySwapResponse is the response type for the Query/Swap RPC method. + terra.oracle.v1beta1.AggregateExchangeRatePrevote: + type: object + properties: + hash: + type: string + voter: + type: string + submit_block: + type: string + format: uint64 + title: >- + struct for aggregate prevoting on the ExchangeRateVote. - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } + The purpose of aggregate prevote is to hide vote exchange rates with hash - The pack methods provided by protobuf library will by default - use + which is formatted as hex string in SHA256("{salt}:{exchange + rate}{denom},...,{exchange rate}{denom}:{voter}") + terra.oracle.v1beta1.AggregateExchangeRateVote: + type: object + properties: + exchange_rate_tuples: + type: array + items: + type: object + properties: + denom: + type: string + exchange_rate: + type: string + title: >- + ExchangeRateTuple - struct to store interpreted exchange rates data + to store + voter: + type: string + description: |- + MsgAggregateExchangeRateVote - struct for voting on + the exchange rates of Luna denominated in various Terra assets. + terra.oracle.v1beta1.Denom: + type: object + properties: + name: + type: string + tobin_tax: + type: string + title: Denom - the object to hold configurations of each denom + terra.oracle.v1beta1.ExchangeRateTuple: + type: object + properties: + denom: + type: string + exchange_rate: + type: string + title: >- + ExchangeRateTuple - struct to store interpreted exchange rates data to + store + terra.oracle.v1beta1.Params: + type: object + properties: + vote_period: + type: string + format: uint64 + vote_threshold: + type: string + reward_band: + type: string + reward_distribution_window: + type: string + format: uint64 + whitelist: + type: array + items: + type: object + properties: + name: + type: string + tobin_tax: + type: string + title: Denom - the object to hold configurations of each denom + slash_fraction: + type: string + slash_window: + type: string + format: uint64 + min_valid_per_window: + type: string + description: Params defines the parameters for the oracle module. + terra.oracle.v1beta1.QueryActivesResponse: + type: object + properties: + actives: + type: array + items: + type: string + description: >- + actives defines a list of the denomination which oracle prices aggreed + upon. + description: |- + QueryActivesResponse is response type for the + Query/Actives RPC method. + terra.oracle.v1beta1.QueryAggregatePrevoteResponse: + type: object + properties: + aggregate_prevote: + type: object + properties: + hash: + type: string + voter: + type: string + submit_block: + type: string + format: uint64 + title: >- + struct for aggregate prevoting on the ExchangeRateVote. - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + The purpose of aggregate prevote is to hide vote exchange rates with + hash - methods only use the fully qualified type name after the last - '/' + which is formatted as hex string in SHA256("{salt}:{exchange + rate}{denom},...,{exchange rate}{denom}:{voter}") + description: |- + QueryAggregatePrevoteResponse is response type for the + Query/AggregatePrevote RPC method. + terra.oracle.v1beta1.QueryAggregatePrevotesResponse: + type: object + properties: + aggregate_prevotes: + type: array + items: + type: object + properties: + hash: + type: string + voter: + type: string + submit_block: + type: string + format: uint64 + title: >- + struct for aggregate prevoting on the ExchangeRateVote. - in the type URL, for example "foo.bar.com/x/y.z" will yield type + The purpose of aggregate prevote is to hide vote exchange rates with + hash - name "y.z". + which is formatted as hex string in SHA256("{salt}:{exchange + rate}{denom},...,{exchange rate}{denom}:{voter}") + title: >- + aggregate_prevotes defines all oracle aggregate prevotes submitted in + the current vote period + description: |- + QueryAggregatePrevotesResponse is response type for the + Query/AggregatePrevotes RPC method. + terra.oracle.v1beta1.QueryAggregateVoteResponse: + type: object + properties: + aggregate_vote: + title: >- + aggregate_vote defines oracle aggregate vote submitted by a validator + in the current vote period + type: object + properties: + exchange_rate_tuples: + type: array + items: + type: object + properties: + denom: + type: string + exchange_rate: + type: string + title: >- + ExchangeRateTuple - struct to store interpreted exchange rates + data to store + voter: + type: string + description: |- + MsgAggregateExchangeRateVote - struct for voting on + the exchange rates of Luna denominated in various Terra assets. + description: |- + QueryAggregateVoteResponse is response type for the + Query/AggregateVote RPC method. + terra.oracle.v1beta1.QueryAggregateVotesResponse: + type: object + properties: + aggregate_votes: + type: array + items: + type: object + properties: + exchange_rate_tuples: + type: array + items: + type: object + properties: + denom: + type: string + exchange_rate: + type: string + title: >- + ExchangeRateTuple - struct to store interpreted exchange rates + data to store + voter: + type: string + description: |- + MsgAggregateExchangeRateVote - struct for voting on + the exchange rates of Luna denominated in various Terra assets. + title: >- + aggregate_votes defines all oracle aggregate votes submitted in the + current vote period + description: |- + QueryAggregateVotesResponse is response type for the + Query/AggregateVotes RPC method. + terra.oracle.v1beta1.QueryExchangeRateResponse: + type: object + properties: + exchange_rate: + type: string + title: >- + exchange_rate defines the exchange rate of Luna denominated in various + Terra + description: |- + QueryExchangeRateResponse is response type for the + Query/ExchangeRate RPC method. + terra.oracle.v1beta1.QueryExchangeRatesResponse: + type: object + properties: + exchange_rates: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + 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. + description: >- + exchange_rates defines a list of the exchange rate for all whitelisted + denoms. + description: |- + QueryExchangeRatesResponse is response type for the + Query/ExchangeRates RPC method. + terra.oracle.v1beta1.QueryFeederDelegationResponse: + type: object + properties: + feeder_addr: + type: string + title: feeder_addr defines the feeder delegation of a validator + description: |- + QueryFeederDelegationResponse is response type for the + Query/FeederDelegation RPC method. + terra.oracle.v1beta1.QueryMissCounterResponse: + type: object + properties: + miss_counter: + type: string + format: uint64 + title: miss_counter defines the oracle miss counter of a validator + description: |- + QueryMissCounterResponse is response type for the + Query/MissCounter RPC method. + terra.oracle.v1beta1.QueryParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + vote_period: + type: string + format: uint64 + vote_threshold: + type: string + reward_band: + type: string + reward_distribution_window: + type: string + format: uint64 + whitelist: + type: array + items: + type: object + properties: + name: + type: string + tobin_tax: + type: string + title: Denom - the object to hold configurations of each denom + slash_fraction: + type: string + slash_window: + type: string + format: uint64 + min_valid_per_window: + type: string + description: QueryParamsResponse is the response type for the Query/Params RPC method. + terra.oracle.v1beta1.QueryTobinTaxResponse: + type: object + properties: + tobin_tax: + type: string + title: tobin_taxe defines the tobin tax of a denom + description: |- + QueryTobinTaxResponse is response type for the + Query/TobinTax RPC method. + terra.oracle.v1beta1.QueryTobinTaxesResponse: + type: object + properties: + tobin_taxes: + type: array + items: + type: object + properties: + name: + type: string + tobin_tax: + type: string + title: Denom - the object to hold configurations of each denom + title: tobin_taxes defines a list of the tobin tax of all whitelisted denoms + description: |- + QueryTobinTaxesResponse is response type for the + Query/TobinTaxes RPC method. + terra.oracle.v1beta1.QueryVoteTargetsResponse: + type: object + properties: + vote_targets: + type: array + items: + type: string + description: |- + vote_targets defines a list of the denomination in which everyone + should vote in the current vote period. + description: |- + QueryVoteTargetsResponse is response type for the + Query/VoteTargets RPC method. + terra.treasury.v1beta1.Params: + type: object + properties: + tax_policy: + type: object + properties: + rate_min: + type: string + rate_max: + type: string + cap: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. - JSON + NOTE: The amount field is an Int which implements the custom + method - ==== + signatures required by gogoproto. + change_rate_max: + type: string + title: >- + PolicyConstraints - defines policy constraints can be applied in tax & + reward policies + reward_policy: + type: object + properties: + rate_min: + type: string + rate_max: + type: string + cap: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. - The JSON representation of an `Any` value uses the regular - representation of the deserialized, embedded message, with an + NOTE: The amount field is an Int which implements the custom + method - additional field `@type` which contains the type URL. Example: + signatures required by gogoproto. + change_rate_max: + type: string + title: >- + PolicyConstraints - defines policy constraints can be applied in tax & + reward policies + seigniorage_burden_target: + type: string + mining_increment: + type: string + window_short: + type: string + format: uint64 + window_long: + type: string + format: uint64 + window_probation: + type: string + format: uint64 + description: Params defines the parameters for the oracle module. + terra.treasury.v1beta1.PolicyConstraints: + type: object + properties: + rate_min: + type: string + rate_max: + type: string + cap: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + change_rate_max: + type: string + title: >- + PolicyConstraints - defines policy constraints can be applied in tax & + reward policies + terra.treasury.v1beta1.QueryIndicatorsResponse: + type: object + properties: + trl_year: + type: string + trl_month: + type: string + description: |- + QueryIndicatorsResponse is response type for the + Query/Indicators RPC method. + terra.treasury.v1beta1.QueryParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + tax_policy: + type: object + properties: + rate_min: + type: string + rate_max: + type: string + cap: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - If the embedded message type is well-known and has a custom JSON + NOTE: The amount field is an Int which implements the custom + method - representation, that representation will be embedded adding a - field + signatures required by gogoproto. + change_rate_max: + type: string + title: >- + PolicyConstraints - defines policy constraints can be applied in + tax & reward policies + reward_policy: + type: object + properties: + rate_min: + type: string + rate_max: + type: string + cap: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. - `value` which holds the custom JSON in addition to the `@type` - field. Example (for message [google.protobuf.Duration][]): + NOTE: The amount field is an Int which implements the custom + method - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - expiration: + signatures required by gogoproto. + change_rate_max: + type: string + title: >- + PolicyConstraints - defines policy constraints can be applied in + tax & reward policies + seigniorage_burden_target: + type: string + mining_increment: + type: string + window_short: + type: string + format: uint64 + window_long: + type: string + format: uint64 + window_probation: + type: string + format: uint64 + description: QueryParamsResponse is the response type for the Query/Params RPC method. + terra.treasury.v1beta1.QueryRewardWeightResponse: + type: object + properties: + reward_weight: + type: string + description: |- + QueryRewardWeightResponse is response type for the + Query/RewardWeight RPC method. + terra.treasury.v1beta1.QuerySeigniorageProceedsResponse: + type: object + properties: + seigniorage_proceeds: + type: string + description: |- + QuerySeigniorageProceedsResponse is response type for the + Query/SeigniorageProceeds RPC method. + terra.treasury.v1beta1.QueryTaxCapResponse: + type: object + properties: + tax_cap: + type: string + description: |- + QueryTaxCapResponse is response type for the + Query/TaxCap RPC method. + terra.treasury.v1beta1.QueryTaxCapsResponse: + type: object + properties: + tax_caps: + type: array + items: + type: object + properties: + denom: type: string - format: date-time - title: >- - AuthorizationGrant represent the stored grant instance in the keeper - store - description: QueryGrantsResponse is the response type for the Query/Grants RPC method. + tax_cap: + type: string + description: |- + QueryTaxCapsResponseItem is response item type for the + Query/TaxCaps RPC method. + description: |- + QueryTaxCapsResponse is response type for the + Query/TaxCaps RPC method. + terra.treasury.v1beta1.QueryTaxCapsResponseItem: + type: object + properties: + denom: + type: string + tax_cap: + type: string + description: |- + QueryTaxCapsResponseItem is response item type for the + Query/TaxCaps RPC method. + terra.treasury.v1beta1.QueryTaxProceedsResponse: + type: object + properties: + tax_proceeds: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + 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. + description: |- + QueryTaxProceedsResponse is response type for the + Query/TaxProceeds RPC method. + terra.treasury.v1beta1.QueryTaxRateResponse: + type: object + properties: + tax_rate: + type: string + description: |- + QueryTaxRateResponse is response type for the + Query/TaxRate RPC method. terra.wasm.v1beta1.CodeInfo: type: object properties: @@ -55050,17 +55220,20 @@ definitions: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while - keeping RevisionNumber + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to - the same. However some consensus algorithms may choose to reset the + reset the height in certain conditions e.g. hard forks, state-machine - height in certain conditions e.g. hard forks, state-machine breaking - changes + breaking changes In these cases, the RevisionNumber is incremented so + that - In these cases, the RevisionNumber is incremented so that height - continues to + height continues to be monitonically increasing even as the + RevisionHeight - be monitonically increasing even as the RevisionHeight gets reset + gets reset title: |- QueryChannelClientStateResponse is the Response type for the Query/QueryChannelClientState RPC method @@ -55248,17 +55421,20 @@ definitions: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while - keeping RevisionNumber + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to - the same. However some consensus algorithms may choose to reset the + reset the height in certain conditions e.g. hard forks, state-machine - height in certain conditions e.g. hard forks, state-machine breaking - changes + breaking changes In these cases, the RevisionNumber is incremented so + that - In these cases, the RevisionNumber is incremented so that height - continues to + height continues to be monitonically increasing even as the + RevisionHeight - be monitonically increasing even as the RevisionHeight gets reset + gets reset title: |- QueryChannelClientStateResponse is the Response type for the Query/QueryChannelClientState RPC method @@ -55352,17 +55528,20 @@ definitions: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while - keeping RevisionNumber + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to - the same. However some consensus algorithms may choose to reset the + reset the height in certain conditions e.g. hard forks, state-machine - height in certain conditions e.g. hard forks, state-machine breaking - changes + breaking changes In these cases, the RevisionNumber is incremented so + that - In these cases, the RevisionNumber is incremented so that height - continues to + height continues to be monitonically increasing even as the + RevisionHeight - be monitonically increasing even as the RevisionHeight gets reset + gets reset description: >- QueryChannelResponse is the response type for the Query/Channel RPC method. @@ -55488,149 +55667,155 @@ definitions: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while - keeping RevisionNumber + 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 + description: >- + QueryChannelsResponse is the response type for the Query/Channels RPC + method. + ibc.core.channel.v1.QueryConnectionChannelsResponse: + type: object + properties: + channels: + type: array + items: + type: object + properties: + state: + title: current state of the channel end + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + - STATE_CLOSED + default: STATE_UNINITIALIZED_UNSPECIFIED + description: |- + State defines if a channel is in one of the following states: + CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. + + - STATE_UNINITIALIZED_UNSPECIFIED: Default State + - STATE_INIT: A channel has just started the opening handshake. + - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. + - STATE_OPEN: A channel has completed the handshake. Open channels are + ready to send and receive packets. + - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive + packets. + ordering: + title: whether the channel is ordered or unordered + type: string + enum: + - ORDER_NONE_UNSPECIFIED + - ORDER_UNORDERED + - ORDER_ORDERED + default: ORDER_NONE_UNSPECIFIED + description: |- + - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering + - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in + which they were sent. + - ORDER_ORDERED: packets are delivered exactly in the order which they were sent + counterparty: + title: counterparty channel end + type: object + properties: + port_id: + type: string + description: >- + port on the counterparty chain which owns the other end of + the channel. + channel_id: + type: string + title: channel end on the counterparty chain + connection_hops: + type: array + items: + type: string + title: >- + list of connection identifiers, in order, along which packets + sent on + + this channel will travel + version: + type: string + title: >- + opaque channel version, which is agreed upon during the + handshake + port_id: + type: string + title: port identifier + channel_id: + type: string + title: channel identifier + description: |- + IdentifiedChannel defines a channel with additional port and channel + identifier fields. + description: list of channels associated with a connection. + pagination: + title: pagination response + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + 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; + } + height: + title: query block height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping - 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 - description: >- - QueryChannelsResponse is the response type for the Query/Channels RPC - method. - ibc.core.channel.v1.QueryConnectionChannelsResponse: - type: object - properties: - channels: - type: array - items: - type: object - properties: - state: - title: current state of the channel end - type: string - enum: - - STATE_UNINITIALIZED_UNSPECIFIED - - STATE_INIT - - STATE_TRYOPEN - - STATE_OPEN - - STATE_CLOSED - default: STATE_UNINITIALIZED_UNSPECIFIED - description: |- - State defines if a channel is in one of the following states: - CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. - - - STATE_UNINITIALIZED_UNSPECIFIED: Default State - - STATE_INIT: A channel has just started the opening handshake. - - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. - - STATE_OPEN: A channel has completed the handshake. Open channels are - ready to send and receive packets. - - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive - packets. - ordering: - title: whether the channel is ordered or unordered - type: string - enum: - - ORDER_NONE_UNSPECIFIED - - ORDER_UNORDERED - - ORDER_ORDERED - default: ORDER_NONE_UNSPECIFIED - description: |- - - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering - - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in - which they were sent. - - ORDER_ORDERED: packets are delivered exactly in the order which they were sent - counterparty: - title: counterparty channel end - type: object - properties: - port_id: - type: string - description: >- - port on the counterparty chain which owns the other end of - the channel. - channel_id: - type: string - title: channel end on the counterparty chain - connection_hops: - type: array - items: - type: string - title: >- - list of connection identifiers, in order, along which packets - sent on - - this channel will travel - version: - type: string - title: >- - opaque channel version, which is agreed upon during the - handshake - port_id: - type: string - title: port identifier - channel_id: - type: string - title: channel identifier - description: |- - IdentifiedChannel defines a channel with additional port and channel - identifier fields. - description: list of channels associated with a connection. - pagination: - title: pagination response - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: |- - 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; - } - height: - title: query block height - type: object - properties: - revision_number: - type: string - format: uint64 - title: the revision that the client is currently on - revision_height: - type: string - format: uint64 - title: the height within the given revision - description: >- - Normally the RevisionHeight is incremented at each height while - keeping RevisionNumber + RevisionNumber the same. However some consensus algorithms may choose + to - the same. However some consensus algorithms may choose to reset the + reset the height in certain conditions e.g. hard forks, state-machine - height in certain conditions e.g. hard forks, state-machine breaking - changes + breaking changes In these cases, the RevisionNumber is incremented so + that - In these cases, the RevisionNumber is incremented so that height - continues to + height continues to be monitonically increasing even as the + RevisionHeight - be monitonically increasing even as the RevisionHeight gets reset + gets reset title: |- QueryConnectionChannelsResponse is the Response type for the Query/QueryConnectionChannels RPC method @@ -55659,17 +55844,20 @@ definitions: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while - keeping RevisionNumber + keeping - the same. However some consensus algorithms may choose to reset the + RevisionNumber the same. However some consensus algorithms may choose + to - height in certain conditions e.g. hard forks, state-machine breaking - changes + reset the height in certain conditions e.g. hard forks, state-machine - In these cases, the RevisionNumber is incremented so that height - continues to + breaking changes In these cases, the RevisionNumber is incremented so + that - be monitonically increasing even as the RevisionHeight gets reset + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset title: |- QuerySequenceResponse is the request type for the Query/QueryNextSequenceReceiveResponse RPC method @@ -55698,17 +55886,20 @@ definitions: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while - keeping RevisionNumber + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to - the same. However some consensus algorithms may choose to reset the + reset the height in certain conditions e.g. hard forks, state-machine - height in certain conditions e.g. hard forks, state-machine breaking - changes + breaking changes In these cases, the RevisionNumber is incremented so + that - In these cases, the RevisionNumber is incremented so that height - continues to + height continues to be monitonically increasing even as the + RevisionHeight - be monitonically increasing even as the RevisionHeight gets reset + gets reset title: |- QueryPacketAcknowledgementResponse defines the client query response for a packet which also includes a proof and the height from which the @@ -55784,17 +55975,20 @@ definitions: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while - keeping RevisionNumber + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to - the same. However some consensus algorithms may choose to reset the + reset the height in certain conditions e.g. hard forks, state-machine - height in certain conditions e.g. hard forks, state-machine breaking - changes + breaking changes In these cases, the RevisionNumber is incremented so + that - In these cases, the RevisionNumber is incremented so that height - continues to + height continues to be monitonically increasing even as the + RevisionHeight - be monitonically increasing even as the RevisionHeight gets reset + gets reset title: |- QueryPacketAcknowledgemetsResponse is the request type for the Query/QueryPacketAcknowledgements RPC method @@ -55823,17 +56017,20 @@ definitions: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while - keeping RevisionNumber + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to - the same. However some consensus algorithms may choose to reset the + reset the height in certain conditions e.g. hard forks, state-machine - height in certain conditions e.g. hard forks, state-machine breaking - changes + breaking changes In these cases, the RevisionNumber is incremented so + that - In these cases, the RevisionNumber is incremented so that height - continues to + height continues to be monitonically increasing even as the + RevisionHeight - be monitonically increasing even as the RevisionHeight gets reset + gets reset title: >- QueryPacketCommitmentResponse defines the client query response for a packet @@ -55912,17 +56109,20 @@ definitions: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while - keeping RevisionNumber + keeping - the same. However some consensus algorithms may choose to reset the + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine - height in certain conditions e.g. hard forks, state-machine breaking - changes + breaking changes In these cases, the RevisionNumber is incremented so + that - In these cases, the RevisionNumber is incremented so that height - continues to + height continues to be monitonically increasing even as the + RevisionHeight - be monitonically increasing even as the RevisionHeight gets reset + gets reset title: |- QueryPacketCommitmentsResponse is the request type for the Query/QueryPacketCommitments RPC method @@ -55951,22 +56151,25 @@ definitions: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while - keeping RevisionNumber + keeping - the same. However some consensus algorithms may choose to reset the + RevisionNumber the same. However some consensus algorithms may choose + to - height in certain conditions e.g. hard forks, state-machine breaking - changes + reset the height in certain conditions e.g. hard forks, state-machine - In these cases, the RevisionNumber is incremented so that height - continues to + breaking changes In these cases, the RevisionNumber is incremented so + that - be monitonically increasing even as the RevisionHeight gets reset + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset title: >- QueryPacketReceiptResponse defines the client query response for a packet - receipt - which also includes a proof, and the height from which the proof was + receipt which also includes a proof, and the height from which the proof + was retrieved ibc.core.channel.v1.QueryUnreceivedAcksResponse: @@ -55992,17 +56195,20 @@ definitions: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while - keeping RevisionNumber + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to - the same. However some consensus algorithms may choose to reset the + reset the height in certain conditions e.g. hard forks, state-machine - height in certain conditions e.g. hard forks, state-machine breaking - changes + breaking changes In these cases, the RevisionNumber is incremented so + that - In these cases, the RevisionNumber is incremented so that height - continues to + height continues to be monitonically increasing even as the + RevisionHeight - be monitonically increasing even as the RevisionHeight gets reset + gets reset title: |- QueryUnreceivedAcksResponse is the response type for the Query/UnreceivedAcks RPC method @@ -56029,17 +56235,20 @@ definitions: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while - keeping RevisionNumber + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to - the same. However some consensus algorithms may choose to reset the + reset the height in certain conditions e.g. hard forks, state-machine - height in certain conditions e.g. hard forks, state-machine breaking - changes + breaking changes In these cases, the RevisionNumber is incremented so + that - In these cases, the RevisionNumber is incremented so that height - continues to + height continues to be monitonically increasing even as the + RevisionHeight - be monitonically increasing even as the RevisionHeight gets reset + gets reset title: |- QueryUnreceivedPacketsResponse is the response type for the Query/UnreceivedPacketCommitments RPC method @@ -56074,19 +56283,13 @@ definitions: type: string format: uint64 title: the height within the given revision - description: >- + description: |- 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 + 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 title: >- Height is a monotonically increasing data type @@ -56280,18 +56483,215 @@ definitions: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while - keeping RevisionNumber + 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 + consensus_state: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. - the same. However some consensus algorithms may choose to reset the - height in certain conditions e.g. hard forks, state-machine breaking - changes + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above specified + type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any type. + - In these cases, the RevisionNumber is incremented so that height - continues to + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: consensus state + description: >- + ConsensusStateWithHeight defines a consensus state with an additional + height + + field. + ibc.core.client.v1.Params: + type: object + properties: + allowed_clients: + type: array + items: + type: string + description: allowed_clients defines the list of allowed client state types. + description: Params defines the set of IBC light client parameters. + ibc.core.client.v1.QueryClientParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + allowed_clients: + type: array + items: + type: string + description: allowed_clients defines the list of allowed client state types. + description: >- + QueryClientParamsResponse is the response type for the Query/ClientParams + RPC - be monitonically increasing even as the RevisionHeight gets reset - consensus_state: + method. + ibc.core.client.v1.QueryClientStateResponse: + type: object + properties: + client_state: type: object properties: type_url: @@ -56450,38 +56850,278 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: consensus state + title: client state associated with the request identifier + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + 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 description: >- - ConsensusStateWithHeight defines a consensus state with an additional - height field. - ibc.core.client.v1.Params: + 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. + ibc.core.client.v1.QueryClientStatesResponse: type: object properties: - allowed_clients: + client_states: type: array items: - type: string - description: allowed_clients defines the list of allowed client state types. - description: Params defines the set of IBC light client parameters. - ibc.core.client.v1.QueryClientParamsResponse: - type: object - properties: - params: - description: params defines the parameters of the module. + type: object + properties: + client_id: + type: string + title: client identifier + client_state: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: client state + description: >- + IdentifiedClientState defines a client state with an additional + client + + identifier field. + description: list of stored ClientStates of the chain. + pagination: + title: pagination response type: object properties: - allowed_clients: - type: array - items: - type: string - description: allowed_clients defines the list of allowed client state types. + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + 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; + } description: >- - QueryClientParamsResponse is the response type for the Query/ClientParams - RPC method. - ibc.core.client.v1.QueryClientStateResponse: + QueryClientStatesResponse is the response type for the Query/ClientStates + RPC + + method. + ibc.core.client.v1.QueryClientStatusResponse: type: object properties: - client_state: + status: + type: string + description: >- + QueryClientStatusResponse is the response type for the Query/ClientStatus + RPC + + method. It returns the current status of the IBC client. + ibc.core.client.v1.QueryConsensusStateResponse: + type: object + properties: + consensus_state: type: object properties: type_url: @@ -56640,7 +57280,9 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: client state associated with the request identifier + title: >- + consensus state associated with the client identifier at the given + height proof: type: string format: byte @@ -56659,36 +57301,63 @@ definitions: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while - keeping RevisionNumber + keeping - the same. However some consensus algorithms may choose to reset the + RevisionNumber the same. However some consensus algorithms may choose + to - height in certain conditions e.g. hard forks, state-machine breaking - changes + reset the height in certain conditions e.g. hard forks, state-machine - In these cases, the RevisionNumber is incremented so that height - continues to + breaking changes In these cases, the RevisionNumber is incremented so + that - be monitonically increasing even as the RevisionHeight gets reset - description: >- - QueryClientStateResponse is the response type for the Query/ClientState - RPC + height continues to be monitonically increasing even as the + RevisionHeight - method. Besides the client state, it includes a proof and the height from + gets reset + title: >- + QueryConsensusStateResponse is the response type for the + Query/ConsensusState - which the proof was retrieved. - ibc.core.client.v1.QueryClientStatesResponse: + RPC method + ibc.core.client.v1.QueryConsensusStatesResponse: type: object properties: - client_states: + consensus_states: type: array items: type: object properties: - client_id: - type: string - title: client identifier - client_state: + height: + title: consensus state height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + 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 + consensus_state: type: object properties: type_url: @@ -56857,13 +57526,13 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: client state + title: consensus state description: >- - IdentifiedClientState defines a client state with an additional - client + ConsensusStateWithHeight defines a consensus state with an + additional height - identifier field. - description: list of stored ClientStates of the chain. + field. + title: consensus states associated with the identifier pagination: title: pagination response type: object @@ -56890,15 +57559,179 @@ definitions: repeated Bar results = 1; PageResponse page = 2; } - description: >- - QueryClientStatesResponse is the response type for the Query/ClientStates - RPC + title: |- + QueryConsensusStatesResponse is the response type for the + Query/ConsensusStates RPC method + ibc.core.client.v1.QueryUpgradedClientStateResponse: + type: object + properties: + upgraded_client_state: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - method. - ibc.core.client.v1.QueryConsensusStateResponse: + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above specified + type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: client state associated with the request identifier + description: |- + QueryUpgradedClientStateResponse is the response type for the + Query/UpgradedClientState RPC method. + ibc.core.client.v1.QueryUpgradedConsensusStateResponse: type: object properties: - consensus_state: + upgraded_consensus_state: type: object properties: type_url: @@ -57057,281 +57890,10 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: >- - consensus state associated with the client identifier at the given - height - proof: - type: string - format: byte - title: merkle proof of existence - proof_height: - title: height at which the proof was retrieved - type: object - properties: - revision_number: - type: string - format: uint64 - title: the revision that the client is currently on - revision_height: - type: string - format: uint64 - title: the height within the given revision - description: >- - 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 - title: >- - QueryConsensusStateResponse is the response type for the - Query/ConsensusState - - RPC method - ibc.core.client.v1.QueryConsensusStatesResponse: - type: object - properties: - consensus_states: - type: array - items: - type: object - properties: - height: - title: consensus state height - type: object - properties: - revision_number: - type: string - format: uint64 - title: the revision that the client is currently on - revision_height: - type: string - format: uint64 - title: the height within the given revision - description: >- - 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 - consensus_state: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all - types that they - - expect it to use in the context of Any. However, for URLs - which use the - - scheme `http`, `https`, or no scheme, one can optionally set - up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning - with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in - the form - - of utility functions or additional generated methods of the Any - type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default - use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the last - '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with an - - additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom JSON - - representation, that representation will be embedded adding a - field - - `value` which holds the custom JSON in addition to the `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - title: consensus state - description: >- - ConsensusStateWithHeight defines a consensus state with an - additional height field. - title: consensus states associated with the identifier - pagination: - title: pagination response - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: |- - 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; - } - title: |- - QueryConsensusStatesResponse is the response type for the - Query/ConsensusStates RPC method + title: Consensus state associated with the request identifier + description: |- + QueryUpgradedConsensusStateResponse is the response type for the + Query/UpgradedConsensusState RPC method. ibc.core.commitment.v1.MerklePrefix: type: object properties: @@ -57417,9 +57979,11 @@ definitions: format: uint64 description: >- 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. + packet-verification NOTE: delay period logic is only implemented by + some + + clients. description: |- ConnectionEnd defines a stateful object on a chain connected to another separate one. @@ -57565,17 +58129,20 @@ definitions: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while - keeping RevisionNumber + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to - the same. However some consensus algorithms may choose to reset the + reset the height in certain conditions e.g. hard forks, state-machine - height in certain conditions e.g. hard forks, state-machine breaking - changes + breaking changes In these cases, the RevisionNumber is incremented so + that - In these cases, the RevisionNumber is incremented so that height - continues to + height continues to be monitonically increasing even as the + RevisionHeight - be monitonically increasing even as the RevisionHeight gets reset + gets reset title: |- QueryClientConnectionsResponse is the response type for the Query/ClientConnections RPC method @@ -57776,17 +58343,20 @@ definitions: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while - keeping RevisionNumber + keeping - the same. However some consensus algorithms may choose to reset the + RevisionNumber the same. However some consensus algorithms may choose + to - height in certain conditions e.g. hard forks, state-machine breaking - changes + reset the height in certain conditions e.g. hard forks, state-machine - In these cases, the RevisionNumber is incremented so that height - continues to + breaking changes In these cases, the RevisionNumber is incremented so + that - be monitonically increasing even as the RevisionHeight gets reset + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset title: |- QueryConnectionClientStateResponse is the response type for the Query/ConnectionClientState RPC method @@ -57974,17 +58544,20 @@ definitions: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while - keeping RevisionNumber + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to - the same. However some consensus algorithms may choose to reset the + reset the height in certain conditions e.g. hard forks, state-machine - height in certain conditions e.g. hard forks, state-machine breaking - changes + breaking changes In these cases, the RevisionNumber is incremented so + that - In these cases, the RevisionNumber is incremented so that height - continues to + height continues to be monitonically increasing even as the + RevisionHeight - be monitonically increasing even as the RevisionHeight gets reset + gets reset title: |- QueryConnectionConsensusStateResponse is the response type for the Query/ConnectionConsensusState RPC method @@ -58067,9 +58640,12 @@ definitions: format: uint64 description: >- delay period that must pass before a consensus state can be used - for packet-verification + for + + packet-verification NOTE: delay period logic is only implemented + by some - NOTE: delay period logic is only implemented by some clients. + clients. description: >- ConnectionEnd defines a stateful object on a chain connected to another @@ -58097,17 +58673,20 @@ definitions: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while - keeping RevisionNumber + keeping - the same. However some consensus algorithms may choose to reset the + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine - height in certain conditions e.g. hard forks, state-machine breaking - changes + breaking changes In these cases, the RevisionNumber is incremented so + that - In these cases, the RevisionNumber is incremented so that height - continues to + height continues to be monitonically increasing even as the + RevisionHeight - be monitonically increasing even as the RevisionHeight gets reset + gets reset description: >- QueryConnectionResponse is the response type for the Query/Connection RPC @@ -58241,17 +58820,20 @@ definitions: title: the height within the given revision description: >- Normally the RevisionHeight is incremented at each height while - keeping RevisionNumber + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to - the same. However some consensus algorithms may choose to reset the + reset the height in certain conditions e.g. hard forks, state-machine - height in certain conditions e.g. hard forks, state-machine breaking - changes + breaking changes In these cases, the RevisionNumber is incremented so + that - In these cases, the RevisionNumber is incremented so that height - continues to + height continues to be monitonically increasing even as the + RevisionHeight - be monitonically increasing even as the RevisionHeight gets reset + gets reset description: >- QueryConnectionsResponse is the response type for the Query/Connections RPC diff --git a/cmd/terrad/genaccounts.go b/cmd/terrad/genaccounts.go index 3f8bb41f0..2b184c2b4 100644 --- a/cmd/terrad/genaccounts.go +++ b/cmd/terrad/genaccounts.go @@ -57,8 +57,8 @@ $ terrad add-genesis-account acc1 '10000000000uluna,1000000ukrw' Args: cobra.RangeArgs(2, 3), RunE: func(cmd *cobra.Command, args []string) error { clientCtx := client.GetClientContextFromCmd(cmd) - depCdc := clientCtx.JSONMarshaler - cdc := depCdc.(codec.Marshaler) + depCdc := clientCtx.JSONCodec + cdc := depCdc.(codec.Codec) serverCtx := server.GetServerContextFromCmd(cmd) config := serverCtx.Config diff --git a/cmd/terrad/root.go b/cmd/terrad/root.go index 3be92631f..c9a1aefa7 100644 --- a/cmd/terrad/root.go +++ b/cmd/terrad/root.go @@ -14,6 +14,7 @@ import ( "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/config" "github.com/cosmos/cosmos-sdk/client/debug" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/keys" @@ -24,11 +25,12 @@ import ( "github.com/cosmos/cosmos-sdk/snapshots" "github.com/cosmos/cosmos-sdk/store" sdk "github.com/cosmos/cosmos-sdk/types" - authclient "github.com/cosmos/cosmos-sdk/x/auth/client" authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli" "github.com/cosmos/cosmos-sdk/x/auth/types" + authzcli "github.com/cosmos/cosmos-sdk/x/authz/client/cli" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/crisis" + feegrantcli "github.com/cosmos/cosmos-sdk/x/feegrant/client/cli" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" terraapp "github.com/terra-project/core/app" @@ -43,33 +45,44 @@ import ( func NewRootCmd() (*cobra.Command, params.EncodingConfig) { encodingConfig := terraapp.MakeEncodingConfig() - config := sdk.GetConfig() - config.SetCoinType(core.CoinType) - config.SetFullFundraiserPath(core.FullFundraiserPath) - config.SetBech32PrefixForAccount(core.Bech32PrefixAccAddr, core.Bech32PrefixAccPub) - config.SetBech32PrefixForValidator(core.Bech32PrefixValAddr, core.Bech32PrefixValPub) - config.SetBech32PrefixForConsensusNode(core.Bech32PrefixConsAddr, core.Bech32PrefixConsPub) - config.Seal() + sdkConfig := sdk.GetConfig() + sdkConfig.SetCoinType(core.CoinType) + sdkConfig.SetFullFundraiserPath(core.FullFundraiserPath) + sdkConfig.SetBech32PrefixForAccount(core.Bech32PrefixAccAddr, core.Bech32PrefixAccPub) + sdkConfig.SetBech32PrefixForValidator(core.Bech32PrefixValAddr, core.Bech32PrefixValPub) + sdkConfig.SetBech32PrefixForConsensusNode(core.Bech32PrefixConsAddr, core.Bech32PrefixConsPub) + sdkConfig.Seal() initClientCtx := client.Context{}. - WithJSONMarshaler(encodingConfig.Marshaler). + WithJSONCodec(encodingConfig.Marshaler). WithInterfaceRegistry(encodingConfig.InterfaceRegistry). WithTxConfig(encodingConfig.TxConfig). WithLegacyAmino(encodingConfig.Amino). WithInput(os.Stdin). WithAccountRetriever(types.AccountRetriever{}). WithBroadcastMode(flags.BroadcastBlock). - WithHomeDir(terraapp.DefaultNodeHome) + WithHomeDir(terraapp.DefaultNodeHome). + WithViper("TERRA") rootCmd := &cobra.Command{ Use: "terrad", Short: "Stargate Terra App", PersistentPreRunE: func(cmd *cobra.Command, _ []string) error { + // set the default command outputs + cmd.SetOut(cmd.OutOrStdout()) + cmd.SetErr(cmd.ErrOrStderr()) + + initClientCtx = client.ReadHomeFlag(initClientCtx, cmd) + initClientCtx, err := config.ReadFromClientConfig(initClientCtx) + if err != nil { + return err + } + if err := client.SetCmdClientContextHandler(initClientCtx, cmd); err != nil { return err } - err := server.InterceptConfigsPreRunHandler(cmd) + err = server.InterceptConfigsPreRunHandler(cmd) if err != nil { return err } @@ -105,7 +118,8 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) { } func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) { - authclient.Codec = encodingConfig.Marshaler + // TODO check gaia before make release candidate + // authclient.Codec = encodingConfig.Marshaler rootCmd.AddCommand( genutilcli.InitCmd(terraapp.ModuleBasics, terraapp.DefaultNodeHome), @@ -150,6 +164,8 @@ func queryCommand() *cobra.Command { rpc.BlockCommand(), authcmd.QueryTxsByEventsCmd(), authcmd.QueryTxCmd(), + feegrantcli.GetQueryCmd(), + authzcli.GetQueryCmd(), ) terraapp.ModuleBasics.AddQueryCommands(cmd) @@ -177,6 +193,9 @@ func txCommand() *cobra.Command { authcmd.GetBroadcastCommand(), authcmd.GetEncodeCommand(), authcmd.GetDecodeCommand(), + flags.LineBreak, + feegrantcli.GetTxCmd(), + authzcli.GetTxCmd(), ) terraapp.ModuleBasics.AddTxCommands(cmd) diff --git a/cmd/terrad/testnet.go b/cmd/terrad/testnet.go index 8a2b4fb7e..9530847cc 100644 --- a/cmd/terrad/testnet.go +++ b/cmd/terrad/testnet.go @@ -197,8 +197,8 @@ func InitTestnet( return err } - accTokens := sdk.TokensFromConsensusPower(1000) - accStakingTokens := sdk.TokensFromConsensusPower(500) + accTokens := sdk.TokensFromConsensusPower(1000, sdk.DefaultPowerReduction) + accStakingTokens := sdk.TokensFromConsensusPower(500, sdk.DefaultPowerReduction) coins := sdk.Coins{ sdk.NewCoin(fmt.Sprintf("%stoken", nodeDirName), accTokens), sdk.NewCoin(core.MicroLunaDenom, accStakingTokens), @@ -207,7 +207,7 @@ func InitTestnet( genBalances = append(genBalances, banktypes.Balance{Address: addr.String(), Coins: coins.Sort()}) genAccounts = append(genAccounts, authtypes.NewBaseAccount(addr, nil, 0, 0)) - valTokens := sdk.TokensFromConsensusPower(100) + valTokens := sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) createValMsg, err := stakingtypes.NewMsgCreateValidator( sdk.ValAddress(addr), valPubKeys[i], @@ -272,11 +272,11 @@ func initGenFiles( genFiles []string, numValidators int, ) error { - appGenState := mbm.DefaultGenesis(clientCtx.JSONMarshaler) + appGenState := mbm.DefaultGenesis(clientCtx.JSONCodec) // set the accounts in the genesis state var authGenState authtypes.GenesisState - clientCtx.JSONMarshaler.MustUnmarshalJSON(appGenState[authtypes.ModuleName], &authGenState) + clientCtx.JSONCodec.MustUnmarshalJSON(appGenState[authtypes.ModuleName], &authGenState) accounts, err := authtypes.PackAccounts(genAccounts) if err != nil { @@ -284,14 +284,14 @@ func initGenFiles( } authGenState.Accounts = accounts - appGenState[authtypes.ModuleName] = clientCtx.JSONMarshaler.MustMarshalJSON(&authGenState) + appGenState[authtypes.ModuleName] = clientCtx.JSONCodec.MustMarshalJSON(&authGenState) // set the balances in the genesis state var bankGenState banktypes.GenesisState - clientCtx.JSONMarshaler.MustUnmarshalJSON(appGenState[banktypes.ModuleName], &bankGenState) + clientCtx.JSONCodec.MustUnmarshalJSON(appGenState[banktypes.ModuleName], &bankGenState) bankGenState.Balances = genBalances - appGenState[banktypes.ModuleName] = clientCtx.JSONMarshaler.MustMarshalJSON(&bankGenState) + appGenState[banktypes.ModuleName] = clientCtx.JSONCodec.MustMarshalJSON(&bankGenState) appGenStateJSON, err := json.MarshalIndent(appGenState, "", " ") if err != nil { @@ -338,7 +338,7 @@ func collectGenFiles( return err } - nodeAppState, err := genutil.GenAppStateFromConfig(clientCtx.JSONMarshaler, clientCtx.TxConfig, nodeConfig, initCfg, *genDoc, genBalIterator) + nodeAppState, err := genutil.GenAppStateFromConfig(clientCtx.JSONCodec, clientCtx.TxConfig, nodeConfig, initCfg, *genDoc, genBalIterator) if err != nil { return err } diff --git a/custom/auth/ante/ante.go b/custom/auth/ante/ante.go index a5e8c1b1b..8dc37c146 100644 --- a/custom/auth/ante/ante.go +++ b/custom/auth/ante/ante.go @@ -2,33 +2,66 @@ package ante import ( sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" cosmosante "github.com/cosmos/cosmos-sdk/x/auth/ante" - "github.com/cosmos/cosmos-sdk/x/auth/keeper" "github.com/cosmos/cosmos-sdk/x/auth/signing" "github.com/cosmos/cosmos-sdk/x/auth/types" ) +// HandlerOptions are the options required for constructing a default SDK AnteHandler. +type HandlerOptions struct { + AccountKeeper cosmosante.AccountKeeper + BankKeeper types.BankKeeper + FeegrantKeeper cosmosante.FeegrantKeeper + OracleKeeper OracleKeeper + TreasuryKeeper TreasuryKeeper + SignModeHandler signing.SignModeHandler + SigGasConsumer cosmosante.SignatureVerificationGasConsumer +} + // NewAnteHandler returns an AnteHandler that checks and increments sequence // numbers, checks signatures & account numbers, and deducts fees from the first // signer. -func NewAnteHandler( - ak keeper.AccountKeeper, bankKeeper types.BankKeeper, oracleKeeper OracleKeeper, treasuryKeeper TreasuryKeeper, - sigGasConsumer cosmosante.SignatureVerificationGasConsumer, signModeHandler signing.SignModeHandler) sdk.AnteHandler { +func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { + if options.AccountKeeper == nil { + return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "account keeper is required for ante builder") + } + + if options.BankKeeper == nil { + return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "bank keeper is required for ante builder") + } + + if options.OracleKeeper == nil { + return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "oracle keeper is required for ante builder") + } + + if options.TreasuryKeeper == nil { + return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "treasury keeper is required for ante builder") + } + + if options.SignModeHandler == nil { + return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "sign mode handler is required for ante builder") + } + + var sigGasConsumer = options.SigGasConsumer + if sigGasConsumer == nil { + sigGasConsumer = cosmosante.DefaultSigVerificationGasConsumer + } + return sdk.ChainAnteDecorators( cosmosante.NewSetUpContextDecorator(), // outermost AnteDecorator. SetUpContext must be called first cosmosante.NewRejectExtensionOptionsDecorator(), - NewSpammingPreventionDecorator(oracleKeeper), // spamming prevention - NewTaxFeeDecorator(treasuryKeeper), // mempool gas fee validation & record tax proceeds + NewSpammingPreventionDecorator(options.OracleKeeper), // spamming prevention + NewTaxFeeDecorator(options.TreasuryKeeper), // mempool gas fee validation & record tax proceeds cosmosante.NewValidateBasicDecorator(), - cosmosante.TxTimeoutHeightDecorator{}, - cosmosante.NewValidateMemoDecorator(ak), - cosmosante.NewConsumeGasForTxSizeDecorator(ak), - cosmosante.NewRejectFeeGranterDecorator(), - cosmosante.NewSetPubKeyDecorator(ak), // SetPubKeyDecorator must be called before all signature verification decorators - cosmosante.NewValidateSigCountDecorator(ak), - cosmosante.NewDeductFeeDecorator(ak, bankKeeper), - cosmosante.NewSigGasConsumeDecorator(ak, sigGasConsumer), - cosmosante.NewSigVerificationDecorator(ak, signModeHandler), - cosmosante.NewIncrementSequenceDecorator(ak), - ) + cosmosante.NewTxTimeoutHeightDecorator(), + cosmosante.NewValidateMemoDecorator(options.AccountKeeper), + cosmosante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper), + cosmosante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper), + cosmosante.NewSetPubKeyDecorator(options.AccountKeeper), // SetPubKeyDecorator must be called before all signature verification decorators + cosmosante.NewValidateSigCountDecorator(options.AccountKeeper), + cosmosante.NewSigGasConsumeDecorator(options.AccountKeeper, sigGasConsumer), + cosmosante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler), + cosmosante.NewIncrementSequenceDecorator(options.AccountKeeper), + ), nil } diff --git a/custom/auth/ante/tax.go b/custom/auth/ante/tax.go index 8161dc3c2..b752910c5 100644 --- a/custom/auth/ante/tax.go +++ b/custom/auth/ante/tax.go @@ -5,11 +5,11 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + authz "github.com/cosmos/cosmos-sdk/x/authz" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" core "github.com/terra-project/core/types" marketexported "github.com/terra-project/core/x/market/exported" - msgauthexported "github.com/terra-project/core/x/msgauth/exported" oracleexported "github.com/terra-project/core/x/oracle/exported" wasmexported "github.com/terra-project/core/x/wasm/exported" ) @@ -129,8 +129,13 @@ func FilterMsgAndComputeTax(ctx sdk.Context, tk TreasuryKeeper, msgs ...sdk.Msg) case *wasmexported.MsgExecuteContract: taxes = taxes.Add(computeTax(ctx, tk, msg.Coins)...) - case *msgauthexported.MsgExecAuthorized: - taxes = taxes.Add(FilterMsgAndComputeTax(ctx, tk, msg.GetMsgs()...)...) + case *authz.MsgExec: + messages, err := msg.GetMessages() + if err != nil { + panic(err) + } + + taxes = taxes.Add(FilterMsgAndComputeTax(ctx, tk, messages...)...) } } diff --git a/custom/auth/ante/tax_test.go b/custom/auth/ante/tax_test.go index d26a94d57..c6b0cc7a7 100644 --- a/custom/auth/ante/tax_test.go +++ b/custom/auth/ante/tax_test.go @@ -4,12 +4,12 @@ import ( cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" + authz "github.com/cosmos/cosmos-sdk/x/authz" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/terra-project/core/custom/auth/ante" core "github.com/terra-project/core/types" markettypes "github.com/terra-project/core/x/market/types" - msgauthtypes "github.com/terra-project/core/x/msgauth/types" wasmtypes "github.com/terra-project/core/x/wasm/types" ) @@ -333,7 +333,7 @@ func (suite *AnteTestSuite) TestEnsureMempoolFeesExecuteContract() { suite.Require().NoError(err, "Decorator should not have errored on fee higher than local gasPrice") } -func (suite *AnteTestSuite) TestEnsureMempoolFeesExecAuthorized() { +func (suite *AnteTestSuite) TestEnsureMempoolFeesExec() { suite.SetupTest(true) // setup suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() @@ -347,12 +347,11 @@ func (suite *AnteTestSuite) TestEnsureMempoolFeesExecAuthorized() { // msg and signatures sendAmount := int64(1000000) sendCoins := sdk.NewCoins(sdk.NewInt64Coin(core.MicroSDRDenom, sendAmount)) - msg, err := msgauthtypes.NewMsgExecAuthorized(addr1, []sdk.Msg{banktypes.NewMsgSend(addr1, addr1, sendCoins)}) - suite.Require().NoError(err) + msg := authz.NewMsgExec(addr1, []sdk.Msg{banktypes.NewMsgSend(addr1, addr1, sendCoins)}) feeAmount := testdata.NewTestFeeAmount() gasLimit := testdata.NewTestGasLimit() - suite.Require().NoError(suite.txBuilder.SetMsgs(msg)) + suite.Require().NoError(suite.txBuilder.SetMsgs(&msg)) suite.txBuilder.SetFeeAmount(feeAmount) suite.txBuilder.SetGasLimit(gasLimit) diff --git a/custom/auth/client/utils/feeutils.go b/custom/auth/client/utils/feeutils.go index 0d123ed3e..cd04e0bb7 100644 --- a/custom/auth/client/utils/feeutils.go +++ b/custom/auth/client/utils/feeutils.go @@ -12,13 +12,13 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/rest" "github.com/cosmos/cosmos-sdk/x/auth/legacy/legacytx" + "github.com/cosmos/cosmos-sdk/x/authz" core "github.com/terra-project/core/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" marketexported "github.com/terra-project/core/x/market/exported" - msgauthexported "github.com/terra-project/core/x/msgauth/exported" treasuryexported "github.com/terra-project/core/x/treasury/exported" wasmexported "github.com/terra-project/core/x/wasm/exported" ) @@ -64,7 +64,8 @@ func ComputeFeesWithBaseReq( WithSimulateAndExecute(br.Simulate). WithTxConfig(clientCtx.TxConfig). WithTimeoutHeight(br.TimeoutHeight). - WithAccountRetriever(clientCtx.AccountRetriever) + WithAccountRetriever(clientCtx.AccountRetriever). + WithSimulateAndExecute(gasSetting.Simulate) // Prepare AccountNumber & SequenceNumber when not given clientCtx.FromAddress, err = sdk.AccAddressFromBech32(br.From) @@ -72,18 +73,12 @@ func ComputeFeesWithBaseReq( return nil, err } - txf, err := tx.PrepareFactory(clientCtx, txf) + err := tx.BroadcastTx(clientCtx, txf) if err != nil { return nil, err } - _, adj, err := tx.CalculateGas(clientCtx.QueryWithData, txf, msgs...) - - if err != nil { - return nil, err - } - - gas = adj + gas = txf.Gas() } // Computes taxes of the msgs @@ -133,20 +128,14 @@ func ComputeFeesWithCmd( clientCtx client.Context, flagSet *pflag.FlagSet, msgs ...sdk.Msg) (*legacytx.StdFee, error) { txf := tx.NewFactoryCLI(clientCtx, flagSet) - // Prepare AccountNumber & SequenceNumber when not given - txf, err := tx.PrepareFactory(clientCtx, txf) - if err != nil { - return nil, err - } - gas := txf.Gas() if txf.SimulateAndExecute() { - _, adj, err := tx.CalculateGas(clientCtx.QueryWithData, txf, msgs...) + err := tx.BroadcastTx(clientCtx, txf) if err != nil { return nil, err } - gas = adj + gas = txf.Gas() } // Computes taxes of the msgs @@ -205,8 +194,13 @@ func FilterMsgAndComputeTax(clientCtx client.Context, msgs ...sdk.Msg) (taxes sd taxes = taxes.Add(tax...) } - case *msgauthexported.MsgExecAuthorized: - tax, err := FilterMsgAndComputeTax(clientCtx, msg.GetMsgs()...) + case *authz.MsgExec: + messages, err := msg.GetMessages() + if err != nil { + panic(err) + } + + tax, err := FilterMsgAndComputeTax(clientCtx, messages...) if err != nil { return nil, err } diff --git a/custom/auth/module.go b/custom/auth/module.go index 71aa595a3..872dfbe6f 100644 --- a/custom/auth/module.go +++ b/custom/auth/module.go @@ -38,7 +38,7 @@ type AppModule struct { } // NewAppModule creates a new AppModule object -func NewAppModule(cdc codec.Marshaler, accountKeeper keeper.AccountKeeper, randGenAccountsFn types.RandomGenesisAccountsFn) AppModule { +func NewAppModule(cdc codec.Codec, accountKeeper keeper.AccountKeeper, randGenAccountsFn types.RandomGenesisAccountsFn) AppModule { return AppModule{ AppModule: auth.NewAppModule(cdc, accountKeeper, randGenAccountsFn), accountKeeper: accountKeeper, diff --git a/custom/authz/legacy/v043/migrate.go b/custom/authz/legacy/v043/migrate.go new file mode 100644 index 000000000..ab67cfff2 --- /dev/null +++ b/custom/authz/legacy/v043/migrate.go @@ -0,0 +1,79 @@ +package v043 + +import ( + "fmt" + + proto "github.com/gogo/protobuf/proto" + + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + + v05market "github.com/terra-project/core/x/market/types" + v04msgauth "github.com/terra-project/core/x/msgauth/legacy/v04" + + sdk "github.com/cosmos/cosmos-sdk/types" + v043authz "github.com/cosmos/cosmos-sdk/x/authz" + v043bank "github.com/cosmos/cosmos-sdk/x/bank/types" + v043gov "github.com/cosmos/cosmos-sdk/x/gov/types" +) + +func migrateAuthorization(oldAuthorization v04msgauth.Authorization) *codectypes.Any { + var protoAuthorization proto.Message + + switch oldAuthorization := oldAuthorization.(type) { + case v04msgauth.GenericAuthorization: + { + var msgTypeURL string + if oldAuthorization.GrantMsgType == "swap" { + msgTypeURL = sdk.MsgTypeURL(&v05market.MsgSwap{}) + } else if oldAuthorization.GrantMsgType == "vote" { + msgTypeURL = sdk.MsgTypeURL(&v043gov.MsgVote{}) + } else { + panic(fmt.Errorf("%T is not a valid generic authorization msg type", oldAuthorization.GrantMsgType)) + } + + protoAuthorization = &v043authz.GenericAuthorization{ + Msg: msgTypeURL, + } + } + case v04msgauth.SendAuthorization: + { + protoAuthorization = &v043bank.SendAuthorization{ + SpendLimit: oldAuthorization.SpendLimit, + } + } + + default: + panic(fmt.Errorf("%T is not a valid authorization type", oldAuthorization)) + } + + // Convert the Authorization into Any. + authorizationAny, err := codectypes.NewAnyWithValue(protoAuthorization) + if err != nil { + panic(err) + } + + return authorizationAny +} + +// Migrate accepts exported v0.4 x/msgauth genesis state and migrates it to +// cosmos-sdk@v0.43 x/authz genesis state. The migration includes: +// +// - Convert vote option & proposal status from byte to enum. +// - Migrate proposal content to Any. +// - Convert addresses from bytes to bech32 strings. +// - Re-encode in v0.43 GenesisState. +func Migrate(msgauthGenState v04msgauth.GenesisState) *v043authz.GenesisState { + entries := make([]v043authz.GrantAuthorization, len(msgauthGenState.AuthorizationEntries)) + for i, e := range msgauthGenState.AuthorizationEntries { + entries[i] = v043authz.GrantAuthorization{ + Granter: e.Granter.String(), + Grantee: e.Grantee.String(), + Authorization: migrateAuthorization(e.Authorization), + Expiration: e.Expiration, + } + } + + return &v043authz.GenesisState{ + Authorization: entries, + } +} diff --git a/x/msgauth/legacy/v05/migrate_test.go b/custom/authz/legacy/v043/migrate_test.go similarity index 84% rename from x/msgauth/legacy/v05/migrate_test.go rename to custom/authz/legacy/v043/migrate_test.go index a45f5f50a..99d553b11 100644 --- a/x/msgauth/legacy/v05/migrate_test.go +++ b/custom/authz/legacy/v043/migrate_test.go @@ -1,4 +1,4 @@ -package v05_test +package v043_test import ( "encoding/json" @@ -10,9 +10,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/terra-project/core/app" + v043authz "github.com/terra-project/core/custom/authz/legacy/v043" core "github.com/terra-project/core/types" v04msgauth "github.com/terra-project/core/x/msgauth/legacy/v04" - v05msgauth "github.com/terra-project/core/x/msgauth/legacy/v05" ) func TestMigrate(t *testing.T) { @@ -23,7 +23,7 @@ func TestMigrate(t *testing.T) { WithInterfaceRegistry(encodingConfig.InterfaceRegistry). WithTxConfig(encodingConfig.TxConfig). WithLegacyAmino(encodingConfig.Amino). - WithJSONMarshaler(encodingConfig.Marshaler) + WithJSONCodec(encodingConfig.Marshaler) granter, err := sdk.AccAddressFromBech32("terra13vs2znvhdcy948ejsh7p8p22j8l4n4y07062qq") require.NoError(t, err) @@ -55,9 +55,9 @@ func TestMigrate(t *testing.T) { }, } - migrated := v05msgauth.Migrate(msgauthGenState) + migrated := v043authz.Migrate(msgauthGenState) - bz, err := clientCtx.JSONMarshaler.MarshalJSON(migrated) + bz, err := clientCtx.JSONCodec.MarshalJSON(migrated) require.NoError(t, err) // Indent the JSON bz correctly. @@ -71,11 +71,11 @@ func TestMigrate(t *testing.T) { // - GenericAuthorization has correct JSON. // - SendAuthorization has correct JSON. expected := `{ - "authorization_entries": [ + "authorization": [ { "authorization": { - "@type": "/terra.msgauth.v1beta1.GenericAuthorization", - "grant_msg_type": "vote" + "@type": "/cosmos.authz.v1beta1.GenericAuthorization", + "msg": "/cosmos.gov.v1beta1.MsgVote" }, "expiration": "0001-01-01T00:00:00Z", "grantee": "terra1mx72uukvzqtzhc6gde7shrjqfu5srk22v7gmww", @@ -83,7 +83,7 @@ func TestMigrate(t *testing.T) { }, { "authorization": { - "@type": "/terra.msgauth.v1beta1.SendAuthorization", + "@type": "/cosmos.bank.v1beta1.SendAuthorization", "spend_limit": [ { "amount": "100", diff --git a/custom/authz/legacy/v043/types.go b/custom/authz/legacy/v043/types.go new file mode 100644 index 000000000..27db0762f --- /dev/null +++ b/custom/authz/legacy/v043/types.go @@ -0,0 +1,6 @@ +package v043 + +const ( + // ModuleName nolint + ModuleName = "authz" +) diff --git a/custom/bank/module.go b/custom/bank/module.go index da5dacc20..c690fa19d 100644 --- a/custom/bank/module.go +++ b/custom/bank/module.go @@ -53,7 +53,7 @@ type AppModule struct { } // NewAppModule creates a new AppModule object -func NewAppModule(cdc codec.Marshaler, keeper keeper.Keeper, accountKeeper types.AccountKeeper) AppModule { +func NewAppModule(cdc codec.Codec, keeper keeper.Keeper, accountKeeper types.AccountKeeper) AppModule { return AppModule{ AppModule: bank.NewAppModule(cdc, keeper, accountKeeper), keeper: keeper, diff --git a/custom/bank/simulation/operations.go b/custom/bank/simulation/operations.go index 8afa6f280..73ad90f56 100644 --- a/custom/bank/simulation/operations.go +++ b/custom/bank/simulation/operations.go @@ -25,7 +25,7 @@ const ( // WeightedOperations returns all the operations from the module with their respective weights func WeightedOperations( - appParams simtypes.AppParams, cdc codec.JSONMarshaler, ak types.AccountKeeper, bk keeper.Keeper, + appParams simtypes.AppParams, cdc codec.JSONCodec, ak types.AccountKeeper, bk keeper.Keeper, ) simulation.WeightedOperations { var weightMsgSend, weightMsgMultiSend int @@ -64,7 +64,7 @@ func SimulateMsgSend(ak types.AccountKeeper, bk keeper.Keeper) simtypes.Operatio simAccount, toSimAcc, coins, skip := randomSendFields(r, ctx, accs, bk, ak) // Check send_enabled status of each coin denom - if err := bk.SendEnabledCoins(ctx, coins...); err != nil { + if err := bk.IsSendEnabledCoins(ctx, coins...); err != nil { return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgSend, err.Error()), nil, nil } @@ -83,7 +83,7 @@ func SimulateMsgSend(ak types.AccountKeeper, bk keeper.Keeper) simtypes.Operatio return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgSend, "invalid transfers"), nil, err } - return simtypes.NewOperationMsg(msg, true, ""), nil, nil + return simtypes.NewOperationMsg(msg, true, "", nil), nil, nil } } @@ -181,7 +181,7 @@ func SimulateMsgMultiSend(ak types.AccountKeeper, bk keeper.Keeper) simtypes.Ope } // Check send_enabled status of each sent coin denom - if err := bk.SendEnabledCoins(ctx, totalSentCoins...); err != nil { + if err := bk.IsSendEnabledCoins(ctx, totalSentCoins...); err != nil { return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgMultiSend, err.Error()), nil, nil } @@ -228,7 +228,7 @@ func SimulateMsgMultiSend(ak types.AccountKeeper, bk keeper.Keeper) simtypes.Ope return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "invalid transfers"), nil, err } - return simtypes.NewOperationMsg(msg, true, ""), nil, nil + return simtypes.NewOperationMsg(msg, true, "", nil), nil, nil } } diff --git a/custom/bank/types/codec.go b/custom/bank/types/codec.go index 94d9351ac..70bd885ca 100644 --- a/custom/bank/types/codec.go +++ b/custom/bank/types/codec.go @@ -3,17 +3,12 @@ package types import ( "github.com/cosmos/cosmos-sdk/codec" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" - "github.com/cosmos/cosmos-sdk/x/bank/exported" "github.com/cosmos/cosmos-sdk/x/bank/types" - - msgauthtypes "github.com/terra-project/core/x/msgauth/types" ) // RegisterLegacyAminoCodec registers the necessary x/bank interfaces and concrete types // on the provided LegacyAmino codec. These types are used for Amino JSON serialization. func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - cdc.RegisterInterface((*exported.SupplyI)(nil), nil) - cdc.RegisterConcrete(&types.Supply{}, "bank/Supply", nil) cdc.RegisterConcrete(&types.MsgSend{}, "bank/MsgSend", nil) cdc.RegisterConcrete(&types.MsgMultiSend{}, "bank/MsgMultiSend", nil) } @@ -34,7 +29,4 @@ func init() { RegisterLegacyAminoCodec(amino) cryptocodec.RegisterCrypto(amino) amino.Seal() - - msgauthtypes.RegisterGrantableMsgType(types.TypeMsgSend) - msgauthtypes.RegisterMsgAuthTypeCodec(&types.MsgSend{}, "bank/MsgSend") } diff --git a/custom/crisis/module.go b/custom/crisis/module.go index 834033daf..10e28886e 100644 --- a/custom/crisis/module.go +++ b/custom/crisis/module.go @@ -29,7 +29,7 @@ func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { // DefaultGenesis returns default genesis state as raw bytes for the gov // module. -func (am AppModuleBasic) DefaultGenesis(cdc codec.JSONMarshaler) json.RawMessage { +func (am AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { // customize to set default genesis state deposit denom to uluna defaultGenesisState := types.DefaultGenesisState() defaultGenesisState.ConstantFee.Denom = core.MicroLunaDenom diff --git a/custom/distribution/wasm/interface_test.go b/custom/distribution/wasm/interface_test.go index ae426c9f9..5eba4ce38 100644 --- a/custom/distribution/wasm/interface_test.go +++ b/custom/distribution/wasm/interface_test.go @@ -20,9 +20,9 @@ func TestEncoding(t *testing.T) { sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()), } - valAddr := make(sdk.ValAddress, sdk.AddrLen) + valAddr := make(sdk.ValAddress, 1) valAddr[0] = 12 - valAddr2 := make(sdk.ValAddress, sdk.AddrLen) + valAddr2 := make(sdk.ValAddress, 2) valAddr2[1] = 123 cases := map[string]struct { diff --git a/custom/gov/legacy/v040/migrate.go b/custom/gov/legacy/v040/migrate.go index ee03f2bf2..ac3643a78 100644 --- a/custom/gov/legacy/v040/migrate.go +++ b/custom/gov/legacy/v040/migrate.go @@ -6,6 +6,7 @@ import ( proto "github.com/gogo/protobuf/proto" codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" v036distr "github.com/cosmos/cosmos-sdk/x/distribution/legacy/v036" v040distr "github.com/cosmos/cosmos-sdk/x/distribution/types" v034gov "github.com/cosmos/cosmos-sdk/x/gov/legacy/v034" @@ -109,7 +110,6 @@ func migrateContent(oldContent v036gov.Content) *codectypes.Any { Title: oldContent.Title, Plan: v040upgrade.Plan{ Name: oldContent.Plan.Name, - Time: oldContent.Plan.Time, Height: oldContent.Plan.Height, Info: oldContent.Plan.Info, }, @@ -183,7 +183,7 @@ func Migrate(oldGovState v036gov.GenesisState) *v040gov.GenesisState { newVotes[i] = v040gov.Vote{ ProposalId: oldVote.ProposalID, Voter: oldVote.Voter.String(), - Option: migrateVoteOption(oldVote.Option), + Options: []v040gov.WeightedVoteOption{{Option: migrateVoteOption(oldVote.Option), Weight: sdk.NewDec(1)}}, } } diff --git a/custom/gov/module.go b/custom/gov/module.go index 633b78676..48e82acc6 100644 --- a/custom/gov/module.go +++ b/custom/gov/module.go @@ -35,7 +35,7 @@ func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { // DefaultGenesis returns default genesis state as raw bytes for the gov // module. -func (am AppModuleBasic) DefaultGenesis(cdc codec.JSONMarshaler) json.RawMessage { +func (am AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { // customize to set default genesis state deposit denom to uluna defaultGenesisState := types.DefaultGenesisState() defaultGenesisState.DepositParams.MinDeposit[0].Denom = core.MicroLunaDenom diff --git a/custom/gov/types/codec.go b/custom/gov/types/codec.go index 4f6a23f49..5dcc03c2e 100644 --- a/custom/gov/types/codec.go +++ b/custom/gov/types/codec.go @@ -4,8 +4,6 @@ import ( "github.com/cosmos/cosmos-sdk/codec" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - - msgauthexported "github.com/terra-project/core/x/msgauth/exported" ) // RegisterLegacyAminoCodec registers all the necessary types and interfaces for the @@ -43,6 +41,4 @@ var ( func init() { RegisterLegacyAminoCodec(amino) cryptocodec.RegisterCrypto(amino) - - msgauthexported.RegisterMsgAuthTypeCodec(govtypes.MsgVote{}, "gov/MsgVote") } diff --git a/custom/mint/module.go b/custom/mint/module.go index 36f15b243..3ed77de82 100644 --- a/custom/mint/module.go +++ b/custom/mint/module.go @@ -22,7 +22,7 @@ type AppModuleBasic struct { // DefaultGenesis returns default genesis state as raw bytes for the gov // module. -func (am AppModuleBasic) DefaultGenesis(cdc codec.JSONMarshaler) json.RawMessage { +func (am AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { // customize to set default genesis state deposit denom to uluna defaultGenesisState := types.DefaultGenesisState() defaultGenesisState.Params.MintDenom = core.MicroLunaDenom diff --git a/custom/staking/module.go b/custom/staking/module.go index f2d592a9a..60e2cbf30 100644 --- a/custom/staking/module.go +++ b/custom/staking/module.go @@ -29,7 +29,7 @@ func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { // DefaultGenesis returns default genesis state as raw bytes for the gov // module. -func (am AppModuleBasic) DefaultGenesis(cdc codec.JSONMarshaler) json.RawMessage { +func (am AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { // customize to set default genesis state deposit denom to uluna defaultGenesisState := types.DefaultGenesisState() defaultGenesisState.Params.BondDenom = core.MicroLunaDenom diff --git a/custom/staking/wasm/interface_test.go b/custom/staking/wasm/interface_test.go index c00b5b16b..28a382ea2 100644 --- a/custom/staking/wasm/interface_test.go +++ b/custom/staking/wasm/interface_test.go @@ -20,9 +20,9 @@ func TestEncoding(t *testing.T) { sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()), } - valAddr := make(sdk.ValAddress, sdk.AddrLen) + valAddr := make(sdk.ValAddress, 1) valAddr[0] = 12 - valAddr2 := make(sdk.ValAddress, sdk.AddrLen) + valAddr2 := make(sdk.ValAddress, 2) valAddr2[1] = 123 cases := map[string]struct { diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md index c5d266623..cc6379915 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -12,20 +12,69 @@ - [cosmos/auth/v1beta1/genesis.proto](#cosmos/auth/v1beta1/genesis.proto) - [GenesisState](#cosmos.auth.v1beta1.GenesisState) +- [cosmos/base/query/v1beta1/pagination.proto](#cosmos/base/query/v1beta1/pagination.proto) + - [PageRequest](#cosmos.base.query.v1beta1.PageRequest) + - [PageResponse](#cosmos.base.query.v1beta1.PageResponse) + - [cosmos/auth/v1beta1/query.proto](#cosmos/auth/v1beta1/query.proto) - [QueryAccountRequest](#cosmos.auth.v1beta1.QueryAccountRequest) - [QueryAccountResponse](#cosmos.auth.v1beta1.QueryAccountResponse) + - [QueryAccountsRequest](#cosmos.auth.v1beta1.QueryAccountsRequest) + - [QueryAccountsResponse](#cosmos.auth.v1beta1.QueryAccountsResponse) - [QueryParamsRequest](#cosmos.auth.v1beta1.QueryParamsRequest) - [QueryParamsResponse](#cosmos.auth.v1beta1.QueryParamsResponse) - [Query](#cosmos.auth.v1beta1.Query) +- [cosmos/authz/v1beta1/authz.proto](#cosmos/authz/v1beta1/authz.proto) + - [GenericAuthorization](#cosmos.authz.v1beta1.GenericAuthorization) + - [Grant](#cosmos.authz.v1beta1.Grant) + +- [cosmos/authz/v1beta1/event.proto](#cosmos/authz/v1beta1/event.proto) + - [EventGrant](#cosmos.authz.v1beta1.EventGrant) + - [EventRevoke](#cosmos.authz.v1beta1.EventRevoke) + +- [cosmos/authz/v1beta1/genesis.proto](#cosmos/authz/v1beta1/genesis.proto) + - [GenesisState](#cosmos.authz.v1beta1.GenesisState) + - [GrantAuthorization](#cosmos.authz.v1beta1.GrantAuthorization) + +- [cosmos/authz/v1beta1/query.proto](#cosmos/authz/v1beta1/query.proto) + - [QueryGrantsRequest](#cosmos.authz.v1beta1.QueryGrantsRequest) + - [QueryGrantsResponse](#cosmos.authz.v1beta1.QueryGrantsResponse) + + - [Query](#cosmos.authz.v1beta1.Query) + +- [cosmos/base/abci/v1beta1/abci.proto](#cosmos/base/abci/v1beta1/abci.proto) + - [ABCIMessageLog](#cosmos.base.abci.v1beta1.ABCIMessageLog) + - [Attribute](#cosmos.base.abci.v1beta1.Attribute) + - [GasInfo](#cosmos.base.abci.v1beta1.GasInfo) + - [MsgData](#cosmos.base.abci.v1beta1.MsgData) + - [Result](#cosmos.base.abci.v1beta1.Result) + - [SearchTxsResult](#cosmos.base.abci.v1beta1.SearchTxsResult) + - [SimulationResponse](#cosmos.base.abci.v1beta1.SimulationResponse) + - [StringEvent](#cosmos.base.abci.v1beta1.StringEvent) + - [TxMsgData](#cosmos.base.abci.v1beta1.TxMsgData) + - [TxResponse](#cosmos.base.abci.v1beta1.TxResponse) + +- [cosmos/authz/v1beta1/tx.proto](#cosmos/authz/v1beta1/tx.proto) + - [MsgExec](#cosmos.authz.v1beta1.MsgExec) + - [MsgExecResponse](#cosmos.authz.v1beta1.MsgExecResponse) + - [MsgGrant](#cosmos.authz.v1beta1.MsgGrant) + - [MsgGrantResponse](#cosmos.authz.v1beta1.MsgGrantResponse) + - [MsgRevoke](#cosmos.authz.v1beta1.MsgRevoke) + - [MsgRevokeResponse](#cosmos.authz.v1beta1.MsgRevokeResponse) + + - [Msg](#cosmos.authz.v1beta1.Msg) + - [cosmos/base/v1beta1/coin.proto](#cosmos/base/v1beta1/coin.proto) - [Coin](#cosmos.base.v1beta1.Coin) - [DecCoin](#cosmos.base.v1beta1.DecCoin) - [DecProto](#cosmos.base.v1beta1.DecProto) - [IntProto](#cosmos.base.v1beta1.IntProto) +- [cosmos/bank/v1beta1/authz.proto](#cosmos/bank/v1beta1/authz.proto) + - [SendAuthorization](#cosmos.bank.v1beta1.SendAuthorization) + - [cosmos/bank/v1beta1/bank.proto](#cosmos/bank/v1beta1/bank.proto) - [DenomUnit](#cosmos.bank.v1beta1.DenomUnit) - [Input](#cosmos.bank.v1beta1.Input) @@ -39,10 +88,6 @@ - [Balance](#cosmos.bank.v1beta1.Balance) - [GenesisState](#cosmos.bank.v1beta1.GenesisState) -- [cosmos/base/query/v1beta1/pagination.proto](#cosmos/base/query/v1beta1/pagination.proto) - - [PageRequest](#cosmos.base.query.v1beta1.PageRequest) - - [PageResponse](#cosmos.base.query.v1beta1.PageResponse) - - [cosmos/bank/v1beta1/query.proto](#cosmos/bank/v1beta1/query.proto) - [QueryAllBalancesRequest](#cosmos.bank.v1beta1.QueryAllBalancesRequest) - [QueryAllBalancesResponse](#cosmos.bank.v1beta1.QueryAllBalancesResponse) @@ -69,18 +114,6 @@ - [Msg](#cosmos.bank.v1beta1.Msg) -- [cosmos/base/abci/v1beta1/abci.proto](#cosmos/base/abci/v1beta1/abci.proto) - - [ABCIMessageLog](#cosmos.base.abci.v1beta1.ABCIMessageLog) - - [Attribute](#cosmos.base.abci.v1beta1.Attribute) - - [GasInfo](#cosmos.base.abci.v1beta1.GasInfo) - - [MsgData](#cosmos.base.abci.v1beta1.MsgData) - - [Result](#cosmos.base.abci.v1beta1.Result) - - [SearchTxsResult](#cosmos.base.abci.v1beta1.SearchTxsResult) - - [SimulationResponse](#cosmos.base.abci.v1beta1.SimulationResponse) - - [StringEvent](#cosmos.base.abci.v1beta1.StringEvent) - - [TxMsgData](#cosmos.base.abci.v1beta1.TxMsgData) - - [TxResponse](#cosmos.base.abci.v1beta1.TxResponse) - - [cosmos/base/kv/v1beta1/kv.proto](#cosmos/base/kv/v1beta1/kv.proto) - [Pair](#cosmos.base.kv.v1beta1.Pair) - [Pairs](#cosmos.base.kv.v1beta1.Pairs) @@ -93,6 +126,36 @@ - [ReflectionService](#cosmos.base.reflection.v1beta1.ReflectionService) +- [cosmos/base/reflection/v2alpha1/reflection.proto](#cosmos/base/reflection/v2alpha1/reflection.proto) + - [AppDescriptor](#cosmos.base.reflection.v2alpha1.AppDescriptor) + - [AuthnDescriptor](#cosmos.base.reflection.v2alpha1.AuthnDescriptor) + - [ChainDescriptor](#cosmos.base.reflection.v2alpha1.ChainDescriptor) + - [CodecDescriptor](#cosmos.base.reflection.v2alpha1.CodecDescriptor) + - [ConfigurationDescriptor](#cosmos.base.reflection.v2alpha1.ConfigurationDescriptor) + - [GetAuthnDescriptorRequest](#cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest) + - [GetAuthnDescriptorResponse](#cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse) + - [GetChainDescriptorRequest](#cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest) + - [GetChainDescriptorResponse](#cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse) + - [GetCodecDescriptorRequest](#cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest) + - [GetCodecDescriptorResponse](#cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse) + - [GetConfigurationDescriptorRequest](#cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest) + - [GetConfigurationDescriptorResponse](#cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse) + - [GetQueryServicesDescriptorRequest](#cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest) + - [GetQueryServicesDescriptorResponse](#cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse) + - [GetTxDescriptorRequest](#cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest) + - [GetTxDescriptorResponse](#cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse) + - [InterfaceAcceptingMessageDescriptor](#cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor) + - [InterfaceDescriptor](#cosmos.base.reflection.v2alpha1.InterfaceDescriptor) + - [InterfaceImplementerDescriptor](#cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor) + - [MsgDescriptor](#cosmos.base.reflection.v2alpha1.MsgDescriptor) + - [QueryMethodDescriptor](#cosmos.base.reflection.v2alpha1.QueryMethodDescriptor) + - [QueryServiceDescriptor](#cosmos.base.reflection.v2alpha1.QueryServiceDescriptor) + - [QueryServicesDescriptor](#cosmos.base.reflection.v2alpha1.QueryServicesDescriptor) + - [SigningModeDescriptor](#cosmos.base.reflection.v2alpha1.SigningModeDescriptor) + - [TxDescriptor](#cosmos.base.reflection.v2alpha1.TxDescriptor) + + - [ReflectionService](#cosmos.base.reflection.v2alpha1.ReflectionService) + - [cosmos/base/snapshots/v1beta1/snapshot.proto](#cosmos/base/snapshots/v1beta1/snapshot.proto) - [Metadata](#cosmos.base.snapshots.v1beta1.Metadata) - [Snapshot](#cosmos.base.snapshots.v1beta1.Snapshot) @@ -102,6 +165,9 @@ - [CommitInfo](#cosmos.base.store.v1beta1.CommitInfo) - [StoreInfo](#cosmos.base.store.v1beta1.StoreInfo) +- [cosmos/base/store/v1beta1/listening.proto](#cosmos/base/store/v1beta1/listening.proto) + - [StoreKVPair](#cosmos.base.store.v1beta1.StoreKVPair) + - [cosmos/base/store/v1beta1/snapshot.proto](#cosmos/base/store/v1beta1/snapshot.proto) - [SnapshotIAVLItem](#cosmos.base.store.v1beta1.SnapshotIAVLItem) - [SnapshotItem](#cosmos.base.store.v1beta1.SnapshotItem) @@ -159,6 +225,10 @@ - [PrivKey](#cosmos.crypto.secp256k1.PrivKey) - [PubKey](#cosmos.crypto.secp256k1.PubKey) +- [cosmos/crypto/secp256r1/keys.proto](#cosmos/crypto/secp256r1/keys.proto) + - [PrivKey](#cosmos.crypto.secp256r1.PrivKey) + - [PubKey](#cosmos.crypto.secp256r1.PubKey) + - [cosmos/distribution/v1beta1/distribution.proto](#cosmos/distribution/v1beta1/distribution.proto) - [CommunityPoolSpendProposal](#cosmos.distribution.v1beta1.CommunityPoolSpendProposal) - [CommunityPoolSpendProposalWithDeposit](#cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit) @@ -237,6 +307,31 @@ - [Msg](#cosmos.evidence.v1beta1.Msg) +- [cosmos/feegrant/v1beta1/feegrant.proto](#cosmos/feegrant/v1beta1/feegrant.proto) + - [AllowedMsgAllowance](#cosmos.feegrant.v1beta1.AllowedMsgAllowance) + - [BasicAllowance](#cosmos.feegrant.v1beta1.BasicAllowance) + - [Grant](#cosmos.feegrant.v1beta1.Grant) + - [PeriodicAllowance](#cosmos.feegrant.v1beta1.PeriodicAllowance) + +- [cosmos/feegrant/v1beta1/genesis.proto](#cosmos/feegrant/v1beta1/genesis.proto) + - [GenesisState](#cosmos.feegrant.v1beta1.GenesisState) + +- [cosmos/feegrant/v1beta1/query.proto](#cosmos/feegrant/v1beta1/query.proto) + - [QueryAllowanceRequest](#cosmos.feegrant.v1beta1.QueryAllowanceRequest) + - [QueryAllowanceResponse](#cosmos.feegrant.v1beta1.QueryAllowanceResponse) + - [QueryAllowancesRequest](#cosmos.feegrant.v1beta1.QueryAllowancesRequest) + - [QueryAllowancesResponse](#cosmos.feegrant.v1beta1.QueryAllowancesResponse) + + - [Query](#cosmos.feegrant.v1beta1.Query) + +- [cosmos/feegrant/v1beta1/tx.proto](#cosmos/feegrant/v1beta1/tx.proto) + - [MsgGrantAllowance](#cosmos.feegrant.v1beta1.MsgGrantAllowance) + - [MsgGrantAllowanceResponse](#cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse) + - [MsgRevokeAllowance](#cosmos.feegrant.v1beta1.MsgRevokeAllowance) + - [MsgRevokeAllowanceResponse](#cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse) + + - [Msg](#cosmos.feegrant.v1beta1.Msg) + - [cosmos/genutil/v1beta1/genesis.proto](#cosmos/genutil/v1beta1/genesis.proto) - [GenesisState](#cosmos.genutil.v1beta1.GenesisState) @@ -249,6 +344,7 @@ - [TextProposal](#cosmos.gov.v1beta1.TextProposal) - [Vote](#cosmos.gov.v1beta1.Vote) - [VotingParams](#cosmos.gov.v1beta1.VotingParams) + - [WeightedVoteOption](#cosmos.gov.v1beta1.WeightedVoteOption) - [ProposalStatus](#cosmos.gov.v1beta1.ProposalStatus) - [VoteOption](#cosmos.gov.v1beta1.VoteOption) @@ -283,6 +379,8 @@ - [MsgSubmitProposalResponse](#cosmos.gov.v1beta1.MsgSubmitProposalResponse) - [MsgVote](#cosmos.gov.v1beta1.MsgVote) - [MsgVoteResponse](#cosmos.gov.v1beta1.MsgVoteResponse) + - [MsgVoteWeighted](#cosmos.gov.v1beta1.MsgVoteWeighted) + - [MsgVoteWeightedResponse](#cosmos.gov.v1beta1.MsgVoteWeightedResponse) - [Msg](#cosmos.gov.v1beta1.Msg) @@ -339,6 +437,12 @@ - [Msg](#cosmos.slashing.v1beta1.Msg) +- [cosmos/staking/v1beta1/authz.proto](#cosmos/staking/v1beta1/authz.proto) + - [StakeAuthorization](#cosmos.staking.v1beta1.StakeAuthorization) + - [StakeAuthorization.Validators](#cosmos.staking.v1beta1.StakeAuthorization.Validators) + + - [AuthorizationType](#cosmos.staking.v1beta1.AuthorizationType) + - [cosmos/staking/v1beta1/staking.proto](#cosmos/staking/v1beta1/staking.proto) - [Commission](#cosmos.staking.v1beta1.Commission) - [CommissionRates](#cosmos.staking.v1beta1.CommissionRates) @@ -492,6 +596,7 @@ - [Height](#ibc.core.client.v1.Height) - [IdentifiedClientState](#ibc.core.client.v1.IdentifiedClientState) - [Params](#ibc.core.client.v1.Params) + - [UpgradeProposal](#ibc.core.client.v1.UpgradeProposal) - [ibc/applications/transfer/v1/tx.proto](#ibc/applications/transfer/v1/tx.proto) - [MsgTransfer](#ibc.applications.transfer.v1.MsgTransfer) @@ -580,10 +685,16 @@ - [QueryClientStateResponse](#ibc.core.client.v1.QueryClientStateResponse) - [QueryClientStatesRequest](#ibc.core.client.v1.QueryClientStatesRequest) - [QueryClientStatesResponse](#ibc.core.client.v1.QueryClientStatesResponse) + - [QueryClientStatusRequest](#ibc.core.client.v1.QueryClientStatusRequest) + - [QueryClientStatusResponse](#ibc.core.client.v1.QueryClientStatusResponse) - [QueryConsensusStateRequest](#ibc.core.client.v1.QueryConsensusStateRequest) - [QueryConsensusStateResponse](#ibc.core.client.v1.QueryConsensusStateResponse) - [QueryConsensusStatesRequest](#ibc.core.client.v1.QueryConsensusStatesRequest) - [QueryConsensusStatesResponse](#ibc.core.client.v1.QueryConsensusStatesResponse) + - [QueryUpgradedClientStateRequest](#ibc.core.client.v1.QueryUpgradedClientStateRequest) + - [QueryUpgradedClientStateResponse](#ibc.core.client.v1.QueryUpgradedClientStateResponse) + - [QueryUpgradedConsensusStateRequest](#ibc.core.client.v1.QueryUpgradedConsensusStateRequest) + - [QueryUpgradedConsensusStateResponse](#ibc.core.client.v1.QueryUpgradedConsensusStateResponse) - [Query](#ibc.core.client.v1.Query) @@ -703,35 +814,6 @@ - [Msg](#terra.market.v1beta1.Msg) -- [terra/msgauth/v1beta1/msgauth.proto](#terra/msgauth/v1beta1/msgauth.proto) - - [AuthorizationGrant](#terra.msgauth.v1beta1.AuthorizationGrant) - - [GGMPair](#terra.msgauth.v1beta1.GGMPair) - - [GGMPairs](#terra.msgauth.v1beta1.GGMPairs) - - [GenericAuthorization](#terra.msgauth.v1beta1.GenericAuthorization) - - [SendAuthorization](#terra.msgauth.v1beta1.SendAuthorization) - -- [terra/msgauth/v1beta1/genesis.proto](#terra/msgauth/v1beta1/genesis.proto) - - [AuthorizationEntry](#terra.msgauth.v1beta1.AuthorizationEntry) - - [GenesisState](#terra.msgauth.v1beta1.GenesisState) - -- [terra/msgauth/v1beta1/query.proto](#terra/msgauth/v1beta1/query.proto) - - [QueryAllGrantsRequest](#terra.msgauth.v1beta1.QueryAllGrantsRequest) - - [QueryAllGrantsResponse](#terra.msgauth.v1beta1.QueryAllGrantsResponse) - - [QueryGrantsRequest](#terra.msgauth.v1beta1.QueryGrantsRequest) - - [QueryGrantsResponse](#terra.msgauth.v1beta1.QueryGrantsResponse) - - - [Query](#terra.msgauth.v1beta1.Query) - -- [terra/msgauth/v1beta1/tx.proto](#terra/msgauth/v1beta1/tx.proto) - - [MsgExecAuthorized](#terra.msgauth.v1beta1.MsgExecAuthorized) - - [MsgExecAuthorizedResponse](#terra.msgauth.v1beta1.MsgExecAuthorizedResponse) - - [MsgGrantAuthorization](#terra.msgauth.v1beta1.MsgGrantAuthorization) - - [MsgGrantAuthorizationResponse](#terra.msgauth.v1beta1.MsgGrantAuthorizationResponse) - - [MsgRevokeAuthorization](#terra.msgauth.v1beta1.MsgRevokeAuthorization) - - [MsgRevokeAuthorizationResponse](#terra.msgauth.v1beta1.MsgRevokeAuthorizationResponse) - - - [Msg](#terra.msgauth.v1beta1.Msg) - - [terra/oracle/v1beta1/oracle.proto](#terra/oracle/v1beta1/oracle.proto) - [AggregateExchangeRatePrevote](#terra.oracle.v1beta1.AggregateExchangeRatePrevote) - [AggregateExchangeRateVote](#terra.oracle.v1beta1.AggregateExchangeRateVote) @@ -978,6 +1060,69 @@ GenesisState defines the auth module's genesis state. + + + + + + + + + + + +

Top

+ +## cosmos/base/query/v1beta1/pagination.proto + + + + + +### PageRequest +PageRequest is to be embedded in gRPC request messages for efficient +pagination. Ex: + + message SomeRequest { + Foo some_parameter = 1; + PageRequest pagination = 2; + } + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `key` | [bytes](#bytes) | | 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. | +| `offset` | [uint64](#uint64) | | 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. | +| `limit` | [uint64](#uint64) | | 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. | +| `count_total` | [bool](#bool) | | 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. | +| `reverse` | [bool](#bool) | | reverse is set to true indicates that, results to be returned in the descending order. | + + + + + + + + +### PageResponse +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; + } + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `next_key` | [bytes](#bytes) | | next_key is the key to be passed to PageRequest.key to query the next page most efficiently | +| `total` | [uint64](#uint64) | | total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise | + + + + + @@ -1025,6 +1170,37 @@ QueryAccountResponse is the response type for the Query/Account RPC method. + + +### QueryAccountsRequest +QueryAccountsRequest is the request type for the Query/Accounts RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | + + + + + + + + +### QueryAccountsResponse +QueryAccountsResponse is the response type for the Query/Accounts RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `accounts` | [google.protobuf.Any](#google.protobuf.Any) | repeated | accounts are the existing accounts | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | + + + + + + ### QueryParamsRequest @@ -1063,6 +1239,7 @@ Query defines the gRPC querier service. | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `Accounts` | [QueryAccountsRequest](#cosmos.auth.v1beta1.QueryAccountsRequest) | [QueryAccountsResponse](#cosmos.auth.v1beta1.QueryAccountsResponse) | Accounts returns all the existing accounts | GET|/cosmos/auth/v1beta1/accounts| | `Account` | [QueryAccountRequest](#cosmos.auth.v1beta1.QueryAccountRequest) | [QueryAccountResponse](#cosmos.auth.v1beta1.QueryAccountResponse) | Account returns account details based on address. | GET|/cosmos/auth/v1beta1/accounts/{address}| | `Params` | [QueryParamsRequest](#cosmos.auth.v1beta1.QueryParamsRequest) | [QueryParamsResponse](#cosmos.auth.v1beta1.QueryParamsResponse) | Params queries all parameters. | GET|/cosmos/auth/v1beta1/params| @@ -1070,75 +1247,90 @@ Query defines the gRPC querier service. - +

Top

-## cosmos/base/v1beta1/coin.proto - +## cosmos/authz/v1beta1/authz.proto - -### Coin -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. +### GenericAuthorization +GenericAuthorization gives the grantee unrestricted permissions to execute +the provided method on behalf of the granter's account. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `denom` | [string](#string) | | | -| `amount` | [string](#string) | | | +| `msg` | [string](#string) | | Msg, identified by it's type URL, to grant unrestricted permissions to execute | - - -### DecCoin -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. +### Grant +Grant gives permissions to execute +the provide method with expiration time. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `denom` | [string](#string) | | | -| `amount` | [string](#string) | | | +| `authorization` | [google.protobuf.Any](#google.protobuf.Any) | | | +| `expiration` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | + - + -### DecProto -DecProto defines a Protobuf wrapper around a Dec object. + + + + + + + +

Top

+ +## cosmos/authz/v1beta1/event.proto + + + + + +### EventGrant +EventGrant is emitted on Msg/Grant | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `dec` | [string](#string) | | | +| `msg_type_url` | [string](#string) | | Msg type URL for which an autorization is granted | +| `granter` | [string](#string) | | Granter account address | +| `grantee` | [string](#string) | | Grantee account address | - + -### IntProto -IntProto defines a Protobuf wrapper around an Int object. +### EventRevoke +EventRevoke is emitted on Msg/Revoke | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `int` | [string](#string) | | | +| `msg_type_url` | [string](#string) | | Msg type URL for which an autorization is revoked | +| `granter` | [string](#string) | | Granter account address | +| `grantee` | [string](#string) | | Grantee account address | @@ -1154,463 +1346,498 @@ IntProto defines a Protobuf wrapper around an Int object. - +

Top

-## cosmos/bank/v1beta1/bank.proto +## cosmos/authz/v1beta1/genesis.proto - + -### DenomUnit -DenomUnit represents a struct that describes a given -denomination unit of the basic token. +### GenesisState +GenesisState defines the authz module's genesis state. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `denom` | [string](#string) | | denom represents the string name of the given denom unit (e.g uatom). | -| `exponent` | [uint32](#uint32) | | 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 = 1^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). | -| `aliases` | [string](#string) | repeated | aliases is a list of string aliases for the given denom | +| `authorization` | [GrantAuthorization](#cosmos.authz.v1beta1.GrantAuthorization) | repeated | | - + -### Input -Input models transaction input. +### GrantAuthorization +GrantAuthorization defines the GenesisState/GrantAuthorization type. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `address` | [string](#string) | | | -| `coins` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | +| `granter` | [string](#string) | | | +| `grantee` | [string](#string) | | | +| `authorization` | [google.protobuf.Any](#google.protobuf.Any) | | | +| `expiration` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | + - + -### Metadata -Metadata represents a struct that describes -a basic token. + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `description` | [string](#string) | | | -| `denom_units` | [DenomUnit](#cosmos.bank.v1beta1.DenomUnit) | repeated | denom_units represents the list of DenomUnit's for a given coin | -| `base` | [string](#string) | | base represents the base denom (should be the DenomUnit with exponent = 0). | -| `display` | [string](#string) | | display indicates the suggested denom that should be displayed in clients. | + +

Top

+## cosmos/authz/v1beta1/query.proto - + -### Output -Output models transaction outputs. +### QueryGrantsRequest +QueryGrantsRequest is the request type for the Query/Grants RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `address` | [string](#string) | | | -| `coins` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | +| `granter` | [string](#string) | | | +| `grantee` | [string](#string) | | | +| `msg_type_url` | [string](#string) | | Optional, msg_type_url, when set, will query only grants matching given msg type. | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an pagination for the request. | - + -### Params -Params defines the parameters for the bank module. +### QueryGrantsResponse +QueryGrantsResponse is the response type for the Query/Authorizations RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `send_enabled` | [SendEnabled](#cosmos.bank.v1beta1.SendEnabled) | repeated | | -| `default_send_enabled` | [bool](#bool) | | | +| `grants` | [Grant](#cosmos.authz.v1beta1.Grant) | repeated | authorizations is a list of grants granted for grantee by granter. | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines an pagination for the response. | + - + -### SendEnabled -SendEnabled maps coin denom to a send_enabled status (whether a denom is -sendable). + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `denom` | [string](#string) | | | -| `enabled` | [bool](#bool) | | | + +### Query +Query defines the gRPC querier service. +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `Grants` | [QueryGrantsRequest](#cosmos.authz.v1beta1.QueryGrantsRequest) | [QueryGrantsResponse](#cosmos.authz.v1beta1.QueryGrantsResponse) | Returns list of `Authorization`, granted to the grantee by the granter. | GET|/cosmos/authz/v1beta1/grants| + - + +

Top

-### Supply -Supply represents a struct that passively keeps track of the total supply -amounts in the network. +## cosmos/base/abci/v1beta1/abci.proto + + + + + +### ABCIMessageLog +ABCIMessageLog defines a structure containing an indexed tx ABCI message log. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `total` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | +| `msg_index` | [uint32](#uint32) | | | +| `log` | [string](#string) | | | +| `events` | [StringEvent](#cosmos.base.abci.v1beta1.StringEvent) | repeated | Events contains a slice of Event objects that were emitted during some execution. | - - + - +### Attribute +Attribute defines an attribute wrapper where the key and value are +strings instead of raw bytes. - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `key` | [string](#string) | | | +| `value` | [string](#string) | | | - -

Top

-## cosmos/bank/v1beta1/genesis.proto - + -### Balance -Balance defines an account address and balance pair used in the bank module's -genesis state. +### GasInfo +GasInfo defines tx execution gas context. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `address` | [string](#string) | | address is the address of the balance holder. | -| `coins` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | coins defines the different coins this balance holds. | +| `gas_wanted` | [uint64](#uint64) | | GasWanted is the maximum units of work we allow this tx to perform. | +| `gas_used` | [uint64](#uint64) | | GasUsed is the amount of gas actually consumed. | - + -### GenesisState -GenesisState defines the bank module's genesis state. +### MsgData +MsgData defines the data returned in a Result object during message +execution. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `params` | [Params](#cosmos.bank.v1beta1.Params) | | params defines all the paramaters of the module. | -| `balances` | [Balance](#cosmos.bank.v1beta1.Balance) | repeated | balances is an array containing the balances of all the accounts. | -| `supply` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | supply represents the total supply. | -| `denom_metadata` | [Metadata](#cosmos.bank.v1beta1.Metadata) | repeated | denom_metadata defines the metadata of the differents coins. | - +| `msg_type` | [string](#string) | | | +| `data` | [bytes](#bytes) | | | - - - + - +### Result +Result is the union of ResponseFormat and ResponseCheckTx. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `data` | [bytes](#bytes) | | Data is any data returned from message or handler execution. It MUST be length prefixed in order to separate data from multiple message executions. | +| `log` | [string](#string) | | Log contains the log information from message or handler execution. | +| `events` | [tendermint.abci.Event](#tendermint.abci.Event) | repeated | Events contains a slice of Event objects that were emitted during message or handler execution. | - -

Top

-## cosmos/base/query/v1beta1/pagination.proto - -### PageRequest -PageRequest is to be embedded in gRPC request messages for efficient -pagination. Ex: + - message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } +### SearchTxsResult +SearchTxsResult defines a structure for querying txs pageable | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `key` | [bytes](#bytes) | | 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. | -| `offset` | [uint64](#uint64) | | 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. | -| `limit` | [uint64](#uint64) | | 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. | -| `count_total` | [bool](#bool) | | 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. | - +| `total_count` | [uint64](#uint64) | | Count of all txs | +| `count` | [uint64](#uint64) | | Count of txs in current page | +| `page_number` | [uint64](#uint64) | | Index of current page, start from 1 | +| `page_total` | [uint64](#uint64) | | Count of total pages | +| `limit` | [uint64](#uint64) | | Max count txs per page | +| `txs` | [TxResponse](#cosmos.base.abci.v1beta1.TxResponse) | repeated | List of txs in current page | - -### PageResponse -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; - } +### SimulationResponse +SimulationResponse defines the response generated when a transaction is +successfully simulated. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `next_key` | [bytes](#bytes) | | next_key is the key to be passed to PageRequest.key to query the next page most efficiently | -| `total` | [uint64](#uint64) | | total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise | +| `gas_info` | [GasInfo](#cosmos.base.abci.v1beta1.GasInfo) | | | +| `result` | [Result](#cosmos.base.abci.v1beta1.Result) | | | - - + - +### StringEvent +StringEvent defines en Event object wrapper where all the attributes +contain key/value pairs that are strings instead of raw bytes. - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `type` | [string](#string) | | | +| `attributes` | [Attribute](#cosmos.base.abci.v1beta1.Attribute) | repeated | | - -

Top

-## cosmos/bank/v1beta1/query.proto - + -### QueryAllBalancesRequest -QueryBalanceRequest is the request type for the Query/AllBalances RPC method. +### TxMsgData +TxMsgData defines a list of MsgData. A transaction will have a MsgData object +for each message. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `address` | [string](#string) | | address is the address to query balances for. | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | +| `data` | [MsgData](#cosmos.base.abci.v1beta1.MsgData) | repeated | | - + -### QueryAllBalancesResponse -QueryAllBalancesResponse is the response type for the Query/AllBalances RPC -method. +### TxResponse +TxResponse defines a structure containing relevant tx data and metadata. The +tags are stringified and the log is JSON decoded. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `balances` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | balances is the balances of all the coins. | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | +| `height` | [int64](#int64) | | The block height | +| `txhash` | [string](#string) | | The transaction hash. | +| `codespace` | [string](#string) | | Namespace for the Code | +| `code` | [uint32](#uint32) | | Response code. | +| `data` | [string](#string) | | Result bytes, if any. | +| `raw_log` | [string](#string) | | The output of the application's logger (raw string). May be non-deterministic. | +| `logs` | [ABCIMessageLog](#cosmos.base.abci.v1beta1.ABCIMessageLog) | repeated | The output of the application's logger (typed). May be non-deterministic. | +| `info` | [string](#string) | | Additional information. May be non-deterministic. | +| `gas_wanted` | [int64](#int64) | | Amount of gas requested for transaction. | +| `gas_used` | [int64](#int64) | | Amount of gas consumed by transaction. | +| `tx` | [google.protobuf.Any](#google.protobuf.Any) | | The request transaction bytes. | +| `timestamp` | [string](#string) | | 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. | + - + -### QueryBalanceRequest -QueryBalanceRequest is the request type for the Query/Balance RPC method. + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `address` | [string](#string) | | address is the address to query balances for. | -| `denom` | [string](#string) | | denom is the coin denom to query balances for. | + +

Top

+## cosmos/authz/v1beta1/tx.proto - + -### QueryBalanceResponse -QueryBalanceResponse is the response type for the Query/Balance RPC method. +### MsgExec +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. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `balance` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | balance is the balance of the coin. | +| `grantee` | [string](#string) | | | +| `msgs` | [google.protobuf.Any](#google.protobuf.Any) | repeated | 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. | - + -### QueryDenomMetadataRequest -QueryDenomMetadataRequest is the request type for the Query/DenomMetadata RPC method. +### MsgExecResponse +MsgExecResponse defines the Msg/MsgExecResponse response type. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `denom` | [string](#string) | | denom is the coin denom to query the metadata for. | +| `result` | [cosmos.base.abci.v1beta1.Result](#cosmos.base.abci.v1beta1.Result) | | | - + -### QueryDenomMetadataResponse -QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC -method. +### MsgGrant +MsgGrant grants the provided authorization to the grantee on the granter's +account with the provided expiration time. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `metadata` | [Metadata](#cosmos.bank.v1beta1.Metadata) | | metadata describes and provides all the client information for the requested token. | - - +| `granter` | [string](#string) | | | +| `grantee` | [string](#string) | | | +| `grant` | [Grant](#cosmos.authz.v1beta1.Grant) | | | - -### QueryDenomsMetadataRequest -QueryDenomsMetadataRequest is the request type for the Query/DenomsMetadata RPC method. + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | +### MsgGrantResponse +MsgGrantResponse defines the Msg/MsgGrant response type. - + -### QueryDenomsMetadataResponse -QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC -method. +### MsgRevoke +MsgRevoke revokes any authorization with the provided sdk.Msg type on the +granter's account with that has been granted to the grantee. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `metadatas` | [Metadata](#cosmos.bank.v1beta1.Metadata) | repeated | metadata provides the client information for all the registered tokens. | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | +| `granter` | [string](#string) | | | +| `grantee` | [string](#string) | | | +| `msg_type_url` | [string](#string) | | | - + -### QueryParamsRequest -QueryParamsRequest defines the request type for querying x/bank parameters. +### MsgRevokeResponse +MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. + - + -### QueryParamsResponse -QueryParamsResponse defines the response type for querying x/bank parameters. + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#cosmos.bank.v1beta1.Params) | | | + +### Msg +Msg defines the authz Msg service. +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `Grant` | [MsgGrant](#cosmos.authz.v1beta1.MsgGrant) | [MsgGrantResponse](#cosmos.authz.v1beta1.MsgGrantResponse) | Grant grants the provided authorization to the grantee on the granter's account with the provided expiration time. | | +| `Exec` | [MsgExec](#cosmos.authz.v1beta1.MsgExec) | [MsgExecResponse](#cosmos.authz.v1beta1.MsgExecResponse) | Exec 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. | | +| `Revoke` | [MsgRevoke](#cosmos.authz.v1beta1.MsgRevoke) | [MsgRevokeResponse](#cosmos.authz.v1beta1.MsgRevokeResponse) | Revoke revokes any authorization corresponding to the provided method name on the granter's account that has been granted to the grantee. | | + - + +

Top

-### QuerySupplyOfRequest -QuerySupplyOfRequest is the request type for the Query/SupplyOf RPC method. +## cosmos/base/v1beta1/coin.proto + + + + + +### Coin +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. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `denom` | [string](#string) | | denom is the coin denom to query balances for. | +| `denom` | [string](#string) | | | +| `amount` | [string](#string) | | | - + -### QuerySupplyOfResponse -QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. +### DecCoin +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. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | amount is the supply of the coin. | +| `denom` | [string](#string) | | | +| `amount` | [string](#string) | | | - + -### QueryTotalSupplyRequest -QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC -method. +### DecProto +DecProto defines a Protobuf wrapper around a Dec object. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `dec` | [string](#string) | | | - -### QueryTotalSupplyResponse -QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC -method + + + +### IntProto +IntProto defines a Protobuf wrapper around an Int object. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `supply` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | supply is the supply of the coins | +| `int` | [string](#string) | | | @@ -1622,80 +1849,27 @@ method - - - -### Query -Query defines the gRPC querier service. - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Balance` | [QueryBalanceRequest](#cosmos.bank.v1beta1.QueryBalanceRequest) | [QueryBalanceResponse](#cosmos.bank.v1beta1.QueryBalanceResponse) | Balance queries the balance of a single coin for a single account. | GET|/cosmos/bank/v1beta1/balances/{address}/{denom}| -| `AllBalances` | [QueryAllBalancesRequest](#cosmos.bank.v1beta1.QueryAllBalancesRequest) | [QueryAllBalancesResponse](#cosmos.bank.v1beta1.QueryAllBalancesResponse) | AllBalances queries the balance of all coins for a single account. | GET|/cosmos/bank/v1beta1/balances/{address}| -| `TotalSupply` | [QueryTotalSupplyRequest](#cosmos.bank.v1beta1.QueryTotalSupplyRequest) | [QueryTotalSupplyResponse](#cosmos.bank.v1beta1.QueryTotalSupplyResponse) | TotalSupply queries the total supply of all coins. | GET|/cosmos/bank/v1beta1/supply| -| `SupplyOf` | [QuerySupplyOfRequest](#cosmos.bank.v1beta1.QuerySupplyOfRequest) | [QuerySupplyOfResponse](#cosmos.bank.v1beta1.QuerySupplyOfResponse) | SupplyOf queries the supply of a single coin. | GET|/cosmos/bank/v1beta1/supply/{denom}| -| `Params` | [QueryParamsRequest](#cosmos.bank.v1beta1.QueryParamsRequest) | [QueryParamsResponse](#cosmos.bank.v1beta1.QueryParamsResponse) | Params queries the parameters of x/bank module. | GET|/cosmos/bank/v1beta1/params| -| `DenomMetadata` | [QueryDenomMetadataRequest](#cosmos.bank.v1beta1.QueryDenomMetadataRequest) | [QueryDenomMetadataResponse](#cosmos.bank.v1beta1.QueryDenomMetadataResponse) | DenomsMetadata queries the client metadata of a given coin denomination. | GET|/cosmos/bank/v1beta1/denoms_metadata/{denom}| -| `DenomsMetadata` | [QueryDenomsMetadataRequest](#cosmos.bank.v1beta1.QueryDenomsMetadataRequest) | [QueryDenomsMetadataResponse](#cosmos.bank.v1beta1.QueryDenomsMetadataResponse) | DenomsMetadata queries the client metadata for all registered coin denominations. | GET|/cosmos/bank/v1beta1/denoms_metadata| - - +

Top

-## cosmos/bank/v1beta1/tx.proto - - - - - -### MsgMultiSend -MsgMultiSend represents an arbitrary multi-in, multi-out send message. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `inputs` | [Input](#cosmos.bank.v1beta1.Input) | repeated | | -| `outputs` | [Output](#cosmos.bank.v1beta1.Output) | repeated | | - - - - - - - - -### MsgMultiSendResponse -MsgMultiSendResponse defines the Msg/MultiSend response type. - +## cosmos/bank/v1beta1/authz.proto + - - - -### MsgSend -MsgSend represents a message to send coins from one account to another. +### SendAuthorization +SendAuthorization allows the grantee to spend up to spend_limit coins from +the granter's account. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `from_address` | [string](#string) | | | -| `to_address` | [string](#string) | | | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | - - - - - - - - -### MsgSendResponse -MsgSendResponse defines the Msg/Send response type. +| `spend_limit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | @@ -1707,203 +1881,183 @@ MsgSendResponse defines the Msg/Send response type. - - - -### Msg -Msg defines the bank Msg service. - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Send` | [MsgSend](#cosmos.bank.v1beta1.MsgSend) | [MsgSendResponse](#cosmos.bank.v1beta1.MsgSendResponse) | Send defines a method for sending coins from one account to another account. | | -| `MultiSend` | [MsgMultiSend](#cosmos.bank.v1beta1.MsgMultiSend) | [MsgMultiSendResponse](#cosmos.bank.v1beta1.MsgMultiSendResponse) | MultiSend defines a method for sending coins from some accounts to other accounts. | | - - +

Top

-## cosmos/base/abci/v1beta1/abci.proto +## cosmos/bank/v1beta1/bank.proto - + -### ABCIMessageLog -ABCIMessageLog defines a structure containing an indexed tx ABCI message log. +### DenomUnit +DenomUnit represents a struct that describes a given +denomination unit of the basic token. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `msg_index` | [uint32](#uint32) | | | -| `log` | [string](#string) | | | -| `events` | [StringEvent](#cosmos.base.abci.v1beta1.StringEvent) | repeated | Events contains a slice of Event objects that were emitted during some execution. | +| `denom` | [string](#string) | | denom represents the string name of the given denom unit (e.g uatom). | +| `exponent` | [uint32](#uint32) | | 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 = 1^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). | +| `aliases` | [string](#string) | repeated | aliases is a list of string aliases for the given denom | - + -### Attribute -Attribute defines an attribute wrapper where the key and value are -strings instead of raw bytes. +### Input +Input models transaction input. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `key` | [string](#string) | | | -| `value` | [string](#string) | | | +| `address` | [string](#string) | | | +| `coins` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | - + -### GasInfo -GasInfo defines tx execution gas context. +### Metadata +Metadata represents a struct that describes +a basic token. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `gas_wanted` | [uint64](#uint64) | | GasWanted is the maximum units of work we allow this tx to perform. | -| `gas_used` | [uint64](#uint64) | | GasUsed is the amount of gas actually consumed. | +| `description` | [string](#string) | | | +| `denom_units` | [DenomUnit](#cosmos.bank.v1beta1.DenomUnit) | repeated | denom_units represents the list of DenomUnit's for a given coin | +| `base` | [string](#string) | | base represents the base denom (should be the DenomUnit with exponent = 0). | +| `display` | [string](#string) | | display indicates the suggested denom that should be displayed in clients. | +| `name` | [string](#string) | | name defines the name of the token (eg: Cosmos Atom) | +| `symbol` | [string](#string) | | symbol is the token symbol usually shown on exchanges (eg: ATOM). This can be the same as the display. | - + -### MsgData -MsgData defines the data returned in a Result object during message -execution. +### Output +Output models transaction outputs. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `msg_type` | [string](#string) | | | -| `data` | [bytes](#bytes) | | | +| `address` | [string](#string) | | | +| `coins` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | - + -### Result -Result is the union of ResponseFormat and ResponseCheckTx. +### Params +Params defines the parameters for the bank module. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `data` | [bytes](#bytes) | | Data is any data returned from message or handler execution. It MUST be length prefixed in order to separate data from multiple message executions. | -| `log` | [string](#string) | | Log contains the log information from message or handler execution. | -| `events` | [tendermint.abci.Event](#tendermint.abci.Event) | repeated | Events contains a slice of Event objects that were emitted during message or handler execution. | +| `send_enabled` | [SendEnabled](#cosmos.bank.v1beta1.SendEnabled) | repeated | | +| `default_send_enabled` | [bool](#bool) | | | - + -### SearchTxsResult -SearchTxsResult defines a structure for querying txs pageable +### SendEnabled +SendEnabled maps coin denom to a send_enabled status (whether a denom is +sendable). | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `total_count` | [uint64](#uint64) | | Count of all txs | -| `count` | [uint64](#uint64) | | Count of txs in current page | -| `page_number` | [uint64](#uint64) | | Index of current page, start from 1 | -| `page_total` | [uint64](#uint64) | | Count of total pages | -| `limit` | [uint64](#uint64) | | Max count txs per page | -| `txs` | [TxResponse](#cosmos.base.abci.v1beta1.TxResponse) | repeated | List of txs in current page | +| `denom` | [string](#string) | | | +| `enabled` | [bool](#bool) | | | - + -### SimulationResponse -SimulationResponse defines the response generated when a transaction is -successfully simulated. +### Supply +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. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `gas_info` | [GasInfo](#cosmos.base.abci.v1beta1.GasInfo) | | | -| `result` | [Result](#cosmos.base.abci.v1beta1.Result) | | | +| `total` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | + - + -### StringEvent -StringEvent defines en Event object wrapper where all the attributes -contain key/value pairs that are strings instead of raw bytes. + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `type` | [string](#string) | | | -| `attributes` | [Attribute](#cosmos.base.abci.v1beta1.Attribute) | repeated | | + +

Top

+## cosmos/bank/v1beta1/genesis.proto - + -### TxMsgData -TxMsgData defines a list of MsgData. A transaction will have a MsgData object -for each message. +### Balance +Balance defines an account address and balance pair used in the bank module's +genesis state. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `data` | [MsgData](#cosmos.base.abci.v1beta1.MsgData) | repeated | | +| `address` | [string](#string) | | address is the address of the balance holder. | +| `coins` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | coins defines the different coins this balance holds. | - + -### TxResponse -TxResponse defines a structure containing relevant tx data and metadata. The -tags are stringified and the log is JSON decoded. +### GenesisState +GenesisState defines the bank module's genesis state. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `height` | [int64](#int64) | | The block height | -| `txhash` | [string](#string) | | The transaction hash. | -| `codespace` | [string](#string) | | Namespace for the Code | -| `code` | [uint32](#uint32) | | Response code. | -| `data` | [string](#string) | | Result bytes, if any. | -| `raw_log` | [string](#string) | | The output of the application's logger (raw string). May be non-deterministic. | -| `logs` | [ABCIMessageLog](#cosmos.base.abci.v1beta1.ABCIMessageLog) | repeated | The output of the application's logger (typed). May be non-deterministic. | -| `info` | [string](#string) | | Additional information. May be non-deterministic. | -| `gas_wanted` | [int64](#int64) | | Amount of gas requested for transaction. | -| `gas_used` | [int64](#int64) | | Amount of gas consumed by transaction. | -| `tx` | [google.protobuf.Any](#google.protobuf.Any) | | The request transaction bytes. | -| `timestamp` | [string](#string) | | 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. | +| `params` | [Params](#cosmos.bank.v1beta1.Params) | | params defines all the paramaters of the module. | +| `balances` | [Balance](#cosmos.bank.v1beta1.Balance) | repeated | balances is an array containing the balances of all the accounts. | +| `supply` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | 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. | +| `denom_metadata` | [Metadata](#cosmos.bank.v1beta1.Metadata) | repeated | denom_metadata defines the metadata of the differents coins. | @@ -1919,239 +2073,222 @@ tags are stringified and the log is JSON decoded. - +

Top

-## cosmos/base/kv/v1beta1/kv.proto +## cosmos/bank/v1beta1/query.proto - + -### Pair -Pair defines a key/value bytes tuple. +### QueryAllBalancesRequest +QueryBalanceRequest is the request type for the Query/AllBalances RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `key` | [bytes](#bytes) | | | -| `value` | [bytes](#bytes) | | | +| `address` | [string](#string) | | address is the address to query balances for. | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | - + -### Pairs -Pairs defines a repeated slice of Pair objects. +### QueryAllBalancesResponse +QueryAllBalancesResponse is the response type for the Query/AllBalances RPC +method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `pairs` | [Pair](#cosmos.base.kv.v1beta1.Pair) | repeated | | +| `balances` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | balances is the balances of all the coins. | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | - - + - +### QueryBalanceRequest +QueryBalanceRequest is the request type for the Query/Balance RPC method. - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `address` | [string](#string) | | address is the address to query balances for. | +| `denom` | [string](#string) | | denom is the coin denom to query balances for. | - -

Top

-## cosmos/base/reflection/v1beta1/reflection.proto - + + +### QueryBalanceResponse +QueryBalanceResponse is the response type for the Query/Balance RPC method. -### ListAllInterfacesRequest -ListAllInterfacesRequest is the request type of the ListAllInterfaces RPC. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `balance` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | balance is the balance of the coin. | - -### ListAllInterfacesResponse -ListAllInterfacesResponse is the response type of the ListAllInterfaces RPC. + + +### QueryDenomMetadataRequest +QueryDenomMetadataRequest is the request type for the Query/DenomMetadata RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `interface_names` | [string](#string) | repeated | interface_names is an array of all the registered interfaces. | +| `denom` | [string](#string) | | denom is the coin denom to query the metadata for. | - + -### ListImplementationsRequest -ListImplementationsRequest is the request type of the ListImplementations -RPC. +### QueryDenomMetadataResponse +QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC +method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `interface_name` | [string](#string) | | interface_name defines the interface to query the implementations for. | +| `metadata` | [Metadata](#cosmos.bank.v1beta1.Metadata) | | metadata describes and provides all the client information for the requested token. | - + -### ListImplementationsResponse -ListImplementationsResponse is the response type of the ListImplementations -RPC. +### QueryDenomsMetadataRequest +QueryDenomsMetadataRequest is the request type for the Query/DenomsMetadata RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `implementation_message_names` | [string](#string) | repeated | | - - - - - - - - +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | - - -### ReflectionService -ReflectionService defines a service for interface reflection. -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `ListAllInterfaces` | [ListAllInterfacesRequest](#cosmos.base.reflection.v1beta1.ListAllInterfacesRequest) | [ListAllInterfacesResponse](#cosmos.base.reflection.v1beta1.ListAllInterfacesResponse) | ListAllInterfaces lists all the interfaces registered in the interface registry. | GET|/cosmos/base/reflection/v1beta1/interfaces| -| `ListImplementations` | [ListImplementationsRequest](#cosmos.base.reflection.v1beta1.ListImplementationsRequest) | [ListImplementationsResponse](#cosmos.base.reflection.v1beta1.ListImplementationsResponse) | ListImplementations list all the concrete types that implement a given interface. | GET|/cosmos/base/reflection/v1beta1/interfaces/{interface_name}/implementations| - + +### QueryDenomsMetadataResponse +QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC +method. - -

Top

+| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `metadatas` | [Metadata](#cosmos.bank.v1beta1.Metadata) | repeated | metadata provides the client information for all the registered tokens. | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | -## cosmos/base/snapshots/v1beta1/snapshot.proto - -### Metadata -Metadata contains SDK-specific snapshot metadata. + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `chunk_hashes` | [bytes](#bytes) | repeated | SHA-256 chunk hashes | +### QueryParamsRequest +QueryParamsRequest defines the request type for querying x/bank parameters. - + -### Snapshot -Snapshot contains Tendermint state sync snapshot info. +### QueryParamsResponse +QueryParamsResponse defines the response type for querying x/bank parameters. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `height` | [uint64](#uint64) | | | -| `format` | [uint32](#uint32) | | | -| `chunks` | [uint32](#uint32) | | | -| `hash` | [bytes](#bytes) | | | -| `metadata` | [Metadata](#cosmos.base.snapshots.v1beta1.Metadata) | | | +| `params` | [Params](#cosmos.bank.v1beta1.Params) | | | - - + - +### QuerySupplyOfRequest +QuerySupplyOfRequest is the request type for the Query/SupplyOf RPC method. - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `denom` | [string](#string) | | denom is the coin denom to query balances for. | - -

Top

-## cosmos/base/store/v1beta1/commit_info.proto - + -### CommitID -CommitID defines the committment information when a specific store is -committed. +### QuerySupplyOfResponse +QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `version` | [int64](#int64) | | | -| `hash` | [bytes](#bytes) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | amount is the supply of the coin. | - + -### CommitInfo -CommitInfo defines commit information used by the multi-store when committing -a version/height. +### QueryTotalSupplyRequest +QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC +method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `version` | [int64](#int64) | | | -| `store_infos` | [StoreInfo](#cosmos.base.store.v1beta1.StoreInfo) | repeated | | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | - + -### StoreInfo -StoreInfo defines store-specific commit information. It contains a reference -between a store name and the commit ID. +### QueryTotalSupplyResponse +QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC +method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `name` | [string](#string) | | | -| `commit_id` | [CommitID](#cosmos.base.store.v1beta1.CommitID) | | | +| `supply` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | supply is the supply of the coins | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | @@ -2163,60 +2300,80 @@ between a store name and the commit ID. + + + +### Query +Query defines the gRPC querier service. + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `Balance` | [QueryBalanceRequest](#cosmos.bank.v1beta1.QueryBalanceRequest) | [QueryBalanceResponse](#cosmos.bank.v1beta1.QueryBalanceResponse) | Balance queries the balance of a single coin for a single account. | GET|/cosmos/bank/v1beta1/balances/{address}/{denom}| +| `AllBalances` | [QueryAllBalancesRequest](#cosmos.bank.v1beta1.QueryAllBalancesRequest) | [QueryAllBalancesResponse](#cosmos.bank.v1beta1.QueryAllBalancesResponse) | AllBalances queries the balance of all coins for a single account. | GET|/cosmos/bank/v1beta1/balances/{address}| +| `TotalSupply` | [QueryTotalSupplyRequest](#cosmos.bank.v1beta1.QueryTotalSupplyRequest) | [QueryTotalSupplyResponse](#cosmos.bank.v1beta1.QueryTotalSupplyResponse) | TotalSupply queries the total supply of all coins. | GET|/cosmos/bank/v1beta1/supply| +| `SupplyOf` | [QuerySupplyOfRequest](#cosmos.bank.v1beta1.QuerySupplyOfRequest) | [QuerySupplyOfResponse](#cosmos.bank.v1beta1.QuerySupplyOfResponse) | SupplyOf queries the supply of a single coin. | GET|/cosmos/bank/v1beta1/supply/{denom}| +| `Params` | [QueryParamsRequest](#cosmos.bank.v1beta1.QueryParamsRequest) | [QueryParamsResponse](#cosmos.bank.v1beta1.QueryParamsResponse) | Params queries the parameters of x/bank module. | GET|/cosmos/bank/v1beta1/params| +| `DenomMetadata` | [QueryDenomMetadataRequest](#cosmos.bank.v1beta1.QueryDenomMetadataRequest) | [QueryDenomMetadataResponse](#cosmos.bank.v1beta1.QueryDenomMetadataResponse) | DenomsMetadata queries the client metadata of a given coin denomination. | GET|/cosmos/bank/v1beta1/denoms_metadata/{denom}| +| `DenomsMetadata` | [QueryDenomsMetadataRequest](#cosmos.bank.v1beta1.QueryDenomsMetadataRequest) | [QueryDenomsMetadataResponse](#cosmos.bank.v1beta1.QueryDenomsMetadataResponse) | DenomsMetadata queries the client metadata for all registered coin denominations. | GET|/cosmos/bank/v1beta1/denoms_metadata| + - +

Top

-## cosmos/base/store/v1beta1/snapshot.proto +## cosmos/bank/v1beta1/tx.proto - + -### SnapshotIAVLItem -SnapshotIAVLItem is an exported IAVL node. +### MsgMultiSend +MsgMultiSend represents an arbitrary multi-in, multi-out send message. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `key` | [bytes](#bytes) | | | -| `value` | [bytes](#bytes) | | | -| `version` | [int64](#int64) | | | -| `height` | [int32](#int32) | | | - - +| `inputs` | [Input](#cosmos.bank.v1beta1.Input) | repeated | | +| `outputs` | [Output](#cosmos.bank.v1beta1.Output) | repeated | | - -### SnapshotItem -SnapshotItem is an item contained in a rootmulti.Store snapshot. + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `store` | [SnapshotStoreItem](#cosmos.base.store.v1beta1.SnapshotStoreItem) | | | -| `iavl` | [SnapshotIAVLItem](#cosmos.base.store.v1beta1.SnapshotIAVLItem) | | | +### MsgMultiSendResponse +MsgMultiSendResponse defines the Msg/MultiSend response type. - + -### SnapshotStoreItem -SnapshotStoreItem contains metadata about a snapshotted store. +### MsgSend +MsgSend represents a message to send coins from one account to another. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `name` | [string](#string) | | | +| `from_address` | [string](#string) | | | +| `to_address` | [string](#string) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | + + + + + + + + +### MsgSendResponse +MsgSendResponse defines the Msg/Send response type. @@ -2228,536 +2385,535 @@ SnapshotStoreItem contains metadata about a snapshotted store. + + + +### Msg +Msg defines the bank Msg service. + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `Send` | [MsgSend](#cosmos.bank.v1beta1.MsgSend) | [MsgSendResponse](#cosmos.bank.v1beta1.MsgSendResponse) | Send defines a method for sending coins from one account to another account. | | +| `MultiSend` | [MsgMultiSend](#cosmos.bank.v1beta1.MsgMultiSend) | [MsgMultiSendResponse](#cosmos.bank.v1beta1.MsgMultiSendResponse) | MultiSend defines a method for sending coins from some accounts to other accounts. | | + - +

Top

-## cosmos/base/tendermint/v1beta1/query.proto +## cosmos/base/kv/v1beta1/kv.proto - + -### GetBlockByHeightRequest -GetBlockByHeightRequest is the request type for the Query/GetBlockByHeight RPC method. +### Pair +Pair defines a key/value bytes tuple. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `height` | [int64](#int64) | | | +| `key` | [bytes](#bytes) | | | +| `value` | [bytes](#bytes) | | | - + -### GetBlockByHeightResponse -GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. +### Pairs +Pairs defines a repeated slice of Pair objects. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `block_id` | [tendermint.types.BlockID](#tendermint.types.BlockID) | | | -| `block` | [tendermint.types.Block](#tendermint.types.Block) | | | - +| `pairs` | [Pair](#cosmos.base.kv.v1beta1.Pair) | repeated | | - + -### GetLatestBlockRequest -GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC method. + + + + +

Top

- +## cosmos/base/reflection/v1beta1/reflection.proto -### GetLatestBlockResponse -GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `block_id` | [tendermint.types.BlockID](#tendermint.types.BlockID) | | | -| `block` | [tendermint.types.Block](#tendermint.types.Block) | | | + +### ListAllInterfacesRequest +ListAllInterfacesRequest is the request type of the ListAllInterfaces RPC. - -### GetLatestValidatorSetRequest -GetLatestValidatorSetRequest is the request type for the Query/GetValidatorSetByHeight RPC method. + + +### ListAllInterfacesResponse +ListAllInterfacesResponse is the response type of the ListAllInterfaces RPC. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an pagination for the request. | +| `interface_names` | [string](#string) | repeated | interface_names is an array of all the registered interfaces. | - + -### GetLatestValidatorSetResponse -GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. +### ListImplementationsRequest +ListImplementationsRequest is the request type of the ListImplementations +RPC. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `block_height` | [int64](#int64) | | | -| `validators` | [Validator](#cosmos.base.tendermint.v1beta1.Validator) | repeated | | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines an pagination for the response. | - +| `interface_name` | [string](#string) | | interface_name defines the interface to query the implementations for. | - -### GetNodeInfoRequest -GetNodeInfoRequest is the request type for the Query/GetNodeInfo RPC method. + +### ListImplementationsResponse +ListImplementationsResponse is the response type of the ListImplementations +RPC. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `implementation_message_names` | [string](#string) | repeated | | - -### GetNodeInfoResponse -GetNodeInfoResponse is the request type for the Query/GetNodeInfo RPC method. + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `default_node_info` | [tendermint.p2p.DefaultNodeInfo](#tendermint.p2p.DefaultNodeInfo) | | | -| `application_version` | [VersionInfo](#cosmos.base.tendermint.v1beta1.VersionInfo) | | | + + + +### ReflectionService +ReflectionService defines a service for interface reflection. +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `ListAllInterfaces` | [ListAllInterfacesRequest](#cosmos.base.reflection.v1beta1.ListAllInterfacesRequest) | [ListAllInterfacesResponse](#cosmos.base.reflection.v1beta1.ListAllInterfacesResponse) | ListAllInterfaces lists all the interfaces registered in the interface registry. | GET|/cosmos/base/reflection/v1beta1/interfaces| +| `ListImplementations` | [ListImplementationsRequest](#cosmos.base.reflection.v1beta1.ListImplementationsRequest) | [ListImplementationsResponse](#cosmos.base.reflection.v1beta1.ListImplementationsResponse) | ListImplementations list all the concrete types that implement a given interface. | GET|/cosmos/base/reflection/v1beta1/interfaces/{interface_name}/implementations| - + -### GetSyncingRequest -GetSyncingRequest is the request type for the Query/GetSyncing RPC method. + +

Top

+## cosmos/base/reflection/v2alpha1/reflection.proto - + -### GetSyncingResponse -GetSyncingResponse is the response type for the Query/GetSyncing RPC method. +### AppDescriptor +AppDescriptor describes a cosmos-sdk based application | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `syncing` | [bool](#bool) | | | +| `authn` | [AuthnDescriptor](#cosmos.base.reflection.v2alpha1.AuthnDescriptor) | | AuthnDescriptor provides information on how to authenticate transactions on the application NOTE: experimental and subject to change in future releases. | +| `chain` | [ChainDescriptor](#cosmos.base.reflection.v2alpha1.ChainDescriptor) | | chain provides the chain descriptor | +| `codec` | [CodecDescriptor](#cosmos.base.reflection.v2alpha1.CodecDescriptor) | | codec provides metadata information regarding codec related types | +| `configuration` | [ConfigurationDescriptor](#cosmos.base.reflection.v2alpha1.ConfigurationDescriptor) | | configuration provides metadata information regarding the sdk.Config type | +| `query_services` | [QueryServicesDescriptor](#cosmos.base.reflection.v2alpha1.QueryServicesDescriptor) | | query_services provides metadata information regarding the available queriable endpoints | +| `tx` | [TxDescriptor](#cosmos.base.reflection.v2alpha1.TxDescriptor) | | tx provides metadata information regarding how to send transactions to the given application | - + -### GetValidatorSetByHeightRequest -GetValidatorSetByHeightRequest is the request type for the Query/GetValidatorSetByHeight RPC method. +### AuthnDescriptor +AuthnDescriptor provides information on how to sign transactions without relying +on the online RPCs GetTxMetadata and CombineUnsignedTxAndSignatures | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `height` | [int64](#int64) | | | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an pagination for the request. | +| `sign_modes` | [SigningModeDescriptor](#cosmos.base.reflection.v2alpha1.SigningModeDescriptor) | repeated | sign_modes defines the supported signature algorithm | - + -### GetValidatorSetByHeightResponse -GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. +### ChainDescriptor +ChainDescriptor describes chain information of the application | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `block_height` | [int64](#int64) | | | -| `validators` | [Validator](#cosmos.base.tendermint.v1beta1.Validator) | repeated | | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines an pagination for the response. | +| `id` | [string](#string) | | id is the chain id | - + -### Module -Module is the type for VersionInfo +### CodecDescriptor +CodecDescriptor describes the registered interfaces and provides metadata information on the types | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `path` | [string](#string) | | module path | -| `version` | [string](#string) | | module version | -| `sum` | [string](#string) | | checksum | +| `interfaces` | [InterfaceDescriptor](#cosmos.base.reflection.v2alpha1.InterfaceDescriptor) | repeated | interfaces is a list of the registerted interfaces descriptors | - + -### Validator -Validator is the type for the validator-set. +### ConfigurationDescriptor +ConfigurationDescriptor contains metadata information on the sdk.Config | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `address` | [string](#string) | | | -| `pub_key` | [google.protobuf.Any](#google.protobuf.Any) | | | -| `voting_power` | [int64](#int64) | | | -| `proposer_priority` | [int64](#int64) | | | +| `bech32_account_address_prefix` | [string](#string) | | bech32_account_address_prefix is the account address prefix | - + -### VersionInfo -VersionInfo is the type for the GetNodeInfoResponse message. +### GetAuthnDescriptorRequest +GetAuthnDescriptorRequest is the request used for the GetAuthnDescriptor RPC -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `name` | [string](#string) | | | -| `app_name` | [string](#string) | | | -| `version` | [string](#string) | | | -| `git_commit` | [string](#string) | | | -| `build_tags` | [string](#string) | | | -| `go_version` | [string](#string) | | | -| `build_deps` | [Module](#cosmos.base.tendermint.v1beta1.Module) | repeated | | + - +### GetAuthnDescriptorResponse +GetAuthnDescriptorResponse is the response returned by the GetAuthnDescriptor RPC - - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `authn` | [AuthnDescriptor](#cosmos.base.reflection.v2alpha1.AuthnDescriptor) | | authn describes how to authenticate to the application when sending transactions | - -### Service -Service defines the gRPC querier service for tendermint queries. -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `GetNodeInfo` | [GetNodeInfoRequest](#cosmos.base.tendermint.v1beta1.GetNodeInfoRequest) | [GetNodeInfoResponse](#cosmos.base.tendermint.v1beta1.GetNodeInfoResponse) | GetNodeInfo queries the current node info. | GET|/cosmos/base/tendermint/v1beta1/node_info| -| `GetSyncing` | [GetSyncingRequest](#cosmos.base.tendermint.v1beta1.GetSyncingRequest) | [GetSyncingResponse](#cosmos.base.tendermint.v1beta1.GetSyncingResponse) | GetSyncing queries node syncing. | GET|/cosmos/base/tendermint/v1beta1/syncing| -| `GetLatestBlock` | [GetLatestBlockRequest](#cosmos.base.tendermint.v1beta1.GetLatestBlockRequest) | [GetLatestBlockResponse](#cosmos.base.tendermint.v1beta1.GetLatestBlockResponse) | GetLatestBlock returns the latest block. | GET|/cosmos/base/tendermint/v1beta1/blocks/latest| -| `GetBlockByHeight` | [GetBlockByHeightRequest](#cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest) | [GetBlockByHeightResponse](#cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse) | GetBlockByHeight queries block for given height. | GET|/cosmos/base/tendermint/v1beta1/blocks/{height}| -| `GetLatestValidatorSet` | [GetLatestValidatorSetRequest](#cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest) | [GetLatestValidatorSetResponse](#cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse) | GetLatestValidatorSet queries latest validator-set. | GET|/cosmos/base/tendermint/v1beta1/validatorsets/latest| -| `GetValidatorSetByHeight` | [GetValidatorSetByHeightRequest](#cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest) | [GetValidatorSetByHeightResponse](#cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse) | GetValidatorSetByHeight queries validator-set at a given height. | GET|/cosmos/base/tendermint/v1beta1/validatorsets/{height}| - + +### GetChainDescriptorRequest +GetChainDescriptorRequest is the request used for the GetChainDescriptor RPC - -

Top

-## cosmos/capability/v1beta1/capability.proto - -### Capability -Capability defines an implementation of an object capability. The index -provided to a Capability must be globally unique. + + +### GetChainDescriptorResponse +GetChainDescriptorResponse is the response returned by the GetChainDescriptor RPC | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `index` | [uint64](#uint64) | | | - +| `chain` | [ChainDescriptor](#cosmos.base.reflection.v2alpha1.ChainDescriptor) | | chain describes application chain information | - - -### CapabilityOwners -CapabilityOwners defines a set of owners of a single Capability. The set of -owners must be unique. + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `owners` | [Owner](#cosmos.capability.v1beta1.Owner) | repeated | | +### GetCodecDescriptorRequest +GetCodecDescriptorRequest is the request used for the GetCodecDescriptor RPC - + -### Owner -Owner defines a single capability owner. An owner is defined by the name of -capability and the module name. +### GetCodecDescriptorResponse +GetCodecDescriptorResponse is the response returned by the GetCodecDescriptor RPC | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `module` | [string](#string) | | | -| `name` | [string](#string) | | | - - +| `codec` | [CodecDescriptor](#cosmos.base.reflection.v2alpha1.CodecDescriptor) | | codec describes the application codec such as registered interfaces and implementations | - - - - + +### GetConfigurationDescriptorRequest +GetConfigurationDescriptorRequest is the request used for the GetConfigurationDescriptor RPC - -

Top

-## cosmos/capability/v1beta1/genesis.proto - + -### GenesisOwners -GenesisOwners defines the capability owners with their corresponding index. +### GetConfigurationDescriptorResponse +GetConfigurationDescriptorResponse is the response returned by the GetConfigurationDescriptor RPC | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `index` | [uint64](#uint64) | | index is the index of the capability owner. | -| `index_owners` | [CapabilityOwners](#cosmos.capability.v1beta1.CapabilityOwners) | | index_owners are the owners at the given index. | +| `config` | [ConfigurationDescriptor](#cosmos.base.reflection.v2alpha1.ConfigurationDescriptor) | | config describes the application's sdk.Config | - + -### GenesisState -GenesisState defines the capability module's genesis state. +### GetQueryServicesDescriptorRequest +GetQueryServicesDescriptorRequest is the request used for the GetQueryServicesDescriptor RPC -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `index` | [uint64](#uint64) | | index is the capability global index. | -| `owners` | [GenesisOwners](#cosmos.capability.v1beta1.GenesisOwners) | repeated | owners represents a map from index to owners of the capability index index key is string to allow amino marshalling. | + - +### GetQueryServicesDescriptorResponse +GetQueryServicesDescriptorResponse is the response returned by the GetQueryServicesDescriptor RPC - - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `queries` | [QueryServicesDescriptor](#cosmos.base.reflection.v2alpha1.QueryServicesDescriptor) | | queries provides information on the available queryable services | - - -

Top

-## cosmos/crisis/v1beta1/genesis.proto + +### GetTxDescriptorRequest +GetTxDescriptorRequest is the request used for the GetTxDescriptor RPC - -### GenesisState -GenesisState defines the crisis module's genesis state. + + + + + + +### GetTxDescriptorResponse +GetTxDescriptorResponse is the response returned by the GetTxDescriptor RPC | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `constant_fee` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | constant_fee is the fee used to verify the invariant in the crisis module. | +| `tx` | [TxDescriptor](#cosmos.base.reflection.v2alpha1.TxDescriptor) | | tx provides information on msgs that can be forwarded to the application alongside the accepted transaction protobuf type | - - + - +### InterfaceAcceptingMessageDescriptor +InterfaceAcceptingMessageDescriptor describes a protobuf message which contains +an interface represented as a google.protobuf.Any - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `fullname` | [string](#string) | | fullname is the protobuf fullname of the type containing the interface | +| `field_descriptor_names` | [string](#string) | repeated | 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) | - -

Top

-## cosmos/crisis/v1beta1/tx.proto - + -### MsgVerifyInvariant -MsgVerifyInvariant represents a message to verify a particular invariance. +### InterfaceDescriptor +InterfaceDescriptor describes the implementation of an interface | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `sender` | [string](#string) | | | -| `invariant_module_name` | [string](#string) | | | -| `invariant_route` | [string](#string) | | | +| `fullname` | [string](#string) | | fullname is the name of the interface | +| `interface_accepting_messages` | [InterfaceAcceptingMessageDescriptor](#cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor) | repeated | interface_accepting_messages contains information regarding the proto messages which contain the interface as google.protobuf.Any field | +| `interface_implementers` | [InterfaceImplementerDescriptor](#cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor) | repeated | interface_implementers is a list of the descriptors of the interface implementers | - + -### MsgVerifyInvariantResponse -MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. +### InterfaceImplementerDescriptor +InterfaceImplementerDescriptor describes an interface implementer +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `fullname` | [string](#string) | | fullname is the protobuf queryable name of the interface implementer | +| `type_url` | [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 | - - - + - +### MsgDescriptor +MsgDescriptor describes a cosmos-sdk message that can be delivered with a transaction -### Msg -Msg defines the bank Msg service. -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `VerifyInvariant` | [MsgVerifyInvariant](#cosmos.crisis.v1beta1.MsgVerifyInvariant) | [MsgVerifyInvariantResponse](#cosmos.crisis.v1beta1.MsgVerifyInvariantResponse) | VerifyInvariant defines a method to verify a particular invariance. | | +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `msg_type_url` | [string](#string) | | msg_type_url contains the TypeURL of a sdk.Msg. | - - -

Top

-## cosmos/crypto/ed25519/keys.proto + +### QueryMethodDescriptor +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 - -### PrivKey -PrivKey defines a ed25519 private key. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `name` | [string](#string) | | name is the protobuf name (not fullname) of the method | +| `full_query_path` | [string](#string) | | full_query_path is the path that can be used to query this method via tendermint abci.Query | + + + + + + + + +### QueryServiceDescriptor +QueryServiceDescriptor describes a cosmos-sdk queryable service | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `key` | [bytes](#bytes) | | | +| `fullname` | [string](#string) | | fullname is the protobuf fullname of the service descriptor | +| `is_module` | [bool](#bool) | | is_module describes if this service is actually exposed by an application's module | +| `methods` | [QueryMethodDescriptor](#cosmos.base.reflection.v2alpha1.QueryMethodDescriptor) | repeated | methods provides a list of query service methods | - + -### PubKey -PubKey defines a ed25519 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. +### QueryServicesDescriptor +QueryServicesDescriptor contains the list of cosmos-sdk queriable services | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `key` | [bytes](#bytes) | | | +| `query_services` | [QueryServiceDescriptor](#cosmos.base.reflection.v2alpha1.QueryServiceDescriptor) | repeated | query_services is a list of cosmos-sdk QueryServiceDescriptor | - - + - +### SigningModeDescriptor +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 - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `name` | [string](#string) | | name defines the unique name of the signing mode | +| `number` | [int32](#int32) | | number is the unique int32 identifier for the sign_mode enum | +| `authn_info_provider_method_fullname` | [string](#string) | | 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 | - -

Top

-## cosmos/crypto/multisig/keys.proto - + -### LegacyAminoPubKey -LegacyAminoPubKey specifies a public key type -which nests multiple public keys and a threshold, -it uses legacy amino address rules. +### TxDescriptor +TxDescriptor describes the accepted transaction type | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `threshold` | [uint32](#uint32) | | | -| `public_keys` | [google.protobuf.Any](#google.protobuf.Any) | repeated | | +| `fullname` | [string](#string) | | 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. | +| `msgs` | [MsgDescriptor](#cosmos.base.reflection.v2alpha1.MsgDescriptor) | repeated | msgs lists the accepted application messages (sdk.Msg) | @@ -2769,47 +2925,60 @@ it uses legacy amino address rules. - + +### ReflectionService +ReflectionService defines a service for application reflection. - -

Top

+| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `GetAuthnDescriptor` | [GetAuthnDescriptorRequest](#cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest) | [GetAuthnDescriptorResponse](#cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse) | GetAuthnDescriptor returns information on how to authenticate transactions in the application NOTE: this RPC is still experimental and might be subject to breaking changes or removal in future releases of the cosmos-sdk. | GET|/cosmos/base/reflection/v1beta1/app_descriptor/authn| +| `GetChainDescriptor` | [GetChainDescriptorRequest](#cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest) | [GetChainDescriptorResponse](#cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse) | GetChainDescriptor returns the description of the chain | GET|/cosmos/base/reflection/v1beta1/app_descriptor/chain| +| `GetCodecDescriptor` | [GetCodecDescriptorRequest](#cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest) | [GetCodecDescriptorResponse](#cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse) | GetCodecDescriptor returns the descriptor of the codec of the application | GET|/cosmos/base/reflection/v1beta1/app_descriptor/codec| +| `GetConfigurationDescriptor` | [GetConfigurationDescriptorRequest](#cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest) | [GetConfigurationDescriptorResponse](#cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse) | GetConfigurationDescriptor returns the descriptor for the sdk.Config of the application | GET|/cosmos/base/reflection/v1beta1/app_descriptor/configuration| +| `GetQueryServicesDescriptor` | [GetQueryServicesDescriptorRequest](#cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest) | [GetQueryServicesDescriptorResponse](#cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse) | GetQueryServicesDescriptor returns the available gRPC queryable services of the application | GET|/cosmos/base/reflection/v1beta1/app_descriptor/query_services| +| `GetTxDescriptor` | [GetTxDescriptorRequest](#cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest) | [GetTxDescriptorResponse](#cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse) | GetTxDescriptor returns information on the used transaction object and available msgs that can be used | GET|/cosmos/base/reflection/v1beta1/app_descriptor/tx_descriptor| -## cosmos/crypto/multisig/v1beta1/multisig.proto + - + +

Top

-### CompactBitArray -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. +## cosmos/base/snapshots/v1beta1/snapshot.proto + + + + + +### Metadata +Metadata contains SDK-specific snapshot metadata. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `extra_bits_stored` | [uint32](#uint32) | | | -| `elems` | [bytes](#bytes) | | | +| `chunk_hashes` | [bytes](#bytes) | repeated | SHA-256 chunk hashes | - + -### MultiSignature -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. +### Snapshot +Snapshot contains Tendermint state sync snapshot info. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `signatures` | [bytes](#bytes) | repeated | | +| `height` | [uint64](#uint64) | | | +| `format` | [uint32](#uint32) | | | +| `chunks` | [uint32](#uint32) | | | +| `hash` | [bytes](#bytes) | | | +| `metadata` | [Metadata](#cosmos.base.snapshots.v1beta1.Metadata) | | | @@ -2825,41 +2994,58 @@ signed and with which modes. - +

Top

-## cosmos/crypto/secp256k1/keys.proto +## cosmos/base/store/v1beta1/commit_info.proto - + -### PrivKey -PrivKey defines a secp256k1 private key. +### CommitID +CommitID defines the committment information when a specific store is +committed. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `key` | [bytes](#bytes) | | | +| `version` | [int64](#int64) | | | +| `hash` | [bytes](#bytes) | | | - + -### PubKey -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. +### CommitInfo +CommitInfo defines commit information used by the multi-store when committing +a version/height. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `key` | [bytes](#bytes) | | | +| `version` | [int64](#int64) | | | +| `store_infos` | [StoreInfo](#cosmos.base.store.v1beta1.StoreInfo) | repeated | | + + + + + + + + +### StoreInfo +StoreInfo defines store-specific commit information. It contains a reference +between a store name and the commit ID. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `name` | [string](#string) | | | +| `commit_id` | [CommitID](#cosmos.base.store.v1beta1.CommitID) | | | @@ -2875,390 +3061,337 @@ This prefix is followed with the x-coordinate. - +

Top

-## cosmos/distribution/v1beta1/distribution.proto +## cosmos/base/store/v1beta1/listening.proto - + -### CommunityPoolSpendProposal -CommunityPoolSpendProposal details a proposal for use of community funds, -together with how many coins are proposed to be spent, and to which -recipient account. +### StoreKVPair +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 | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `recipient` | [string](#string) | | | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | +| `store_key` | [string](#string) | | the store key for the KVStore this pair originates from | +| `delete` | [bool](#bool) | | true indicates a delete operation, false indicates a set operation | +| `key` | [bytes](#bytes) | | | +| `value` | [bytes](#bytes) | | | + - + -### CommunityPoolSpendProposalWithDeposit -CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal -with a deposit + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `recipient` | [string](#string) | | | -| `amount` | [string](#string) | | | -| `deposit` | [string](#string) | | | + +

Top

+## cosmos/base/store/v1beta1/snapshot.proto - + -### DelegationDelegatorReward -DelegationDelegatorReward represents the properties -of a delegator's delegation reward. +### SnapshotIAVLItem +SnapshotIAVLItem is an exported IAVL node. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `validator_address` | [string](#string) | | | -| `reward` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | repeated | | +| `key` | [bytes](#bytes) | | | +| `value` | [bytes](#bytes) | | | +| `version` | [int64](#int64) | | | +| `height` | [int32](#int32) | | | - + -### DelegatorStartingInfo -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. +### SnapshotItem +SnapshotItem is an item contained in a rootmulti.Store snapshot. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `previous_period` | [uint64](#uint64) | | | -| `stake` | [string](#string) | | | -| `height` | [uint64](#uint64) | | | +| `store` | [SnapshotStoreItem](#cosmos.base.store.v1beta1.SnapshotStoreItem) | | | +| `iavl` | [SnapshotIAVLItem](#cosmos.base.store.v1beta1.SnapshotIAVLItem) | | | - + -### FeePool -FeePool is the global fee pool for distribution. +### SnapshotStoreItem +SnapshotStoreItem contains metadata about a snapshotted store. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `community_pool` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | repeated | | +| `name` | [string](#string) | | | + - + -### Params -Params defines the set of params for the distribution module. + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `community_tax` | [string](#string) | | | -| `base_proposer_reward` | [string](#string) | | | -| `bonus_proposer_reward` | [string](#string) | | | -| `withdraw_addr_enabled` | [bool](#bool) | | | + +

Top

+## cosmos/base/tendermint/v1beta1/query.proto - + -### ValidatorAccumulatedCommission -ValidatorAccumulatedCommission represents accumulated commission -for a validator kept as a running counter, can be withdrawn at any time. +### GetBlockByHeightRequest +GetBlockByHeightRequest is the request type for the Query/GetBlockByHeight RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `commission` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | repeated | | +| `height` | [int64](#int64) | | | - + -### ValidatorCurrentRewards -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. +### GetBlockByHeightResponse +GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `rewards` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | repeated | | -| `period` | [uint64](#uint64) | | | - - +| `block_id` | [tendermint.types.BlockID](#tendermint.types.BlockID) | | | +| `block` | [tendermint.types.Block](#tendermint.types.Block) | | | - -### ValidatorHistoricalRewards -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 + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `cumulative_reward_ratio` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | repeated | | -| `reference_count` | [uint32](#uint32) | | | +### GetLatestBlockRequest +GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC method. - + -### ValidatorOutstandingRewards -ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards -for a validator inexpensive to track, allows simple sanity checks. +### GetLatestBlockResponse +GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `rewards` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | repeated | | +| `block_id` | [tendermint.types.BlockID](#tendermint.types.BlockID) | | | +| `block` | [tendermint.types.Block](#tendermint.types.Block) | | | - + -### ValidatorSlashEvent -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. +### GetLatestValidatorSetRequest +GetLatestValidatorSetRequest is the request type for the Query/GetValidatorSetByHeight RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `validator_period` | [uint64](#uint64) | | | -| `fraction` | [string](#string) | | | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an pagination for the request. | - + -### ValidatorSlashEvents -ValidatorSlashEvents is a collection of ValidatorSlashEvent messages. +### GetLatestValidatorSetResponse +GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `validator_slash_events` | [ValidatorSlashEvent](#cosmos.distribution.v1beta1.ValidatorSlashEvent) | repeated | | - - +| `block_height` | [int64](#int64) | | | +| `validators` | [Validator](#cosmos.base.tendermint.v1beta1.Validator) | repeated | | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines an pagination for the response. | - - - - + +### GetNodeInfoRequest +GetNodeInfoRequest is the request type for the Query/GetNodeInfo RPC method. - -

Top

-## cosmos/distribution/v1beta1/genesis.proto - + -### DelegatorStartingInfoRecord -DelegatorStartingInfoRecord used for import / export via genesis json. +### GetNodeInfoResponse +GetNodeInfoResponse is the request type for the Query/GetNodeInfo RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `delegator_address` | [string](#string) | | delegator_address is the address of the delegator. | -| `validator_address` | [string](#string) | | validator_address is the address of the validator. | -| `starting_info` | [DelegatorStartingInfo](#cosmos.distribution.v1beta1.DelegatorStartingInfo) | | starting_info defines the starting info of a delegator. | +| `default_node_info` | [tendermint.p2p.DefaultNodeInfo](#tendermint.p2p.DefaultNodeInfo) | | | +| `application_version` | [VersionInfo](#cosmos.base.tendermint.v1beta1.VersionInfo) | | | - + -### DelegatorWithdrawInfo -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. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `delegator_address` | [string](#string) | | delegator_address is the address of the delegator. | -| `withdraw_address` | [string](#string) | | withdraw_address is the address to withdraw the delegation rewards to. | +### GetSyncingRequest +GetSyncingRequest is the request type for the Query/GetSyncing RPC method. - + -### GenesisState -GenesisState defines the distribution module's genesis state. +### GetSyncingResponse +GetSyncingResponse is the response type for the Query/GetSyncing RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `params` | [Params](#cosmos.distribution.v1beta1.Params) | | params defines all the paramaters of the module. | -| `fee_pool` | [FeePool](#cosmos.distribution.v1beta1.FeePool) | | fee_pool defines the fee pool at genesis. | -| `delegator_withdraw_infos` | [DelegatorWithdrawInfo](#cosmos.distribution.v1beta1.DelegatorWithdrawInfo) | repeated | fee_pool defines the delegator withdraw infos at genesis. | -| `previous_proposer` | [string](#string) | | fee_pool defines the previous proposer at genesis. | -| `outstanding_rewards` | [ValidatorOutstandingRewardsRecord](#cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord) | repeated | fee_pool defines the outstanding rewards of all validators at genesis. | -| `validator_accumulated_commissions` | [ValidatorAccumulatedCommissionRecord](#cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord) | repeated | fee_pool defines the accumulated commisions of all validators at genesis. | -| `validator_historical_rewards` | [ValidatorHistoricalRewardsRecord](#cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord) | repeated | fee_pool defines the historical rewards of all validators at genesis. | -| `validator_current_rewards` | [ValidatorCurrentRewardsRecord](#cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord) | repeated | fee_pool defines the current rewards of all validators at genesis. | -| `delegator_starting_infos` | [DelegatorStartingInfoRecord](#cosmos.distribution.v1beta1.DelegatorStartingInfoRecord) | repeated | fee_pool defines the delegator starting infos at genesis. | -| `validator_slash_events` | [ValidatorSlashEventRecord](#cosmos.distribution.v1beta1.ValidatorSlashEventRecord) | repeated | fee_pool defines the validator slash events at genesis. | +| `syncing` | [bool](#bool) | | | - + -### ValidatorAccumulatedCommissionRecord -ValidatorAccumulatedCommissionRecord is used for import / export via genesis -json. +### GetValidatorSetByHeightRequest +GetValidatorSetByHeightRequest is the request type for the Query/GetValidatorSetByHeight RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `validator_address` | [string](#string) | | validator_address is the address of the validator. | -| `accumulated` | [ValidatorAccumulatedCommission](#cosmos.distribution.v1beta1.ValidatorAccumulatedCommission) | | accumulated is the accumulated commission of a validator. | +| `height` | [int64](#int64) | | | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an pagination for the request. | - + -### ValidatorCurrentRewardsRecord -ValidatorCurrentRewardsRecord is used for import / export via genesis json. +### GetValidatorSetByHeightResponse +GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `validator_address` | [string](#string) | | validator_address is the address of the validator. | -| `rewards` | [ValidatorCurrentRewards](#cosmos.distribution.v1beta1.ValidatorCurrentRewards) | | rewards defines the current rewards of a validator. | +| `block_height` | [int64](#int64) | | | +| `validators` | [Validator](#cosmos.base.tendermint.v1beta1.Validator) | repeated | | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines an pagination for the response. | - + -### ValidatorHistoricalRewardsRecord -ValidatorHistoricalRewardsRecord is used for import / export via genesis -json. +### Module +Module is the type for VersionInfo | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `validator_address` | [string](#string) | | validator_address is the address of the validator. | -| `period` | [uint64](#uint64) | | period defines the period the historical rewards apply to. | -| `rewards` | [ValidatorHistoricalRewards](#cosmos.distribution.v1beta1.ValidatorHistoricalRewards) | | rewards defines the historical rewards of a validator. | +| `path` | [string](#string) | | module path | +| `version` | [string](#string) | | module version | +| `sum` | [string](#string) | | checksum | - + -### ValidatorOutstandingRewardsRecord -ValidatorOutstandingRewardsRecord is used for import/export via genesis json. +### Validator +Validator is the type for the validator-set. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `validator_address` | [string](#string) | | validator_address is the address of the validator. | -| `outstanding_rewards` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | repeated | outstanding_rewards represents the oustanding rewards of a validator. | +| `address` | [string](#string) | | | +| `pub_key` | [google.protobuf.Any](#google.protobuf.Any) | | | +| `voting_power` | [int64](#int64) | | | +| `proposer_priority` | [int64](#int64) | | | - + -### ValidatorSlashEventRecord -ValidatorSlashEventRecord is used for import / export via genesis json. +### VersionInfo +VersionInfo is the type for the GetNodeInfoResponse message. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `validator_address` | [string](#string) | | validator_address is the address of the validator. | -| `height` | [uint64](#uint64) | | height defines the block height at which the slash event occured. | -| `period` | [uint64](#uint64) | | period is the period of the slash event. | -| `validator_slash_event` | [ValidatorSlashEvent](#cosmos.distribution.v1beta1.ValidatorSlashEvent) | | validator_slash_event describes the slash event. | +| `name` | [string](#string) | | | +| `app_name` | [string](#string) | | | +| `version` | [string](#string) | | | +| `git_commit` | [string](#string) | | | +| `build_tags` | [string](#string) | | | +| `go_version` | [string](#string) | | | +| `build_deps` | [Module](#cosmos.base.tendermint.v1beta1.Module) | repeated | | @@ -3270,293 +3403,292 @@ ValidatorSlashEventRecord is used for import / export via genesis json. + + + +### Service +Service defines the gRPC querier service for tendermint queries. + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `GetNodeInfo` | [GetNodeInfoRequest](#cosmos.base.tendermint.v1beta1.GetNodeInfoRequest) | [GetNodeInfoResponse](#cosmos.base.tendermint.v1beta1.GetNodeInfoResponse) | GetNodeInfo queries the current node info. | GET|/cosmos/base/tendermint/v1beta1/node_info| +| `GetSyncing` | [GetSyncingRequest](#cosmos.base.tendermint.v1beta1.GetSyncingRequest) | [GetSyncingResponse](#cosmos.base.tendermint.v1beta1.GetSyncingResponse) | GetSyncing queries node syncing. | GET|/cosmos/base/tendermint/v1beta1/syncing| +| `GetLatestBlock` | [GetLatestBlockRequest](#cosmos.base.tendermint.v1beta1.GetLatestBlockRequest) | [GetLatestBlockResponse](#cosmos.base.tendermint.v1beta1.GetLatestBlockResponse) | GetLatestBlock returns the latest block. | GET|/cosmos/base/tendermint/v1beta1/blocks/latest| +| `GetBlockByHeight` | [GetBlockByHeightRequest](#cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest) | [GetBlockByHeightResponse](#cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse) | GetBlockByHeight queries block for given height. | GET|/cosmos/base/tendermint/v1beta1/blocks/{height}| +| `GetLatestValidatorSet` | [GetLatestValidatorSetRequest](#cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest) | [GetLatestValidatorSetResponse](#cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse) | GetLatestValidatorSet queries latest validator-set. | GET|/cosmos/base/tendermint/v1beta1/validatorsets/latest| +| `GetValidatorSetByHeight` | [GetValidatorSetByHeightRequest](#cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest) | [GetValidatorSetByHeightResponse](#cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse) | GetValidatorSetByHeight queries validator-set at a given height. | GET|/cosmos/base/tendermint/v1beta1/validatorsets/{height}| + - +

Top

-## cosmos/distribution/v1beta1/query.proto +## cosmos/capability/v1beta1/capability.proto - + -### QueryCommunityPoolRequest -QueryCommunityPoolRequest is the request type for the Query/CommunityPool RPC -method. +### Capability +Capability defines an implementation of an object capability. The index +provided to a Capability must be globally unique. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `index` | [uint64](#uint64) | | | - + -### QueryCommunityPoolResponse -QueryCommunityPoolResponse is the response type for the Query/CommunityPool -RPC method. +### CapabilityOwners +CapabilityOwners defines a set of owners of a single Capability. The set of +owners must be unique. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `pool` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | repeated | pool defines community pool's coins. | +| `owners` | [Owner](#cosmos.capability.v1beta1.Owner) | repeated | | - + -### QueryDelegationRewardsRequest -QueryDelegationRewardsRequest is the request type for the -Query/DelegationRewards RPC method. +### Owner +Owner defines a single capability owner. An owner is defined by the name of +capability and the module name. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `delegator_address` | [string](#string) | | delegator_address defines the delegator address to query for. | -| `validator_address` | [string](#string) | | validator_address defines the validator address to query for. | +| `module` | [string](#string) | | | +| `name` | [string](#string) | | | + - + -### QueryDelegationRewardsResponse -QueryDelegationRewardsResponse is the response type for the -Query/DelegationRewards RPC method. + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `rewards` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | repeated | rewards defines the rewards accrued by a delegation. | + +

Top

+## cosmos/capability/v1beta1/genesis.proto - + -### QueryDelegationTotalRewardsRequest -QueryDelegationTotalRewardsRequest is the request type for the -Query/DelegationTotalRewards RPC method. +### GenesisOwners +GenesisOwners defines the capability owners with their corresponding index. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `delegator_address` | [string](#string) | | delegator_address defines the delegator address to query for. | +| `index` | [uint64](#uint64) | | index is the index of the capability owner. | +| `index_owners` | [CapabilityOwners](#cosmos.capability.v1beta1.CapabilityOwners) | | index_owners are the owners at the given index. | - + -### QueryDelegationTotalRewardsResponse -QueryDelegationTotalRewardsResponse is the response type for the -Query/DelegationTotalRewards RPC method. +### GenesisState +GenesisState defines the capability module's genesis state. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `rewards` | [DelegationDelegatorReward](#cosmos.distribution.v1beta1.DelegationDelegatorReward) | repeated | rewards defines all the rewards accrued by a delegator. | -| `total` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | repeated | total defines the sum of all the rewards. | +| `index` | [uint64](#uint64) | | index is the capability global index. | +| `owners` | [GenesisOwners](#cosmos.capability.v1beta1.GenesisOwners) | repeated | owners represents a map from index to owners of the capability index index key is string to allow amino marshalling. | + - + -### QueryDelegatorValidatorsRequest -QueryDelegatorValidatorsRequest is the request type for the -Query/DelegatorValidators RPC method. + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `delegator_address` | [string](#string) | | delegator_address defines the delegator address to query for. | + +

Top

+## cosmos/crisis/v1beta1/genesis.proto - + -### QueryDelegatorValidatorsResponse -QueryDelegatorValidatorsResponse is the response type for the -Query/DelegatorValidators RPC method. +### GenesisState +GenesisState defines the crisis module's genesis state. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `validators` | [string](#string) | repeated | validators defines the validators a delegator is delegating for. | +| `constant_fee` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | constant_fee is the fee used to verify the invariant in the crisis module. | + - + -### QueryDelegatorWithdrawAddressRequest -QueryDelegatorWithdrawAddressRequest is the request type for the -Query/DelegatorWithdrawAddress RPC method. + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `delegator_address` | [string](#string) | | delegator_address defines the delegator address to query for. | + +

Top

+## cosmos/crisis/v1beta1/tx.proto - + -### QueryDelegatorWithdrawAddressResponse -QueryDelegatorWithdrawAddressResponse is the response type for the -Query/DelegatorWithdrawAddress RPC method. +### MsgVerifyInvariant +MsgVerifyInvariant represents a message to verify a particular invariance. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `withdraw_address` | [string](#string) | | withdraw_address defines the delegator address to query for. | +| `sender` | [string](#string) | | | +| `invariant_module_name` | [string](#string) | | | +| `invariant_route` | [string](#string) | | | - + -### QueryParamsRequest -QueryParamsRequest is the request type for the Query/Params RPC method. +### MsgVerifyInvariantResponse +MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. + - + -### QueryParamsResponse -QueryParamsResponse is the response type for the Query/Params RPC method. + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#cosmos.distribution.v1beta1.Params) | | params defines the parameters of the module. | + +### Msg +Msg defines the bank Msg service. +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `VerifyInvariant` | [MsgVerifyInvariant](#cosmos.crisis.v1beta1.MsgVerifyInvariant) | [MsgVerifyInvariantResponse](#cosmos.crisis.v1beta1.MsgVerifyInvariantResponse) | VerifyInvariant defines a method to verify a particular invariance. | | + - - -### QueryValidatorCommissionRequest -QueryValidatorCommissionRequest is the request type for the -Query/ValidatorCommission RPC method - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `validator_address` | [string](#string) | | validator_address defines the validator address to query for. | - - - - - - - - -### QueryValidatorCommissionResponse -QueryValidatorCommissionResponse is the response type for the -Query/ValidatorCommission RPC method - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `commission` | [ValidatorAccumulatedCommission](#cosmos.distribution.v1beta1.ValidatorAccumulatedCommission) | | commission defines the commision the validator received. | - - + +

Top

+## cosmos/crypto/ed25519/keys.proto - + -### QueryValidatorOutstandingRewardsRequest -QueryValidatorOutstandingRewardsRequest is the request type for the -Query/ValidatorOutstandingRewards RPC method. +### PrivKey +Deprecated: PrivKey defines a ed25519 private key. +NOTE: ed25519 keys must not be used in SDK apps except in a tendermint validator context. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `validator_address` | [string](#string) | | validator_address defines the validator address to query for. | +| `key` | [bytes](#bytes) | | | - + -### QueryValidatorOutstandingRewardsResponse -QueryValidatorOutstandingRewardsResponse is the response type for the -Query/ValidatorOutstandingRewards RPC method. +### PubKey +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. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `rewards` | [ValidatorOutstandingRewards](#cosmos.distribution.v1beta1.ValidatorOutstandingRewards) | | | +| `key` | [bytes](#bytes) | | | + - + -### QueryValidatorSlashesRequest -QueryValidatorSlashesRequest is the request type for the -Query/ValidatorSlashes RPC method + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `validator_address` | [string](#string) | | validator_address defines the validator address to query for. | -| `starting_height` | [uint64](#uint64) | | starting_height defines the optional starting height to query the slashes. | -| `ending_height` | [uint64](#uint64) | | starting_height defines the optional ending height to query the slashes. | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | + +

Top

+## cosmos/crypto/multisig/keys.proto - + -### QueryValidatorSlashesResponse -QueryValidatorSlashesResponse is the response type for the -Query/ValidatorSlashes RPC method. +### LegacyAminoPubKey +LegacyAminoPubKey specifies a public key type +which nests multiple public keys and a threshold, +it uses legacy amino address rules. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `slashes` | [ValidatorSlashEvent](#cosmos.distribution.v1beta1.ValidatorSlashEvent) | repeated | slashes defines the slashes the validator received. | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | +| `threshold` | [uint32](#uint32) | | | +| `public_keys` | [google.protobuf.Any](#google.protobuf.Any) | repeated | | @@ -3568,184 +3700,143 @@ Query/ValidatorSlashes RPC method. - - - -### Query -Query defines the gRPC querier service for distribution module. - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Params` | [QueryParamsRequest](#cosmos.distribution.v1beta1.QueryParamsRequest) | [QueryParamsResponse](#cosmos.distribution.v1beta1.QueryParamsResponse) | Params queries params of the distribution module. | GET|/cosmos/distribution/v1beta1/params| -| `ValidatorOutstandingRewards` | [QueryValidatorOutstandingRewardsRequest](#cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest) | [QueryValidatorOutstandingRewardsResponse](#cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse) | ValidatorOutstandingRewards queries rewards of a validator address. | GET|/cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards| -| `ValidatorCommission` | [QueryValidatorCommissionRequest](#cosmos.distribution.v1beta1.QueryValidatorCommissionRequest) | [QueryValidatorCommissionResponse](#cosmos.distribution.v1beta1.QueryValidatorCommissionResponse) | ValidatorCommission queries accumulated commission for a validator. | GET|/cosmos/distribution/v1beta1/validators/{validator_address}/commission| -| `ValidatorSlashes` | [QueryValidatorSlashesRequest](#cosmos.distribution.v1beta1.QueryValidatorSlashesRequest) | [QueryValidatorSlashesResponse](#cosmos.distribution.v1beta1.QueryValidatorSlashesResponse) | ValidatorSlashes queries slash events of a validator. | GET|/cosmos/distribution/v1beta1/validators/{validator_address}/slashes| -| `DelegationRewards` | [QueryDelegationRewardsRequest](#cosmos.distribution.v1beta1.QueryDelegationRewardsRequest) | [QueryDelegationRewardsResponse](#cosmos.distribution.v1beta1.QueryDelegationRewardsResponse) | DelegationRewards queries the total rewards accrued by a delegation. | GET|/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}| -| `DelegationTotalRewards` | [QueryDelegationTotalRewardsRequest](#cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest) | [QueryDelegationTotalRewardsResponse](#cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse) | DelegationTotalRewards queries the total rewards accrued by a each validator. | GET|/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards| -| `DelegatorValidators` | [QueryDelegatorValidatorsRequest](#cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest) | [QueryDelegatorValidatorsResponse](#cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse) | DelegatorValidators queries the validators of a delegator. | GET|/cosmos/distribution/v1beta1/delegators/{delegator_address}/validators| -| `DelegatorWithdrawAddress` | [QueryDelegatorWithdrawAddressRequest](#cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest) | [QueryDelegatorWithdrawAddressResponse](#cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse) | DelegatorWithdrawAddress queries withdraw address of a delegator. | GET|/cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address| -| `CommunityPool` | [QueryCommunityPoolRequest](#cosmos.distribution.v1beta1.QueryCommunityPoolRequest) | [QueryCommunityPoolResponse](#cosmos.distribution.v1beta1.QueryCommunityPoolResponse) | CommunityPool queries the community pool coins. | GET|/cosmos/distribution/v1beta1/community_pool| - - +

Top

-## cosmos/distribution/v1beta1/tx.proto +## cosmos/crypto/multisig/v1beta1/multisig.proto - + -### MsgFundCommunityPool -MsgFundCommunityPool allows an account to directly -fund the community pool. +### CompactBitArray +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. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | -| `depositor` | [string](#string) | | | - - - - - - - - -### MsgFundCommunityPoolResponse -MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. +| `extra_bits_stored` | [uint32](#uint32) | | | +| `elems` | [bytes](#bytes) | | | - + -### MsgSetWithdrawAddress -MsgSetWithdrawAddress sets the withdraw address for -a delegator (or validator self-delegation). +### MultiSignature +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. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `delegator_address` | [string](#string) | | | -| `withdraw_address` | [string](#string) | | | - - - - - +| `signatures` | [bytes](#bytes) | repeated | | - -### MsgSetWithdrawAddressResponse -MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type. + + + - + -### MsgWithdrawDelegatorReward -MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator -from a single validator. -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `delegator_address` | [string](#string) | | | -| `validator_address` | [string](#string) | | | + +

Top

+## cosmos/crypto/secp256k1/keys.proto + +### PrivKey +PrivKey defines a secp256k1 private key. - -### MsgWithdrawDelegatorRewardResponse -MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward response type. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `key` | [bytes](#bytes) | | | - + -### MsgWithdrawValidatorCommission -MsgWithdrawValidatorCommission withdraws the full commission to the validator -address. +### PubKey +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. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `validator_address` | [string](#string) | | | - - +| `key` | [bytes](#bytes) | | | - -### MsgWithdrawValidatorCommissionResponse -MsgWithdrawValidatorCommissionResponse defines the Msg/WithdrawValidatorCommission response type. + + + + - - + +

Top

- +## cosmos/crypto/secp256r1/keys.proto - -### Msg -Msg defines the distribution Msg service. + -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `SetWithdrawAddress` | [MsgSetWithdrawAddress](#cosmos.distribution.v1beta1.MsgSetWithdrawAddress) | [MsgSetWithdrawAddressResponse](#cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse) | SetWithdrawAddress defines a method to change the withdraw address for a delegator (or validator self-delegation). | | -| `WithdrawDelegatorReward` | [MsgWithdrawDelegatorReward](#cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward) | [MsgWithdrawDelegatorRewardResponse](#cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse) | WithdrawDelegatorReward defines a method to withdraw rewards of delegator from a single validator. | | -| `WithdrawValidatorCommission` | [MsgWithdrawValidatorCommission](#cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission) | [MsgWithdrawValidatorCommissionResponse](#cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse) | WithdrawValidatorCommission defines a method to withdraw the full commission to the validator address. | | -| `FundCommunityPool` | [MsgFundCommunityPool](#cosmos.distribution.v1beta1.MsgFundCommunityPool) | [MsgFundCommunityPoolResponse](#cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse) | FundCommunityPool defines a method to allow an account to directly fund the community pool. | | +### PrivKey +PrivKey defines a secp256r1 ECDSA private key. - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `secret` | [bytes](#bytes) | | secret number serialized using big-endian encoding | - -

Top

-## cosmos/evidence/v1beta1/evidence.proto - + -### Equivocation -Equivocation implements the Evidence interface and defines evidence of double -signing misbehavior. +### PubKey +PubKey defines a secp256r1 ECDSA public key. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `height` | [int64](#int64) | | | -| `time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -| `power` | [int64](#int64) | | | -| `consensus_address` | [string](#string) | | | +| `key` | [bytes](#bytes) | | Point on secp256r1 curve in a compressed representation as specified in section 4.3.6 of ANSI X9.62: https://webstore.ansi.org/standards/ascx9/ansix9621998 | @@ -3761,201 +3852,230 @@ signing misbehavior. - +

Top

-## cosmos/evidence/v1beta1/genesis.proto +## cosmos/distribution/v1beta1/distribution.proto - + -### GenesisState -GenesisState defines the evidence module's genesis state. +### CommunityPoolSpendProposal +CommunityPoolSpendProposal details a proposal for use of community funds, +together with how many coins are proposed to be spent, and to which +recipient account. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `evidence` | [google.protobuf.Any](#google.protobuf.Any) | repeated | evidence defines all the evidence at genesis. | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `recipient` | [string](#string) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | - - + - +### CommunityPoolSpendProposalWithDeposit +CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal +with a deposit - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `recipient` | [string](#string) | | | +| `amount` | [string](#string) | | | +| `deposit` | [string](#string) | | | - -

Top

-## cosmos/evidence/v1beta1/query.proto - + -### QueryAllEvidenceRequest -QueryEvidenceRequest is the request type for the Query/AllEvidence RPC -method. +### DelegationDelegatorReward +DelegationDelegatorReward represents the properties +of a delegator's delegation reward. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | +| `validator_address` | [string](#string) | | | +| `reward` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | repeated | | - + -### QueryAllEvidenceResponse -QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC -method. +### DelegatorStartingInfo +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. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `evidence` | [google.protobuf.Any](#google.protobuf.Any) | repeated | evidence returns all evidences. | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | +| `previous_period` | [uint64](#uint64) | | | +| `stake` | [string](#string) | | | +| `height` | [uint64](#uint64) | | | - + -### QueryEvidenceRequest -QueryEvidenceRequest is the request type for the Query/Evidence RPC method. +### FeePool +FeePool is the global fee pool for distribution. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `evidence_hash` | [bytes](#bytes) | | evidence_hash defines the hash of the requested evidence. | +| `community_pool` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | repeated | | - + -### QueryEvidenceResponse -QueryEvidenceResponse is the response type for the Query/Evidence RPC method. +### Params +Params defines the set of params for the distribution module. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `evidence` | [google.protobuf.Any](#google.protobuf.Any) | | evidence returns the requested evidence. | - - - - +| `community_tax` | [string](#string) | | | +| `base_proposer_reward` | [string](#string) | | | +| `bonus_proposer_reward` | [string](#string) | | | +| `withdraw_addr_enabled` | [bool](#bool) | | | - - - - -### Query -Query defines the gRPC querier service. + -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Evidence` | [QueryEvidenceRequest](#cosmos.evidence.v1beta1.QueryEvidenceRequest) | [QueryEvidenceResponse](#cosmos.evidence.v1beta1.QueryEvidenceResponse) | Evidence queries evidence based on evidence hash. | GET|/cosmos/evidence/v1beta1/evidence/{evidence_hash}| -| `AllEvidence` | [QueryAllEvidenceRequest](#cosmos.evidence.v1beta1.QueryAllEvidenceRequest) | [QueryAllEvidenceResponse](#cosmos.evidence.v1beta1.QueryAllEvidenceResponse) | AllEvidence queries all evidence. | GET|/cosmos/evidence/v1beta1/evidence| +### ValidatorAccumulatedCommission +ValidatorAccumulatedCommission represents accumulated commission +for a validator kept as a running counter, can be withdrawn at any time. - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `commission` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | repeated | | - -

Top

-## cosmos/evidence/v1beta1/tx.proto - + -### MsgSubmitEvidence -MsgSubmitEvidence represents a message that supports submitting arbitrary -Evidence of misbehavior such as equivocation or counterfactual signing. +### ValidatorCurrentRewards +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. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `submitter` | [string](#string) | | | -| `evidence` | [google.protobuf.Any](#google.protobuf.Any) | | | +| `rewards` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | repeated | | +| `period` | [uint64](#uint64) | | | - + -### MsgSubmitEvidenceResponse -MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. +### ValidatorHistoricalRewards +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 | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `hash` | [bytes](#bytes) | | hash defines the hash of the evidence. | +| `cumulative_reward_ratio` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | repeated | | +| `reference_count` | [uint32](#uint32) | | | - - + - +### ValidatorOutstandingRewards +ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards +for a validator inexpensive to track, allows simple sanity checks. - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `rewards` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | repeated | | -### Msg -Msg defines the evidence Msg service. -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `SubmitEvidence` | [MsgSubmitEvidence](#cosmos.evidence.v1beta1.MsgSubmitEvidence) | [MsgSubmitEvidenceResponse](#cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse) | SubmitEvidence submits an arbitrary Evidence of misbehavior such as equivocation or counterfactual signing. | | - - -

Top

+ -## cosmos/genutil/v1beta1/genesis.proto +### ValidatorSlashEvent +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. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `validator_period` | [uint64](#uint64) | | | +| `fraction` | [string](#string) | | | - -### GenesisState -GenesisState defines the raw genesis transaction in JSON. + + + + + + +### ValidatorSlashEvents +ValidatorSlashEvents is a collection of ValidatorSlashEvent messages. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `gen_txs` | [bytes](#bytes) | repeated | gen_txs defines the genesis transactions. | +| `validator_slash_events` | [ValidatorSlashEvent](#cosmos.distribution.v1beta1.ValidatorSlashEvent) | repeated | | @@ -3971,149 +4091,151 @@ GenesisState defines the raw genesis transaction in JSON. - +

Top

-## cosmos/gov/v1beta1/gov.proto +## cosmos/distribution/v1beta1/genesis.proto - + -### Deposit -Deposit defines an amount deposited by an account address to an active -proposal. +### DelegatorStartingInfoRecord +DelegatorStartingInfoRecord used for import / export via genesis json. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `proposal_id` | [uint64](#uint64) | | | -| `depositor` | [string](#string) | | | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | +| `delegator_address` | [string](#string) | | delegator_address is the address of the delegator. | +| `validator_address` | [string](#string) | | validator_address is the address of the validator. | +| `starting_info` | [DelegatorStartingInfo](#cosmos.distribution.v1beta1.DelegatorStartingInfo) | | starting_info defines the starting info of a delegator. | - + -### DepositParams -DepositParams defines the params for deposits on governance proposals. +### DelegatorWithdrawInfo +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. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `min_deposit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | Minimum deposit for a proposal to enter voting period. | -| `max_deposit_period` | [google.protobuf.Duration](#google.protobuf.Duration) | | Maximum period for Atom holders to deposit on a proposal. Initial value: 2 months. | +| `delegator_address` | [string](#string) | | delegator_address is the address of the delegator. | +| `withdraw_address` | [string](#string) | | withdraw_address is the address to withdraw the delegation rewards to. | - + -### Proposal -Proposal defines the core field members of a governance proposal. +### GenesisState +GenesisState defines the distribution module's genesis state. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `proposal_id` | [uint64](#uint64) | | | -| `content` | [google.protobuf.Any](#google.protobuf.Any) | | | -| `status` | [ProposalStatus](#cosmos.gov.v1beta1.ProposalStatus) | | | -| `final_tally_result` | [TallyResult](#cosmos.gov.v1beta1.TallyResult) | | | -| `submit_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -| `deposit_end_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -| `total_deposit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | -| `voting_start_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -| `voting_end_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `params` | [Params](#cosmos.distribution.v1beta1.Params) | | params defines all the paramaters of the module. | +| `fee_pool` | [FeePool](#cosmos.distribution.v1beta1.FeePool) | | fee_pool defines the fee pool at genesis. | +| `delegator_withdraw_infos` | [DelegatorWithdrawInfo](#cosmos.distribution.v1beta1.DelegatorWithdrawInfo) | repeated | fee_pool defines the delegator withdraw infos at genesis. | +| `previous_proposer` | [string](#string) | | fee_pool defines the previous proposer at genesis. | +| `outstanding_rewards` | [ValidatorOutstandingRewardsRecord](#cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord) | repeated | fee_pool defines the outstanding rewards of all validators at genesis. | +| `validator_accumulated_commissions` | [ValidatorAccumulatedCommissionRecord](#cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord) | repeated | fee_pool defines the accumulated commisions of all validators at genesis. | +| `validator_historical_rewards` | [ValidatorHistoricalRewardsRecord](#cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord) | repeated | fee_pool defines the historical rewards of all validators at genesis. | +| `validator_current_rewards` | [ValidatorCurrentRewardsRecord](#cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord) | repeated | fee_pool defines the current rewards of all validators at genesis. | +| `delegator_starting_infos` | [DelegatorStartingInfoRecord](#cosmos.distribution.v1beta1.DelegatorStartingInfoRecord) | repeated | fee_pool defines the delegator starting infos at genesis. | +| `validator_slash_events` | [ValidatorSlashEventRecord](#cosmos.distribution.v1beta1.ValidatorSlashEventRecord) | repeated | fee_pool defines the validator slash events at genesis. | - + -### TallyParams -TallyParams defines the params for tallying votes on governance proposals. +### ValidatorAccumulatedCommissionRecord +ValidatorAccumulatedCommissionRecord is used for import / export via genesis +json. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `quorum` | [bytes](#bytes) | | Minimum percentage of total stake needed to vote for a result to be considered valid. | -| `threshold` | [bytes](#bytes) | | Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. | -| `veto_threshold` | [bytes](#bytes) | | Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Default value: 1/3. | +| `validator_address` | [string](#string) | | validator_address is the address of the validator. | +| `accumulated` | [ValidatorAccumulatedCommission](#cosmos.distribution.v1beta1.ValidatorAccumulatedCommission) | | accumulated is the accumulated commission of a validator. | - + -### TallyResult -TallyResult defines a standard tally for a governance proposal. +### ValidatorCurrentRewardsRecord +ValidatorCurrentRewardsRecord is used for import / export via genesis json. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `yes` | [string](#string) | | | -| `abstain` | [string](#string) | | | -| `no` | [string](#string) | | | -| `no_with_veto` | [string](#string) | | | +| `validator_address` | [string](#string) | | validator_address is the address of the validator. | +| `rewards` | [ValidatorCurrentRewards](#cosmos.distribution.v1beta1.ValidatorCurrentRewards) | | rewards defines the current rewards of a validator. | - + -### TextProposal -TextProposal defines a standard text proposal whose changes need to be -manually updated in case of approval. +### ValidatorHistoricalRewardsRecord +ValidatorHistoricalRewardsRecord is used for import / export via genesis +json. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | +| `validator_address` | [string](#string) | | validator_address is the address of the validator. | +| `period` | [uint64](#uint64) | | period defines the period the historical rewards apply to. | +| `rewards` | [ValidatorHistoricalRewards](#cosmos.distribution.v1beta1.ValidatorHistoricalRewards) | | rewards defines the historical rewards of a validator. | - + -### Vote -Vote defines a vote on a governance proposal. -A Vote consists of a proposal ID, the voter, and the vote option. +### ValidatorOutstandingRewardsRecord +ValidatorOutstandingRewardsRecord is used for import/export via genesis json. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `proposal_id` | [uint64](#uint64) | | | -| `voter` | [string](#string) | | | -| `option` | [VoteOption](#cosmos.gov.v1beta1.VoteOption) | | | +| `validator_address` | [string](#string) | | validator_address is the address of the validator. | +| `outstanding_rewards` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | repeated | outstanding_rewards represents the oustanding rewards of a validator. | - + -### VotingParams -VotingParams defines the params for voting on governance proposals. +### ValidatorSlashEventRecord +ValidatorSlashEventRecord is used for import / export via genesis json. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `voting_period` | [google.protobuf.Duration](#google.protobuf.Duration) | | Length of the voting period. | +| `validator_address` | [string](#string) | | validator_address is the address of the validator. | +| `height` | [uint64](#uint64) | | height defines the block height at which the slash event occured. | +| `period` | [uint64](#uint64) | | period is the period of the slash event. | +| `validator_slash_event` | [ValidatorSlashEvent](#cosmos.distribution.v1beta1.ValidatorSlashEvent) | | validator_slash_event describes the slash event. | @@ -4121,319 +4243,279 @@ VotingParams defines the params for voting on governance proposals. + - - -### ProposalStatus -ProposalStatus enumerates the valid statuses of a proposal. - -| Name | Number | Description | -| ---- | ------ | ----------- | -| PROPOSAL_STATUS_UNSPECIFIED | 0 | PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. | -| PROPOSAL_STATUS_DEPOSIT_PERIOD | 1 | PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit period. | -| PROPOSAL_STATUS_VOTING_PERIOD | 2 | PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting period. | -| PROPOSAL_STATUS_PASSED | 3 | PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has passed. | -| PROPOSAL_STATUS_REJECTED | 4 | PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has been rejected. | -| PROPOSAL_STATUS_FAILED | 5 | PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has failed. | - - - - - -### VoteOption -VoteOption enumerates the valid vote options for a given governance proposal. - -| Name | Number | Description | -| ---- | ------ | ----------- | -| VOTE_OPTION_UNSPECIFIED | 0 | VOTE_OPTION_UNSPECIFIED defines a no-op vote option. | -| VOTE_OPTION_YES | 1 | VOTE_OPTION_YES defines a yes vote option. | -| VOTE_OPTION_ABSTAIN | 2 | VOTE_OPTION_ABSTAIN defines an abstain vote option. | -| VOTE_OPTION_NO | 3 | VOTE_OPTION_NO defines a no vote option. | -| VOTE_OPTION_NO_WITH_VETO | 4 | VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. | - - - - - + - +

Top

-## cosmos/gov/v1beta1/genesis.proto - - +## cosmos/distribution/v1beta1/query.proto - -### GenesisState -GenesisState defines the gov module's genesis state. + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `starting_proposal_id` | [uint64](#uint64) | | starting_proposal_id is the ID of the starting proposal. | -| `deposits` | [Deposit](#cosmos.gov.v1beta1.Deposit) | repeated | deposits defines all the deposits present at genesis. | -| `votes` | [Vote](#cosmos.gov.v1beta1.Vote) | repeated | votes defines all the votes present at genesis. | -| `proposals` | [Proposal](#cosmos.gov.v1beta1.Proposal) | repeated | proposals defines all the proposals present at genesis. | -| `deposit_params` | [DepositParams](#cosmos.gov.v1beta1.DepositParams) | | params defines all the paramaters of related to deposit. | -| `voting_params` | [VotingParams](#cosmos.gov.v1beta1.VotingParams) | | params defines all the paramaters of related to voting. | -| `tally_params` | [TallyParams](#cosmos.gov.v1beta1.TallyParams) | | params defines all the paramaters of related to tally. | +### QueryCommunityPoolRequest +QueryCommunityPoolRequest is the request type for the Query/CommunityPool RPC +method. - - + - +### QueryCommunityPoolResponse +QueryCommunityPoolResponse is the response type for the Query/CommunityPool +RPC method. - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `pool` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | repeated | pool defines community pool's coins. | - -

Top

-## cosmos/gov/v1beta1/query.proto - + -### QueryDepositRequest -QueryDepositRequest is the request type for the Query/Deposit RPC method. +### QueryDelegationRewardsRequest +QueryDelegationRewardsRequest is the request type for the +Query/DelegationRewards RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `proposal_id` | [uint64](#uint64) | | proposal_id defines the unique id of the proposal. | -| `depositor` | [string](#string) | | depositor defines the deposit addresses from the proposals. | +| `delegator_address` | [string](#string) | | delegator_address defines the delegator address to query for. | +| `validator_address` | [string](#string) | | validator_address defines the validator address to query for. | - + -### QueryDepositResponse -QueryDepositResponse is the response type for the Query/Deposit RPC method. +### QueryDelegationRewardsResponse +QueryDelegationRewardsResponse is the response type for the +Query/DelegationRewards RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `deposit` | [Deposit](#cosmos.gov.v1beta1.Deposit) | | deposit defines the requested deposit. | +| `rewards` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | repeated | rewards defines the rewards accrued by a delegation. | - + -### QueryDepositsRequest -QueryDepositsRequest is the request type for the Query/Deposits RPC method. +### QueryDelegationTotalRewardsRequest +QueryDelegationTotalRewardsRequest is the request type for the +Query/DelegationTotalRewards RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `proposal_id` | [uint64](#uint64) | | proposal_id defines the unique id of the proposal. | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | +| `delegator_address` | [string](#string) | | delegator_address defines the delegator address to query for. | - + -### QueryDepositsResponse -QueryDepositsResponse is the response type for the Query/Deposits RPC method. +### QueryDelegationTotalRewardsResponse +QueryDelegationTotalRewardsResponse is the response type for the +Query/DelegationTotalRewards RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `deposits` | [Deposit](#cosmos.gov.v1beta1.Deposit) | repeated | | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | +| `rewards` | [DelegationDelegatorReward](#cosmos.distribution.v1beta1.DelegationDelegatorReward) | repeated | rewards defines all the rewards accrued by a delegator. | +| `total` | [cosmos.base.v1beta1.DecCoin](#cosmos.base.v1beta1.DecCoin) | repeated | total defines the sum of all the rewards. | - + -### QueryParamsRequest -QueryParamsRequest is the request type for the Query/Params RPC method. +### QueryDelegatorValidatorsRequest +QueryDelegatorValidatorsRequest is the request type for the +Query/DelegatorValidators RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `params_type` | [string](#string) | | params_type defines which parameters to query for, can be one of "voting", "tallying" or "deposit". | +| `delegator_address` | [string](#string) | | delegator_address defines the delegator address to query for. | - + -### QueryParamsResponse -QueryParamsResponse is the response type for the Query/Params RPC method. +### QueryDelegatorValidatorsResponse +QueryDelegatorValidatorsResponse is the response type for the +Query/DelegatorValidators RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `voting_params` | [VotingParams](#cosmos.gov.v1beta1.VotingParams) | | voting_params defines the parameters related to voting. | -| `deposit_params` | [DepositParams](#cosmos.gov.v1beta1.DepositParams) | | deposit_params defines the parameters related to deposit. | -| `tally_params` | [TallyParams](#cosmos.gov.v1beta1.TallyParams) | | tally_params defines the parameters related to tally. | +| `validators` | [string](#string) | repeated | validators defines the validators a delegator is delegating for. | - + -### QueryProposalRequest -QueryProposalRequest is the request type for the Query/Proposal RPC method. +### QueryDelegatorWithdrawAddressRequest +QueryDelegatorWithdrawAddressRequest is the request type for the +Query/DelegatorWithdrawAddress RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `proposal_id` | [uint64](#uint64) | | proposal_id defines the unique id of the proposal. | +| `delegator_address` | [string](#string) | | delegator_address defines the delegator address to query for. | - + -### QueryProposalResponse -QueryProposalResponse is the response type for the Query/Proposal RPC method. +### QueryDelegatorWithdrawAddressResponse +QueryDelegatorWithdrawAddressResponse is the response type for the +Query/DelegatorWithdrawAddress RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `proposal` | [Proposal](#cosmos.gov.v1beta1.Proposal) | | | - - +| `withdraw_address` | [string](#string) | | withdraw_address defines the delegator address to query for. | - -### QueryProposalsRequest -QueryProposalsRequest is the request type for the Query/Proposals RPC method. + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `proposal_status` | [ProposalStatus](#cosmos.gov.v1beta1.ProposalStatus) | | proposal_status defines the status of the proposals. | -| `voter` | [string](#string) | | voter defines the voter address for the proposals. | -| `depositor` | [string](#string) | | depositor defines the deposit addresses from the proposals. | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | +### QueryParamsRequest +QueryParamsRequest is the request type for the Query/Params RPC method. - + -### QueryProposalsResponse -QueryProposalsResponse is the response type for the Query/Proposals RPC -method. +### QueryParamsResponse +QueryParamsResponse is the response type for the Query/Params RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `proposals` | [Proposal](#cosmos.gov.v1beta1.Proposal) | repeated | | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | +| `params` | [Params](#cosmos.distribution.v1beta1.Params) | | params defines the parameters of the module. | - + -### QueryTallyResultRequest -QueryTallyResultRequest is the request type for the Query/Tally RPC method. +### QueryValidatorCommissionRequest +QueryValidatorCommissionRequest is the request type for the +Query/ValidatorCommission RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `proposal_id` | [uint64](#uint64) | | proposal_id defines the unique id of the proposal. | +| `validator_address` | [string](#string) | | validator_address defines the validator address to query for. | - + -### QueryTallyResultResponse -QueryTallyResultResponse is the response type for the Query/Tally RPC method. +### QueryValidatorCommissionResponse +QueryValidatorCommissionResponse is the response type for the +Query/ValidatorCommission RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `tally` | [TallyResult](#cosmos.gov.v1beta1.TallyResult) | | tally defines the requested tally. | +| `commission` | [ValidatorAccumulatedCommission](#cosmos.distribution.v1beta1.ValidatorAccumulatedCommission) | | commission defines the commision the validator received. | - + -### QueryVoteRequest -QueryVoteRequest is the request type for the Query/Vote RPC method. +### QueryValidatorOutstandingRewardsRequest +QueryValidatorOutstandingRewardsRequest is the request type for the +Query/ValidatorOutstandingRewards RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `proposal_id` | [uint64](#uint64) | | proposal_id defines the unique id of the proposal. | -| `voter` | [string](#string) | | voter defines the oter address for the proposals. | +| `validator_address` | [string](#string) | | validator_address defines the validator address to query for. | - + -### QueryVoteResponse -QueryVoteResponse is the response type for the Query/Vote RPC method. +### QueryValidatorOutstandingRewardsResponse +QueryValidatorOutstandingRewardsResponse is the response type for the +Query/ValidatorOutstandingRewards RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `vote` | [Vote](#cosmos.gov.v1beta1.Vote) | | vote defined the queried vote. | +| `rewards` | [ValidatorOutstandingRewards](#cosmos.distribution.v1beta1.ValidatorOutstandingRewards) | | | - + -### QueryVotesRequest -QueryVotesRequest is the request type for the Query/Votes RPC method. +### QueryValidatorSlashesRequest +QueryValidatorSlashesRequest is the request type for the +Query/ValidatorSlashes RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `proposal_id` | [uint64](#uint64) | | proposal_id defines the unique id of the proposal. | +| `validator_address` | [string](#string) | | validator_address defines the validator address to query for. | +| `starting_height` | [uint64](#uint64) | | starting_height defines the optional starting height to query the slashes. | +| `ending_height` | [uint64](#uint64) | | starting_height defines the optional ending height to query the slashes. | | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | @@ -4441,15 +4523,16 @@ QueryVotesRequest is the request type for the Query/Votes RPC method. - + -### QueryVotesResponse -QueryVotesResponse is the response type for the Query/Votes RPC method. +### QueryValidatorSlashesResponse +QueryValidatorSlashesResponse is the response type for the +Query/ValidatorSlashes RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `votes` | [Vote](#cosmos.gov.v1beta1.Vote) | repeated | votes defined the queried votes. | +| `slashes` | [ValidatorSlashEvent](#cosmos.distribution.v1beta1.ValidatorSlashEvent) | repeated | slashes defines the slashes the validator received. | | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | @@ -4463,114 +4546,135 @@ QueryVotesResponse is the response type for the Query/Votes RPC method. - + ### Query -Query defines the gRPC querier service for gov module +Query defines the gRPC querier service for distribution module. | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Proposal` | [QueryProposalRequest](#cosmos.gov.v1beta1.QueryProposalRequest) | [QueryProposalResponse](#cosmos.gov.v1beta1.QueryProposalResponse) | Proposal queries proposal details based on ProposalID. | GET|/cosmos/gov/v1beta1/proposals/{proposal_id}| -| `Proposals` | [QueryProposalsRequest](#cosmos.gov.v1beta1.QueryProposalsRequest) | [QueryProposalsResponse](#cosmos.gov.v1beta1.QueryProposalsResponse) | Proposals queries all proposals based on given status. | GET|/cosmos/gov/v1beta1/proposals| -| `Vote` | [QueryVoteRequest](#cosmos.gov.v1beta1.QueryVoteRequest) | [QueryVoteResponse](#cosmos.gov.v1beta1.QueryVoteResponse) | Vote queries voted information based on proposalID, voterAddr. | GET|/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}| -| `Votes` | [QueryVotesRequest](#cosmos.gov.v1beta1.QueryVotesRequest) | [QueryVotesResponse](#cosmos.gov.v1beta1.QueryVotesResponse) | Votes queries votes of a given proposal. | GET|/cosmos/gov/v1beta1/proposals/{proposal_id}/votes| -| `Params` | [QueryParamsRequest](#cosmos.gov.v1beta1.QueryParamsRequest) | [QueryParamsResponse](#cosmos.gov.v1beta1.QueryParamsResponse) | Params queries all parameters of the gov module. | GET|/cosmos/gov/v1beta1/params/{params_type}| -| `Deposit` | [QueryDepositRequest](#cosmos.gov.v1beta1.QueryDepositRequest) | [QueryDepositResponse](#cosmos.gov.v1beta1.QueryDepositResponse) | Deposit queries single deposit information based proposalID, depositAddr. | GET|/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}| -| `Deposits` | [QueryDepositsRequest](#cosmos.gov.v1beta1.QueryDepositsRequest) | [QueryDepositsResponse](#cosmos.gov.v1beta1.QueryDepositsResponse) | Deposits queries all deposits of a single proposal. | GET|/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits| -| `TallyResult` | [QueryTallyResultRequest](#cosmos.gov.v1beta1.QueryTallyResultRequest) | [QueryTallyResultResponse](#cosmos.gov.v1beta1.QueryTallyResultResponse) | TallyResult queries the tally of a proposal vote. | GET|/cosmos/gov/v1beta1/proposals/{proposal_id}/tally| +| `Params` | [QueryParamsRequest](#cosmos.distribution.v1beta1.QueryParamsRequest) | [QueryParamsResponse](#cosmos.distribution.v1beta1.QueryParamsResponse) | Params queries params of the distribution module. | GET|/cosmos/distribution/v1beta1/params| +| `ValidatorOutstandingRewards` | [QueryValidatorOutstandingRewardsRequest](#cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest) | [QueryValidatorOutstandingRewardsResponse](#cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse) | ValidatorOutstandingRewards queries rewards of a validator address. | GET|/cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards| +| `ValidatorCommission` | [QueryValidatorCommissionRequest](#cosmos.distribution.v1beta1.QueryValidatorCommissionRequest) | [QueryValidatorCommissionResponse](#cosmos.distribution.v1beta1.QueryValidatorCommissionResponse) | ValidatorCommission queries accumulated commission for a validator. | GET|/cosmos/distribution/v1beta1/validators/{validator_address}/commission| +| `ValidatorSlashes` | [QueryValidatorSlashesRequest](#cosmos.distribution.v1beta1.QueryValidatorSlashesRequest) | [QueryValidatorSlashesResponse](#cosmos.distribution.v1beta1.QueryValidatorSlashesResponse) | ValidatorSlashes queries slash events of a validator. | GET|/cosmos/distribution/v1beta1/validators/{validator_address}/slashes| +| `DelegationRewards` | [QueryDelegationRewardsRequest](#cosmos.distribution.v1beta1.QueryDelegationRewardsRequest) | [QueryDelegationRewardsResponse](#cosmos.distribution.v1beta1.QueryDelegationRewardsResponse) | DelegationRewards queries the total rewards accrued by a delegation. | GET|/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}| +| `DelegationTotalRewards` | [QueryDelegationTotalRewardsRequest](#cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest) | [QueryDelegationTotalRewardsResponse](#cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse) | DelegationTotalRewards queries the total rewards accrued by a each validator. | GET|/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards| +| `DelegatorValidators` | [QueryDelegatorValidatorsRequest](#cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest) | [QueryDelegatorValidatorsResponse](#cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse) | DelegatorValidators queries the validators of a delegator. | GET|/cosmos/distribution/v1beta1/delegators/{delegator_address}/validators| +| `DelegatorWithdrawAddress` | [QueryDelegatorWithdrawAddressRequest](#cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest) | [QueryDelegatorWithdrawAddressResponse](#cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse) | DelegatorWithdrawAddress queries withdraw address of a delegator. | GET|/cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address| +| `CommunityPool` | [QueryCommunityPoolRequest](#cosmos.distribution.v1beta1.QueryCommunityPoolRequest) | [QueryCommunityPoolResponse](#cosmos.distribution.v1beta1.QueryCommunityPoolResponse) | CommunityPool queries the community pool coins. | GET|/cosmos/distribution/v1beta1/community_pool| - +

Top

-## cosmos/gov/v1beta1/tx.proto +## cosmos/distribution/v1beta1/tx.proto - + -### MsgDeposit -MsgDeposit defines a message to submit a deposit to an existing proposal. +### MsgFundCommunityPool +MsgFundCommunityPool allows an account to directly +fund the community pool. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `proposal_id` | [uint64](#uint64) | | | -| `depositor` | [string](#string) | | | | `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | +| `depositor` | [string](#string) | | | - + -### MsgDepositResponse -MsgDepositResponse defines the Msg/Deposit response type. +### MsgFundCommunityPoolResponse +MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. - + -### MsgSubmitProposal -MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary -proposal Content. +### MsgSetWithdrawAddress +MsgSetWithdrawAddress sets the withdraw address for +a delegator (or validator self-delegation). | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `content` | [google.protobuf.Any](#google.protobuf.Any) | | | -| `initial_deposit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | -| `proposer` | [string](#string) | | | +| `delegator_address` | [string](#string) | | | +| `withdraw_address` | [string](#string) | | | - + -### MsgSubmitProposalResponse -MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. +### MsgSetWithdrawAddressResponse +MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type. + + + + + + + + +### MsgWithdrawDelegatorReward +MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator +from a single validator. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `proposal_id` | [uint64](#uint64) | | | +| `delegator_address` | [string](#string) | | | +| `validator_address` | [string](#string) | | | - + + +### MsgWithdrawDelegatorRewardResponse +MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward response type. + + + -### MsgVote -MsgVote defines a message to cast a vote. + + + + +### MsgWithdrawValidatorCommission +MsgWithdrawValidatorCommission withdraws the full commission to the validator +address. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `proposal_id` | [uint64](#uint64) | | | -| `voter` | [string](#string) | | | -| `option` | [VoteOption](#cosmos.gov.v1beta1.VoteOption) | | | +| `validator_address` | [string](#string) | | | - + -### MsgVoteResponse -MsgVoteResponse defines the Msg/Vote response type. +### MsgWithdrawValidatorCommissionResponse +MsgWithdrawValidatorCommissionResponse defines the Msg/WithdrawValidatorCommission response type. @@ -4583,58 +4687,42 @@ MsgVoteResponse defines the Msg/Vote response type. - + ### Msg -Msg defines the bank Msg service. +Msg defines the distribution Msg service. | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `SubmitProposal` | [MsgSubmitProposal](#cosmos.gov.v1beta1.MsgSubmitProposal) | [MsgSubmitProposalResponse](#cosmos.gov.v1beta1.MsgSubmitProposalResponse) | SubmitProposal defines a method to create new proposal given a content. | | -| `Vote` | [MsgVote](#cosmos.gov.v1beta1.MsgVote) | [MsgVoteResponse](#cosmos.gov.v1beta1.MsgVoteResponse) | Vote defines a method to add a vote on a specific proposal. | | -| `Deposit` | [MsgDeposit](#cosmos.gov.v1beta1.MsgDeposit) | [MsgDepositResponse](#cosmos.gov.v1beta1.MsgDepositResponse) | Deposit defines a method to add deposit on a specific proposal. | | +| `SetWithdrawAddress` | [MsgSetWithdrawAddress](#cosmos.distribution.v1beta1.MsgSetWithdrawAddress) | [MsgSetWithdrawAddressResponse](#cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse) | SetWithdrawAddress defines a method to change the withdraw address for a delegator (or validator self-delegation). | | +| `WithdrawDelegatorReward` | [MsgWithdrawDelegatorReward](#cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward) | [MsgWithdrawDelegatorRewardResponse](#cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse) | WithdrawDelegatorReward defines a method to withdraw rewards of delegator from a single validator. | | +| `WithdrawValidatorCommission` | [MsgWithdrawValidatorCommission](#cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission) | [MsgWithdrawValidatorCommissionResponse](#cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse) | WithdrawValidatorCommission defines a method to withdraw the full commission to the validator address. | | +| `FundCommunityPool` | [MsgFundCommunityPool](#cosmos.distribution.v1beta1.MsgFundCommunityPool) | [MsgFundCommunityPoolResponse](#cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse) | FundCommunityPool defines a method to allow an account to directly fund the community pool. | | - +

Top

-## cosmos/mint/v1beta1/mint.proto - - - - - -### Minter -Minter represents the minting state. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `inflation` | [string](#string) | | current annual inflation rate | -| `annual_provisions` | [string](#string) | | current annual expected provisions | - - - +## cosmos/evidence/v1beta1/evidence.proto - + -### Params -Params holds parameters for the mint module. +### Equivocation +Equivocation implements the Evidence interface and defines evidence of double +signing misbehavior. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `mint_denom` | [string](#string) | | type of coin to mint | -| `inflation_rate_change` | [string](#string) | | maximum annual change in inflation rate | -| `inflation_max` | [string](#string) | | maximum inflation rate | -| `inflation_min` | [string](#string) | | minimum inflation rate | -| `goal_bonded` | [string](#string) | | goal of percent bonded atoms | -| `blocks_per_year` | [uint64](#uint64) | | expected blocks per year | +| `height` | [int64](#int64) | | | +| `time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `power` | [int64](#int64) | | | +| `consensus_address` | [string](#string) | | | @@ -4650,23 +4738,22 @@ Params holds parameters for the mint module. - +

Top

-## cosmos/mint/v1beta1/genesis.proto +## cosmos/evidence/v1beta1/genesis.proto - + ### GenesisState -GenesisState defines the mint module's genesis state. +GenesisState defines the evidence module's genesis state. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `minter` | [Minter](#cosmos.mint.v1beta1.Minter) | | minter is a space for holding current inflation information. | -| `params` | [Params](#cosmos.mint.v1beta1.Params) | | params defines all the paramaters of the module. | +| `evidence` | [google.protobuf.Any](#google.protobuf.Any) | repeated | evidence defines all the evidence at genesis. | @@ -4682,85 +4769,70 @@ GenesisState defines the mint module's genesis state. - +

Top

-## cosmos/mint/v1beta1/query.proto - - - - - -### QueryAnnualProvisionsRequest -QueryAnnualProvisionsRequest is the request type for the -Query/AnnualProvisions RPC method. - - - +## cosmos/evidence/v1beta1/query.proto - + -### QueryAnnualProvisionsResponse -QueryAnnualProvisionsResponse is the response type for the -Query/AnnualProvisions RPC method. +### QueryAllEvidenceRequest +QueryEvidenceRequest is the request type for the Query/AllEvidence RPC +method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `annual_provisions` | [bytes](#bytes) | | annual_provisions is the current minting annual provisions value. | - - - - - - - - -### QueryInflationRequest -QueryInflationRequest is the request type for the Query/Inflation RPC method. +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | - + -### QueryInflationResponse -QueryInflationResponse is the response type for the Query/Inflation RPC +### QueryAllEvidenceResponse +QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `inflation` | [bytes](#bytes) | | inflation is the current minting inflation value. | +| `evidence` | [google.protobuf.Any](#google.protobuf.Any) | repeated | evidence returns all evidences. | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | - + -### QueryParamsRequest -QueryParamsRequest is the request type for the Query/Params RPC method. +### QueryEvidenceRequest +QueryEvidenceRequest is the request type for the Query/Evidence RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `evidence_hash` | [bytes](#bytes) | | evidence_hash defines the hash of the requested evidence. | - + -### QueryParamsResponse -QueryParamsResponse is the response type for the Query/Params RPC method. +### QueryEvidenceResponse +QueryEvidenceResponse is the response type for the Query/Evidence RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `params` | [Params](#cosmos.mint.v1beta1.Params) | | params defines the parameters of the module. | +| `evidence` | [google.protobuf.Any](#google.protobuf.Any) | | evidence returns the requested evidence. | @@ -4773,57 +4845,53 @@ QueryParamsResponse is the response type for the Query/Params RPC method. - + ### Query -Query provides defines the gRPC querier service. +Query defines the gRPC querier service. | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Params` | [QueryParamsRequest](#cosmos.mint.v1beta1.QueryParamsRequest) | [QueryParamsResponse](#cosmos.mint.v1beta1.QueryParamsResponse) | Params returns the total set of minting parameters. | GET|/cosmos/mint/v1beta1/params| -| `Inflation` | [QueryInflationRequest](#cosmos.mint.v1beta1.QueryInflationRequest) | [QueryInflationResponse](#cosmos.mint.v1beta1.QueryInflationResponse) | Inflation returns the current minting inflation value. | GET|/cosmos/mint/v1beta1/inflation| -| `AnnualProvisions` | [QueryAnnualProvisionsRequest](#cosmos.mint.v1beta1.QueryAnnualProvisionsRequest) | [QueryAnnualProvisionsResponse](#cosmos.mint.v1beta1.QueryAnnualProvisionsResponse) | AnnualProvisions current minting annual provisions value. | GET|/cosmos/mint/v1beta1/annual_provisions| +| `Evidence` | [QueryEvidenceRequest](#cosmos.evidence.v1beta1.QueryEvidenceRequest) | [QueryEvidenceResponse](#cosmos.evidence.v1beta1.QueryEvidenceResponse) | Evidence queries evidence based on evidence hash. | GET|/cosmos/evidence/v1beta1/evidence/{evidence_hash}| +| `AllEvidence` | [QueryAllEvidenceRequest](#cosmos.evidence.v1beta1.QueryAllEvidenceRequest) | [QueryAllEvidenceResponse](#cosmos.evidence.v1beta1.QueryAllEvidenceResponse) | AllEvidence queries all evidence. | GET|/cosmos/evidence/v1beta1/evidence| - +

Top

-## cosmos/params/v1beta1/params.proto +## cosmos/evidence/v1beta1/tx.proto - + -### ParamChange -ParamChange defines an individual parameter change, for use in -ParameterChangeProposal. +### MsgSubmitEvidence +MsgSubmitEvidence represents a message that supports submitting arbitrary +Evidence of misbehavior such as equivocation or counterfactual signing. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `subspace` | [string](#string) | | | -| `key` | [string](#string) | | | -| `value` | [string](#string) | | | +| `submitter` | [string](#string) | | | +| `evidence` | [google.protobuf.Any](#google.protobuf.Any) | | | - + -### ParameterChangeProposal -ParameterChangeProposal defines a proposal to change one or more parameters. +### MsgSubmitEvidenceResponse +MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `changes` | [ParamChange](#cosmos.params.v1beta1.ParamChange) | repeated | | +| `hash` | [bytes](#bytes) | | hash defines the hash of the evidence. | @@ -4835,108 +4903,122 @@ ParameterChangeProposal defines a proposal to change one or more parameters. + + + +### Msg +Msg defines the evidence Msg service. + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `SubmitEvidence` | [MsgSubmitEvidence](#cosmos.evidence.v1beta1.MsgSubmitEvidence) | [MsgSubmitEvidenceResponse](#cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse) | SubmitEvidence submits an arbitrary Evidence of misbehavior such as equivocation or counterfactual signing. | | + - +

Top

-## cosmos/params/v1beta1/query.proto +## cosmos/feegrant/v1beta1/feegrant.proto - + -### QueryParamsRequest -QueryParamsRequest is request type for the Query/Params RPC method. +### AllowedMsgAllowance +AllowedMsgAllowance creates allowance only for specified message types. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `subspace` | [string](#string) | | subspace defines the module to query the parameter for. | -| `key` | [string](#string) | | key defines the key of the parameter in the subspace. | +| `allowance` | [google.protobuf.Any](#google.protobuf.Any) | | allowance can be any of basic and filtered fee allowance. | +| `allowed_messages` | [string](#string) | repeated | allowed_messages are the messages for which the grantee has the access. | - + -### QueryParamsResponse -QueryParamsResponse is response type for the Query/Params RPC method. +### BasicAllowance +BasicAllowance implements Allowance with a one-time grant of tokens +that optionally expires. The grantee can use up to SpendLimit to cover fees. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `param` | [ParamChange](#cosmos.params.v1beta1.ParamChange) | | param defines the queried parameter. | +| `spend_limit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | spend_limit specifies the maximum amount of tokens that can be spent by this allowance and will be updated as tokens are spent. If it is empty, there is no spend limit and any amount of coins can be spent. | +| `expiration` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | expiration specifies an optional time when this allowance expires | - - + - +### Grant +Grant is stored in the KVStore to record a grant with full context - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `granter` | [string](#string) | | granter is the address of the user granting an allowance of their funds. | +| `grantee` | [string](#string) | | grantee is the address of the user being granted an allowance of another user's funds. | +| `allowance` | [google.protobuf.Any](#google.protobuf.Any) | | allowance can be any of basic and filtered fee allowance. | -### Query -Query defines the gRPC querier service. -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Params` | [QueryParamsRequest](#cosmos.params.v1beta1.QueryParamsRequest) | [QueryParamsResponse](#cosmos.params.v1beta1.QueryParamsResponse) | Params queries a specific parameter of a module, given its subspace and key. | GET|/cosmos/params/v1beta1/params| - - -

Top

+ -## cosmos/slashing/v1beta1/slashing.proto +### PeriodicAllowance +PeriodicAllowance extends Allowance to allow for both a maximum cap, +as well as a limit per time period. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `basic` | [BasicAllowance](#cosmos.feegrant.v1beta1.BasicAllowance) | | basic specifies a struct of `BasicAllowance` | +| `period` | [google.protobuf.Duration](#google.protobuf.Duration) | | period specifies the time duration in which period_spend_limit coins can be spent before that allowance is reset | +| `period_spend_limit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | period_spend_limit specifies the maximum number of coins that can be spent in the period | +| `period_can_spend` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | period_can_spend is the number of coins left to be spent before the period_reset time | +| `period_reset` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | 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 | - -### Params -Params represents the parameters used for by the slashing module. -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `signed_blocks_window` | [int64](#int64) | | | -| `min_signed_per_window` | [bytes](#bytes) | | | -| `downtime_jail_duration` | [google.protobuf.Duration](#google.protobuf.Duration) | | | -| `slash_fraction_double_sign` | [bytes](#bytes) | | | -| `slash_fraction_downtime` | [bytes](#bytes) | | | + + + + - -### ValidatorSigningInfo -ValidatorSigningInfo defines a validator's signing info for monitoring their -liveness activity. + +

Top

+ +## cosmos/feegrant/v1beta1/genesis.proto + + + + + +### GenesisState +GenesisState contains a set of fee allowances, persisted from the store | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `address` | [string](#string) | | | -| `start_height` | [int64](#int64) | | height at which validator was first a candidate OR was unjailed | -| `index_offset` | [int64](#int64) | | index offset into signed block bit array | -| `jailed_until` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | timestamp validator cannot be unjailed until | -| `tombstoned` | [bool](#bool) | | whether or not a validator has been tombstoned (killed out of validator set) | -| `missed_blocks_counter` | [int64](#int64) | | missed blocks counter (to avoid scanning the array every time) | +| `allowances` | [Grant](#cosmos.feegrant.v1beta1.Grant) | repeated | | @@ -4952,73 +5034,70 @@ liveness activity. - +

Top

-## cosmos/slashing/v1beta1/genesis.proto +## cosmos/feegrant/v1beta1/query.proto - + -### GenesisState -GenesisState defines the slashing module's genesis state. +### QueryAllowanceRequest +QueryAllowanceRequest is the request type for the Query/Allowance RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `params` | [Params](#cosmos.slashing.v1beta1.Params) | | params defines all the paramaters of related to deposit. | -| `signing_infos` | [SigningInfo](#cosmos.slashing.v1beta1.SigningInfo) | repeated | signing_infos represents a map between validator addresses and their signing infos. | -| `missed_blocks` | [ValidatorMissedBlocks](#cosmos.slashing.v1beta1.ValidatorMissedBlocks) | repeated | signing_infos represents a map between validator addresses and their missed blocks. | +| `granter` | [string](#string) | | granter is the address of the user granting an allowance of their funds. | +| `grantee` | [string](#string) | | grantee is the address of the user being granted an allowance of another user's funds. | - + -### MissedBlock -MissedBlock contains height and missed status as boolean. +### QueryAllowanceResponse +QueryAllowanceResponse is the response type for the Query/Allowance RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `index` | [int64](#int64) | | index is the height at which the block was missed. | -| `missed` | [bool](#bool) | | missed is the missed status. | +| `allowance` | [Grant](#cosmos.feegrant.v1beta1.Grant) | | allowance is a allowance granted for grantee by granter. | - + -### SigningInfo -SigningInfo stores validator signing info of corresponding address. +### QueryAllowancesRequest +QueryAllowancesRequest is the request type for the Query/Allowances RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `address` | [string](#string) | | address is the validator address. | -| `validator_signing_info` | [ValidatorSigningInfo](#cosmos.slashing.v1beta1.ValidatorSigningInfo) | | validator_signing_info represents the signing info of this validator. | +| `grantee` | [string](#string) | | | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an pagination for the request. | - + -### ValidatorMissedBlocks -ValidatorMissedBlocks contains array of missed blocks of corresponding -address. +### QueryAllowancesResponse +QueryAllowancesResponse is the response type for the Query/Allowances RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `address` | [string](#string) | | address is the validator address. | -| `missed_blocks` | [MissedBlock](#cosmos.slashing.v1beta1.MissedBlock) | repeated | missed_blocks is an array of missed blocks by the validator. | +| `allowances` | [Grant](#cosmos.feegrant.v1beta1.Grant) | repeated | allowances are allowance's granted for grantee by granter. | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines an pagination for the response. | @@ -5030,101 +5109,118 @@ address. + + + +### Query +Query defines the gRPC querier service. + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `Allowance` | [QueryAllowanceRequest](#cosmos.feegrant.v1beta1.QueryAllowanceRequest) | [QueryAllowanceResponse](#cosmos.feegrant.v1beta1.QueryAllowanceResponse) | Allowance returns fee granted to the grantee by the granter. | GET|/cosmos/feegrant/v1beta1/allowance/{granter}/{grantee}| +| `Allowances` | [QueryAllowancesRequest](#cosmos.feegrant.v1beta1.QueryAllowancesRequest) | [QueryAllowancesResponse](#cosmos.feegrant.v1beta1.QueryAllowancesResponse) | Allowances returns all the grants for address. | GET|/cosmos/feegrant/v1beta1/allowances/{grantee}| + - +

Top

-## cosmos/slashing/v1beta1/query.proto +## cosmos/feegrant/v1beta1/tx.proto - + -### QueryParamsRequest -QueryParamsRequest is the request type for the Query/Params RPC method +### MsgGrantAllowance +MsgGrantAllowance adds permission for Grantee to spend up to Allowance +of fees from the account of Granter. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `granter` | [string](#string) | | granter is the address of the user granting an allowance of their funds. | +| `grantee` | [string](#string) | | grantee is the address of the user being granted an allowance of another user's funds. | +| `allowance` | [google.protobuf.Any](#google.protobuf.Any) | | allowance can be any of basic and filtered fee allowance. | - -### QueryParamsResponse -QueryParamsResponse is the response type for the Query/Params RPC method + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#cosmos.slashing.v1beta1.Params) | | | +### MsgGrantAllowanceResponse +MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. - + -### QuerySigningInfoRequest -QuerySigningInfoRequest is the request type for the Query/SigningInfo RPC -method +### MsgRevokeAllowance +MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `cons_address` | [string](#string) | | cons_address is the address to query signing info of | +| `granter` | [string](#string) | | granter is the address of the user granting an allowance of their funds. | +| `grantee` | [string](#string) | | grantee is the address of the user being granted an allowance of another user's funds. | - + -### QuerySigningInfoResponse -QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC -method +### MsgRevokeAllowanceResponse +MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `val_signing_info` | [ValidatorSigningInfo](#cosmos.slashing.v1beta1.ValidatorSigningInfo) | | val_signing_info is the signing info of requested val cons address | + + + - -### QuerySigningInfosRequest -QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC -method + +### Msg +Msg defines the feegrant msg service. -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `GrantAllowance` | [MsgGrantAllowance](#cosmos.feegrant.v1beta1.MsgGrantAllowance) | [MsgGrantAllowanceResponse](#cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse) | GrantAllowance grants fee allowance to the grantee on the granter's account with the provided expiration time. | | +| `RevokeAllowance` | [MsgRevokeAllowance](#cosmos.feegrant.v1beta1.MsgRevokeAllowance) | [MsgRevokeAllowanceResponse](#cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse) | RevokeAllowance revokes any fee allowance of granter's account that has been granted to the grantee. | | + + +

Top

+## cosmos/genutil/v1beta1/genesis.proto - -### QuerySigningInfosResponse -QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC -method + + + +### GenesisState +GenesisState defines the raw genesis transaction in JSON. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `info` | [ValidatorSigningInfo](#cosmos.slashing.v1beta1.ValidatorSigningInfo) | repeated | info is the signing info of all validators | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | +| `gen_txs` | [bytes](#bytes) | repeated | gen_txs defines the genesis transactions. | @@ -5136,977 +5232,954 @@ method - - - -### Query -Query provides defines the gRPC querier service - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Params` | [QueryParamsRequest](#cosmos.slashing.v1beta1.QueryParamsRequest) | [QueryParamsResponse](#cosmos.slashing.v1beta1.QueryParamsResponse) | Params queries the parameters of slashing module | GET|/cosmos/slashing/v1beta1/params| -| `SigningInfo` | [QuerySigningInfoRequest](#cosmos.slashing.v1beta1.QuerySigningInfoRequest) | [QuerySigningInfoResponse](#cosmos.slashing.v1beta1.QuerySigningInfoResponse) | SigningInfo queries the signing info of given cons address | GET|/cosmos/slashing/v1beta1/signing_infos/{cons_address}| -| `SigningInfos` | [QuerySigningInfosRequest](#cosmos.slashing.v1beta1.QuerySigningInfosRequest) | [QuerySigningInfosResponse](#cosmos.slashing.v1beta1.QuerySigningInfosResponse) | SigningInfos queries signing info of all validators | GET|/cosmos/slashing/v1beta1/signing_infos| - - +

Top

-## cosmos/slashing/v1beta1/tx.proto +## cosmos/gov/v1beta1/gov.proto - + -### MsgUnjail -MsgUnjail defines the Msg/Unjail request type +### Deposit +Deposit defines an amount deposited by an account address to an active +proposal. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `validator_addr` | [string](#string) | | | - - +| `proposal_id` | [uint64](#uint64) | | | +| `depositor` | [string](#string) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | - -### MsgUnjailResponse -MsgUnjailResponse defines the Msg/Unjail response type + +### DepositParams +DepositParams defines the params for deposits on governance proposals. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `min_deposit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | Minimum deposit for a proposal to enter voting period. | +| `max_deposit_period` | [google.protobuf.Duration](#google.protobuf.Duration) | | Maximum period for Atom holders to deposit on a proposal. Initial value: 2 months. | - - - - -### Msg -Msg defines the slashing Msg service. + -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Unjail` | [MsgUnjail](#cosmos.slashing.v1beta1.MsgUnjail) | [MsgUnjailResponse](#cosmos.slashing.v1beta1.MsgUnjailResponse) | Unjail defines a method for unjailing a jailed validator, thus returning them into the bonded validator set, so they can begin receiving provisions and rewards again. | | +### Proposal +Proposal defines the core field members of a governance proposal. - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `proposal_id` | [uint64](#uint64) | | | +| `content` | [google.protobuf.Any](#google.protobuf.Any) | | | +| `status` | [ProposalStatus](#cosmos.gov.v1beta1.ProposalStatus) | | | +| `final_tally_result` | [TallyResult](#cosmos.gov.v1beta1.TallyResult) | | | +| `submit_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `deposit_end_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `total_deposit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | +| `voting_start_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `voting_end_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | - -

Top

-## cosmos/staking/v1beta1/staking.proto - + -### Commission -Commission defines commission parameters for a given validator. +### TallyParams +TallyParams defines the params for tallying votes on governance proposals. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `commission_rates` | [CommissionRates](#cosmos.staking.v1beta1.CommissionRates) | | commission_rates defines the initial commission rates to be used for creating a validator. | -| `update_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | update_time is the last time the commission rate was changed. | +| `quorum` | [bytes](#bytes) | | Minimum percentage of total stake needed to vote for a result to be considered valid. | +| `threshold` | [bytes](#bytes) | | Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. | +| `veto_threshold` | [bytes](#bytes) | | Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Default value: 1/3. | - + -### CommissionRates -CommissionRates defines the initial commission rates to be used for creating -a validator. +### TallyResult +TallyResult defines a standard tally for a governance proposal. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `rate` | [string](#string) | | rate is the commission rate charged to delegators, as a fraction. | -| `max_rate` | [string](#string) | | max_rate defines the maximum commission rate which validator can ever charge, as a fraction. | -| `max_change_rate` | [string](#string) | | max_change_rate defines the maximum daily increase of the validator commission, as a fraction. | +| `yes` | [string](#string) | | | +| `abstain` | [string](#string) | | | +| `no` | [string](#string) | | | +| `no_with_veto` | [string](#string) | | | - + -### DVPair -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. +### TextProposal +TextProposal defines a standard text proposal whose changes need to be +manually updated in case of approval. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `delegator_address` | [string](#string) | | | -| `validator_address` | [string](#string) | | | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | - + -### DVPairs -DVPairs defines an array of DVPair objects. +### Vote +Vote defines a vote on a governance proposal. +A Vote consists of a proposal ID, the voter, and the vote option. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `pairs` | [DVPair](#cosmos.staking.v1beta1.DVPair) | repeated | | +| `proposal_id` | [uint64](#uint64) | | | +| `voter` | [string](#string) | | | +| `options` | [WeightedVoteOption](#cosmos.gov.v1beta1.WeightedVoteOption) | repeated | | - + -### DVVTriplet -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. +### VotingParams +VotingParams defines the params for voting on governance proposals. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `delegator_address` | [string](#string) | | | -| `validator_src_address` | [string](#string) | | | -| `validator_dst_address` | [string](#string) | | | +| `voting_period` | [google.protobuf.Duration](#google.protobuf.Duration) | | Length of the voting period. | - + -### DVVTriplets -DVVTriplets defines an array of DVVTriplet objects. +### WeightedVoteOption +WeightedVoteOption defines a unit of vote for vote split. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `triplets` | [DVVTriplet](#cosmos.staking.v1beta1.DVVTriplet) | repeated | | +| `option` | [VoteOption](#cosmos.gov.v1beta1.VoteOption) | | | +| `weight` | [string](#string) | | | + - -### Delegation -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. + +### ProposalStatus +ProposalStatus enumerates the valid statuses of a proposal. -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `delegator_address` | [string](#string) | | delegator_address is the bech32-encoded address of the delegator. | -| `validator_address` | [string](#string) | | validator_address is the bech32-encoded address of the validator. | -| `shares` | [string](#string) | | shares define the delegation shares received. | +| Name | Number | Description | +| ---- | ------ | ----------- | +| PROPOSAL_STATUS_UNSPECIFIED | 0 | PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. | +| PROPOSAL_STATUS_DEPOSIT_PERIOD | 1 | PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit period. | +| PROPOSAL_STATUS_VOTING_PERIOD | 2 | PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting period. | +| PROPOSAL_STATUS_PASSED | 3 | PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has passed. | +| PROPOSAL_STATUS_REJECTED | 4 | PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has been rejected. | +| PROPOSAL_STATUS_FAILED | 5 | PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has failed. | + + +### VoteOption +VoteOption enumerates the valid vote options for a given governance proposal. +| Name | Number | Description | +| ---- | ------ | ----------- | +| VOTE_OPTION_UNSPECIFIED | 0 | VOTE_OPTION_UNSPECIFIED defines a no-op vote option. | +| VOTE_OPTION_YES | 1 | VOTE_OPTION_YES defines a yes vote option. | +| VOTE_OPTION_ABSTAIN | 2 | VOTE_OPTION_ABSTAIN defines an abstain vote option. | +| VOTE_OPTION_NO | 3 | VOTE_OPTION_NO defines a no vote option. | +| VOTE_OPTION_NO_WITH_VETO | 4 | VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. | - + -### DelegationResponse -DelegationResponse is equivalent to Delegation except that it contains a -balance in addition to shares which is more suitable for client responses. + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `delegation` | [Delegation](#cosmos.staking.v1beta1.Delegation) | | | -| `balance` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + +

Top

+## cosmos/gov/v1beta1/genesis.proto - + -### Description -Description defines a validator description. +### GenesisState +GenesisState defines the gov module's genesis state. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `moniker` | [string](#string) | | moniker defines a human-readable name for the validator. | -| `identity` | [string](#string) | | identity defines an optional identity signature (ex. UPort or Keybase). | -| `website` | [string](#string) | | website defines an optional website link. | -| `security_contact` | [string](#string) | | security_contact defines an optional email for security contact. | -| `details` | [string](#string) | | details define other optional details. | +| `starting_proposal_id` | [uint64](#uint64) | | starting_proposal_id is the ID of the starting proposal. | +| `deposits` | [Deposit](#cosmos.gov.v1beta1.Deposit) | repeated | deposits defines all the deposits present at genesis. | +| `votes` | [Vote](#cosmos.gov.v1beta1.Vote) | repeated | votes defines all the votes present at genesis. | +| `proposals` | [Proposal](#cosmos.gov.v1beta1.Proposal) | repeated | proposals defines all the proposals present at genesis. | +| `deposit_params` | [DepositParams](#cosmos.gov.v1beta1.DepositParams) | | params defines all the paramaters of related to deposit. | +| `voting_params` | [VotingParams](#cosmos.gov.v1beta1.VotingParams) | | params defines all the paramaters of related to voting. | +| `tally_params` | [TallyParams](#cosmos.gov.v1beta1.TallyParams) | | params defines all the paramaters of related to tally. | + - + -### HistoricalInfo -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). + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `header` | [tendermint.types.Header](#tendermint.types.Header) | | | -| `valset` | [Validator](#cosmos.staking.v1beta1.Validator) | repeated | | + +

Top

+## cosmos/gov/v1beta1/query.proto - + -### Params -Params defines the parameters for the staking module. +### QueryDepositRequest +QueryDepositRequest is the request type for the Query/Deposit RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `unbonding_time` | [google.protobuf.Duration](#google.protobuf.Duration) | | unbonding_time is the time duration of unbonding. | -| `max_validators` | [uint32](#uint32) | | max_validators is the maximum number of validators. | -| `max_entries` | [uint32](#uint32) | | max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). | -| `historical_entries` | [uint32](#uint32) | | historical_entries is the number of historical entries to persist. | -| `bond_denom` | [string](#string) | | bond_denom defines the bondable coin denomination. | +| `proposal_id` | [uint64](#uint64) | | proposal_id defines the unique id of the proposal. | +| `depositor` | [string](#string) | | depositor defines the deposit addresses from the proposals. | - + -### Pool -Pool is used for tracking bonded and not-bonded token supply of the bond -denomination. +### QueryDepositResponse +QueryDepositResponse is the response type for the Query/Deposit RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `not_bonded_tokens` | [string](#string) | | | -| `bonded_tokens` | [string](#string) | | | +| `deposit` | [Deposit](#cosmos.gov.v1beta1.Deposit) | | deposit defines the requested deposit. | - + -### Redelegation -Redelegation contains the list of a particular delegator's redelegating bonds -from a particular source validator to a particular destination validator. +### QueryDepositsRequest +QueryDepositsRequest is the request type for the Query/Deposits RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `delegator_address` | [string](#string) | | delegator_address is the bech32-encoded address of the delegator. | -| `validator_src_address` | [string](#string) | | validator_src_address is the validator redelegation source operator address. | -| `validator_dst_address` | [string](#string) | | validator_dst_address is the validator redelegation destination operator address. | -| `entries` | [RedelegationEntry](#cosmos.staking.v1beta1.RedelegationEntry) | repeated | entries are the redelegation entries. - -redelegation entries | +| `proposal_id` | [uint64](#uint64) | | proposal_id defines the unique id of the proposal. | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | - + -### RedelegationEntry -RedelegationEntry defines a redelegation object with relevant metadata. +### QueryDepositsResponse +QueryDepositsResponse is the response type for the Query/Deposits RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `creation_height` | [int64](#int64) | | creation_height defines the height which the redelegation took place. | -| `completion_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | completion_time defines the unix time for redelegation completion. | -| `initial_balance` | [string](#string) | | initial_balance defines the initial balance when redelegation started. | -| `shares_dst` | [string](#string) | | shares_dst is the amount of destination-validator shares created by redelegation. | +| `deposits` | [Deposit](#cosmos.gov.v1beta1.Deposit) | repeated | | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | - + -### RedelegationEntryResponse -RedelegationEntryResponse is equivalent to a RedelegationEntry except that it -contains a balance in addition to shares which is more suitable for client -responses. +### QueryParamsRequest +QueryParamsRequest is the request type for the Query/Params RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `redelegation_entry` | [RedelegationEntry](#cosmos.staking.v1beta1.RedelegationEntry) | | | -| `balance` | [string](#string) | | | +| `params_type` | [string](#string) | | params_type defines which parameters to query for, can be one of "voting", "tallying" or "deposit". | - + -### RedelegationResponse -RedelegationResponse is equivalent to a Redelegation except that its entries -contain a balance in addition to shares which is more suitable for client -responses. +### QueryParamsResponse +QueryParamsResponse is the response type for the Query/Params RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `redelegation` | [Redelegation](#cosmos.staking.v1beta1.Redelegation) | | | -| `entries` | [RedelegationEntryResponse](#cosmos.staking.v1beta1.RedelegationEntryResponse) | repeated | | +| `voting_params` | [VotingParams](#cosmos.gov.v1beta1.VotingParams) | | voting_params defines the parameters related to voting. | +| `deposit_params` | [DepositParams](#cosmos.gov.v1beta1.DepositParams) | | deposit_params defines the parameters related to deposit. | +| `tally_params` | [TallyParams](#cosmos.gov.v1beta1.TallyParams) | | tally_params defines the parameters related to tally. | - + -### UnbondingDelegation -UnbondingDelegation stores all of a single delegator's unbonding bonds -for a single validator in an time-ordered list. +### QueryProposalRequest +QueryProposalRequest is the request type for the Query/Proposal RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `delegator_address` | [string](#string) | | delegator_address is the bech32-encoded address of the delegator. | -| `validator_address` | [string](#string) | | validator_address is the bech32-encoded address of the validator. | -| `entries` | [UnbondingDelegationEntry](#cosmos.staking.v1beta1.UnbondingDelegationEntry) | repeated | entries are the unbonding delegation entries. - -unbonding delegation entries | +| `proposal_id` | [uint64](#uint64) | | proposal_id defines the unique id of the proposal. | - + -### UnbondingDelegationEntry -UnbondingDelegationEntry defines an unbonding object with relevant metadata. +### QueryProposalResponse +QueryProposalResponse is the response type for the Query/Proposal RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `creation_height` | [int64](#int64) | | creation_height is the height which the unbonding took place. | -| `completion_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | completion_time is the unix time for unbonding completion. | -| `initial_balance` | [string](#string) | | initial_balance defines the tokens initially scheduled to receive at completion. | -| `balance` | [string](#string) | | balance defines the tokens to receive at completion. | +| `proposal` | [Proposal](#cosmos.gov.v1beta1.Proposal) | | | - + -### ValAddresses -ValAddresses defines a repeated set of validator addresses. +### QueryProposalsRequest +QueryProposalsRequest is the request type for the Query/Proposals RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `addresses` | [string](#string) | repeated | | +| `proposal_status` | [ProposalStatus](#cosmos.gov.v1beta1.ProposalStatus) | | proposal_status defines the status of the proposals. | +| `voter` | [string](#string) | | voter defines the voter address for the proposals. | +| `depositor` | [string](#string) | | depositor defines the deposit addresses from the proposals. | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | - + -### Validator -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. +### QueryProposalsResponse +QueryProposalsResponse is the response type for the Query/Proposals RPC +method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `operator_address` | [string](#string) | | operator_address defines the address of the validator's operator; bech encoded in JSON. | -| `consensus_pubkey` | [google.protobuf.Any](#google.protobuf.Any) | | consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. | -| `jailed` | [bool](#bool) | | jailed defined whether the validator has been jailed from bonded status or not. | -| `status` | [BondStatus](#cosmos.staking.v1beta1.BondStatus) | | status is the validator status (bonded/unbonding/unbonded). | -| `tokens` | [string](#string) | | tokens define the delegated tokens (incl. self-delegation). | -| `delegator_shares` | [string](#string) | | delegator_shares defines total shares issued to a validator's delegators. | -| `description` | [Description](#cosmos.staking.v1beta1.Description) | | description defines the description terms for the validator. | -| `unbonding_height` | [int64](#int64) | | unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. | -| `unbonding_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. | -| `commission` | [Commission](#cosmos.staking.v1beta1.Commission) | | commission defines the commission parameters. | -| `min_self_delegation` | [string](#string) | | min_self_delegation is the validator's self declared minimum self delegation. | +| `proposals` | [Proposal](#cosmos.gov.v1beta1.Proposal) | repeated | | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | - + - +### QueryTallyResultRequest +QueryTallyResultRequest is the request type for the Query/Tally RPC method. -### BondStatus -BondStatus is the status of a validator. -| Name | Number | Description | -| ---- | ------ | ----------- | -| BOND_STATUS_UNSPECIFIED | 0 | UNSPECIFIED defines an invalid validator status. | -| BOND_STATUS_UNBONDED | 1 | UNBONDED defines a validator that is not bonded. | -| BOND_STATUS_UNBONDING | 2 | UNBONDING defines a validator that is unbonding. | -| BOND_STATUS_BONDED | 3 | BONDED defines a validator that is bonded. | +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `proposal_id` | [uint64](#uint64) | | proposal_id defines the unique id of the proposal. | - - - + - -

Top

+### QueryTallyResultResponse +QueryTallyResultResponse is the response type for the Query/Tally RPC method. -## cosmos/staking/v1beta1/genesis.proto +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `tally` | [TallyResult](#cosmos.gov.v1beta1.TallyResult) | | tally defines the requested tally. | - -### GenesisState -GenesisState defines the staking module's genesis state. -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#cosmos.staking.v1beta1.Params) | | params defines all the paramaters of related to deposit. | -| `last_total_power` | [bytes](#bytes) | | last_total_power tracks the total amounts of bonded tokens recorded during the previous end block. | -| `last_validator_powers` | [LastValidatorPower](#cosmos.staking.v1beta1.LastValidatorPower) | repeated | last_validator_powers is a special index that provides a historical list of the last-block's bonded validators. | -| `validators` | [Validator](#cosmos.staking.v1beta1.Validator) | repeated | delegations defines the validator set at genesis. | -| `delegations` | [Delegation](#cosmos.staking.v1beta1.Delegation) | repeated | delegations defines the delegations active at genesis. | -| `unbonding_delegations` | [UnbondingDelegation](#cosmos.staking.v1beta1.UnbondingDelegation) | repeated | unbonding_delegations defines the unbonding delegations active at genesis. | -| `redelegations` | [Redelegation](#cosmos.staking.v1beta1.Redelegation) | repeated | redelegations defines the redelegations active at genesis. | -| `exported` | [bool](#bool) | | | + +### QueryVoteRequest +QueryVoteRequest is the request type for the Query/Vote RPC method. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `proposal_id` | [uint64](#uint64) | | proposal_id defines the unique id of the proposal. | +| `voter` | [string](#string) | | voter defines the oter address for the proposals. | - -### LastValidatorPower -LastValidatorPower required for validator set update logic. + + + + + +### QueryVoteResponse +QueryVoteResponse is the response type for the Query/Vote RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `address` | [string](#string) | | address is the address of the validator. | -| `power` | [int64](#int64) | | power defines the power of the validator. | +| `vote` | [Vote](#cosmos.gov.v1beta1.Vote) | | vote defined the queried vote. | - - + - +### QueryVotesRequest +QueryVotesRequest is the request type for the Query/Votes RPC method. - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `proposal_id` | [uint64](#uint64) | | proposal_id defines the unique id of the proposal. | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | - -

Top

-## cosmos/staking/v1beta1/query.proto - + -### QueryDelegationRequest -QueryDelegationRequest is request type for the Query/Delegation RPC method. +### QueryVotesResponse +QueryVotesResponse is the response type for the Query/Votes RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `delegator_addr` | [string](#string) | | delegator_addr defines the delegator address to query for. | -| `validator_addr` | [string](#string) | | validator_addr defines the validator address to query for. | +| `votes` | [Vote](#cosmos.gov.v1beta1.Vote) | repeated | votes defined the queried votes. | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | + - + -### QueryDelegationResponse -QueryDelegationResponse is response type for the Query/Delegation RPC method. + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `delegation_response` | [DelegationResponse](#cosmos.staking.v1beta1.DelegationResponse) | | delegation_responses defines the delegation info of a delegation. | + + +### Query +Query defines the gRPC querier service for gov module +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `Proposal` | [QueryProposalRequest](#cosmos.gov.v1beta1.QueryProposalRequest) | [QueryProposalResponse](#cosmos.gov.v1beta1.QueryProposalResponse) | Proposal queries proposal details based on ProposalID. | GET|/cosmos/gov/v1beta1/proposals/{proposal_id}| +| `Proposals` | [QueryProposalsRequest](#cosmos.gov.v1beta1.QueryProposalsRequest) | [QueryProposalsResponse](#cosmos.gov.v1beta1.QueryProposalsResponse) | Proposals queries all proposals based on given status. | GET|/cosmos/gov/v1beta1/proposals| +| `Vote` | [QueryVoteRequest](#cosmos.gov.v1beta1.QueryVoteRequest) | [QueryVoteResponse](#cosmos.gov.v1beta1.QueryVoteResponse) | Vote queries voted information based on proposalID, voterAddr. | GET|/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}| +| `Votes` | [QueryVotesRequest](#cosmos.gov.v1beta1.QueryVotesRequest) | [QueryVotesResponse](#cosmos.gov.v1beta1.QueryVotesResponse) | Votes queries votes of a given proposal. | GET|/cosmos/gov/v1beta1/proposals/{proposal_id}/votes| +| `Params` | [QueryParamsRequest](#cosmos.gov.v1beta1.QueryParamsRequest) | [QueryParamsResponse](#cosmos.gov.v1beta1.QueryParamsResponse) | Params queries all parameters of the gov module. | GET|/cosmos/gov/v1beta1/params/{params_type}| +| `Deposit` | [QueryDepositRequest](#cosmos.gov.v1beta1.QueryDepositRequest) | [QueryDepositResponse](#cosmos.gov.v1beta1.QueryDepositResponse) | Deposit queries single deposit information based proposalID, depositAddr. | GET|/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}| +| `Deposits` | [QueryDepositsRequest](#cosmos.gov.v1beta1.QueryDepositsRequest) | [QueryDepositsResponse](#cosmos.gov.v1beta1.QueryDepositsResponse) | Deposits queries all deposits of a single proposal. | GET|/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits| +| `TallyResult` | [QueryTallyResultRequest](#cosmos.gov.v1beta1.QueryTallyResultRequest) | [QueryTallyResultResponse](#cosmos.gov.v1beta1.QueryTallyResultResponse) | TallyResult queries the tally of a proposal vote. | GET|/cosmos/gov/v1beta1/proposals/{proposal_id}/tally| + + +

Top

- +## cosmos/gov/v1beta1/tx.proto -### QueryDelegatorDelegationsRequest -QueryDelegatorDelegationsRequest is request type for the -Query/DelegatorDelegations RPC method. -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `delegator_addr` | [string](#string) | | delegator_addr defines the delegator address to query for. | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | + +### MsgDeposit +MsgDeposit defines a message to submit a deposit to an existing proposal. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `proposal_id` | [uint64](#uint64) | | | +| `depositor` | [string](#string) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | - -### QueryDelegatorDelegationsResponse -QueryDelegatorDelegationsResponse is response type for the -Query/DelegatorDelegations RPC method. -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `delegation_responses` | [DelegationResponse](#cosmos.staking.v1beta1.DelegationResponse) | repeated | delegation_responses defines all the delegations' info of a delegator. | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | + + +### MsgDepositResponse +MsgDepositResponse defines the Msg/Deposit response type. - + -### QueryDelegatorUnbondingDelegationsRequest -QueryDelegatorUnbondingDelegationsRequest is request type for the -Query/DelegatorUnbondingDelegations RPC method. +### MsgSubmitProposal +MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary +proposal Content. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `delegator_addr` | [string](#string) | | delegator_addr defines the delegator address to query for. | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | +| `content` | [google.protobuf.Any](#google.protobuf.Any) | | | +| `initial_deposit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | +| `proposer` | [string](#string) | | | - + -### QueryDelegatorUnbondingDelegationsResponse -QueryUnbondingDelegatorDelegationsResponse is response type for the -Query/UnbondingDelegatorDelegations RPC method. +### MsgSubmitProposalResponse +MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `unbonding_responses` | [UnbondingDelegation](#cosmos.staking.v1beta1.UnbondingDelegation) | repeated | | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | +| `proposal_id` | [uint64](#uint64) | | | - + -### QueryDelegatorValidatorRequest -QueryDelegatorValidatorRequest is request type for the -Query/DelegatorValidator RPC method. +### MsgVote +MsgVote defines a message to cast a vote. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `delegator_addr` | [string](#string) | | delegator_addr defines the delegator address to query for. | -| `validator_addr` | [string](#string) | | validator_addr defines the validator address to query for. | +| `proposal_id` | [uint64](#uint64) | | | +| `voter` | [string](#string) | | | +| `option` | [VoteOption](#cosmos.gov.v1beta1.VoteOption) | | | - + + +### MsgVoteResponse +MsgVoteResponse defines the Msg/Vote response type. + + + -### QueryDelegatorValidatorResponse -QueryDelegatorValidatorResponse response type for the -Query/DelegatorValidator RPC method. + + + + +### MsgVoteWeighted +MsgVoteWeighted defines a message to cast a vote. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `validator` | [Validator](#cosmos.staking.v1beta1.Validator) | | validator defines the the validator info. | +| `proposal_id` | [uint64](#uint64) | | | +| `voter` | [string](#string) | | | +| `options` | [WeightedVoteOption](#cosmos.gov.v1beta1.WeightedVoteOption) | repeated | | - + -### QueryDelegatorValidatorsRequest -QueryDelegatorValidatorsRequest is request type for the -Query/DelegatorValidators RPC method. +### MsgVoteWeightedResponse +MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `delegator_addr` | [string](#string) | | delegator_addr defines the delegator address to query for. | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | + + + - -### QueryDelegatorValidatorsResponse -QueryDelegatorValidatorsResponse is response type for the -Query/DelegatorValidators RPC method. + +### Msg +Msg defines the bank Msg service. -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `validators` | [Validator](#cosmos.staking.v1beta1.Validator) | repeated | validators defines the the validators' info of a delegator. | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `SubmitProposal` | [MsgSubmitProposal](#cosmos.gov.v1beta1.MsgSubmitProposal) | [MsgSubmitProposalResponse](#cosmos.gov.v1beta1.MsgSubmitProposalResponse) | SubmitProposal defines a method to create new proposal given a content. | | +| `Vote` | [MsgVote](#cosmos.gov.v1beta1.MsgVote) | [MsgVoteResponse](#cosmos.gov.v1beta1.MsgVoteResponse) | Vote defines a method to add a vote on a specific proposal. | | +| `VoteWeighted` | [MsgVoteWeighted](#cosmos.gov.v1beta1.MsgVoteWeighted) | [MsgVoteWeightedResponse](#cosmos.gov.v1beta1.MsgVoteWeightedResponse) | VoteWeighted defines a method to add a weighted vote on a specific proposal. | | +| `Deposit` | [MsgDeposit](#cosmos.gov.v1beta1.MsgDeposit) | [MsgDepositResponse](#cosmos.gov.v1beta1.MsgDepositResponse) | Deposit defines a method to add deposit on a specific proposal. | | + + +

Top

+## cosmos/mint/v1beta1/mint.proto - -### QueryHistoricalInfoRequest -QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC -method. + + + +### Minter +Minter represents the minting state. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `height` | [int64](#int64) | | height defines at which height to query the historical info. | +| `inflation` | [string](#string) | | current annual inflation rate | +| `annual_provisions` | [string](#string) | | current annual expected provisions | - + -### QueryHistoricalInfoResponse -QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC -method. +### Params +Params holds parameters for the mint module. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `hist` | [HistoricalInfo](#cosmos.staking.v1beta1.HistoricalInfo) | | hist defines the historical info at the given height. | +| `mint_denom` | [string](#string) | | type of coin to mint | +| `inflation_rate_change` | [string](#string) | | maximum annual change in inflation rate | +| `inflation_max` | [string](#string) | | maximum inflation rate | +| `inflation_min` | [string](#string) | | minimum inflation rate | +| `goal_bonded` | [string](#string) | | goal of percent bonded atoms | +| `blocks_per_year` | [uint64](#uint64) | | expected blocks per year | + + + - + + + -### QueryParamsRequest -QueryParamsRequest is request type for the Query/Params RPC method. + +

Top

+## cosmos/mint/v1beta1/genesis.proto - + -### QueryParamsResponse -QueryParamsResponse is response type for the Query/Params RPC method. +### GenesisState +GenesisState defines the mint module's genesis state. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `params` | [Params](#cosmos.staking.v1beta1.Params) | | params holds all the parameters of this module. | +| `minter` | [Minter](#cosmos.mint.v1beta1.Minter) | | minter is a space for holding current inflation information. | +| `params` | [Params](#cosmos.mint.v1beta1.Params) | | params defines all the paramaters of the module. | + - + -### QueryPoolRequest -QueryPoolRequest is request type for the Query/Pool RPC method. + + + +

Top

+## cosmos/mint/v1beta1/query.proto - -### QueryPoolResponse -QueryPoolResponse is response type for the Query/Pool RPC method. + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `pool` | [Pool](#cosmos.staking.v1beta1.Pool) | | pool defines the pool info. | +### QueryAnnualProvisionsRequest +QueryAnnualProvisionsRequest is the request type for the +Query/AnnualProvisions RPC method. - + -### QueryRedelegationsRequest -QueryRedelegationsRequest is request type for the Query/Redelegations RPC -method. +### QueryAnnualProvisionsResponse +QueryAnnualProvisionsResponse is the response type for the +Query/AnnualProvisions RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `delegator_addr` | [string](#string) | | delegator_addr defines the delegator address to query for. | -| `src_validator_addr` | [string](#string) | | src_validator_addr defines the validator address to redelegate from. | -| `dst_validator_addr` | [string](#string) | | dst_validator_addr defines the validator address to redelegate to. | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | - - +| `annual_provisions` | [bytes](#bytes) | | annual_provisions is the current minting annual provisions value. | - -### QueryRedelegationsResponse -QueryRedelegationsResponse is response type for the Query/Redelegations RPC -method. + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `redelegation_responses` | [RedelegationResponse](#cosmos.staking.v1beta1.RedelegationResponse) | repeated | | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | +### QueryInflationRequest +QueryInflationRequest is the request type for the Query/Inflation RPC method. - + -### QueryUnbondingDelegationRequest -QueryUnbondingDelegationRequest is request type for the -Query/UnbondingDelegation RPC method. +### QueryInflationResponse +QueryInflationResponse is the response type for the Query/Inflation RPC +method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `delegator_addr` | [string](#string) | | delegator_addr defines the delegator address to query for. | -| `validator_addr` | [string](#string) | | validator_addr defines the validator address to query for. | - - +| `inflation` | [bytes](#bytes) | | inflation is the current minting inflation value. | - -### QueryUnbondingDelegationResponse -QueryDelegationResponse is response type for the Query/UnbondingDelegation -RPC method. + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `unbond` | [UnbondingDelegation](#cosmos.staking.v1beta1.UnbondingDelegation) | | unbond defines the unbonding information of a delegation. | +### QueryParamsRequest +QueryParamsRequest is the request type for the Query/Params RPC method. - + -### QueryValidatorDelegationsRequest -QueryValidatorDelegationsRequest is request type for the -Query/ValidatorDelegations RPC method +### QueryParamsResponse +QueryParamsResponse is the response type for the Query/Params RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `validator_addr` | [string](#string) | | validator_addr defines the validator address to query for. | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | - - - - - +| `params` | [Params](#cosmos.mint.v1beta1.Params) | | params defines the parameters of the module. | - -### QueryValidatorDelegationsResponse -QueryValidatorDelegationsResponse is response type for the -Query/ValidatorDelegations RPC method -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `delegation_responses` | [DelegationResponse](#cosmos.staking.v1beta1.DelegationResponse) | repeated | | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | + + + + - +### Query +Query provides defines the gRPC querier service. -### QueryValidatorRequest -QueryValidatorRequest is response type for the Query/Validator RPC method +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `Params` | [QueryParamsRequest](#cosmos.mint.v1beta1.QueryParamsRequest) | [QueryParamsResponse](#cosmos.mint.v1beta1.QueryParamsResponse) | Params returns the total set of minting parameters. | GET|/cosmos/mint/v1beta1/params| +| `Inflation` | [QueryInflationRequest](#cosmos.mint.v1beta1.QueryInflationRequest) | [QueryInflationResponse](#cosmos.mint.v1beta1.QueryInflationResponse) | Inflation returns the current minting inflation value. | GET|/cosmos/mint/v1beta1/inflation| +| `AnnualProvisions` | [QueryAnnualProvisionsRequest](#cosmos.mint.v1beta1.QueryAnnualProvisionsRequest) | [QueryAnnualProvisionsResponse](#cosmos.mint.v1beta1.QueryAnnualProvisionsResponse) | AnnualProvisions current minting annual provisions value. | GET|/cosmos/mint/v1beta1/annual_provisions| + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `validator_addr` | [string](#string) | | validator_addr defines the validator address to query for. | + +

Top

+## cosmos/params/v1beta1/params.proto - + -### QueryValidatorResponse -QueryValidatorResponse is response type for the Query/Validator RPC method +### ParamChange +ParamChange defines an individual parameter change, for use in +ParameterChangeProposal. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `validator` | [Validator](#cosmos.staking.v1beta1.Validator) | | validator defines the the validator info. | +| `subspace` | [string](#string) | | | +| `key` | [string](#string) | | | +| `value` | [string](#string) | | | - + -### QueryValidatorUnbondingDelegationsRequest -QueryValidatorUnbondingDelegationsRequest is required type for the -Query/ValidatorUnbondingDelegations RPC method +### ParameterChangeProposal +ParameterChangeProposal defines a proposal to change one or more parameters. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `validator_addr` | [string](#string) | | validator_addr defines the validator address to query for. | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `changes` | [ParamChange](#cosmos.params.v1beta1.ParamChange) | repeated | | + - + -### QueryValidatorUnbondingDelegationsResponse -QueryValidatorUnbondingDelegationsResponse is response type for the -Query/ValidatorUnbondingDelegations RPC method. + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `unbonding_responses` | [UnbondingDelegation](#cosmos.staking.v1beta1.UnbondingDelegation) | repeated | | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | + +

Top

+## cosmos/params/v1beta1/query.proto - + -### QueryValidatorsRequest -QueryValidatorsRequest is request type for Query/Validators RPC method. +### QueryParamsRequest +QueryParamsRequest is request type for the Query/Params RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `status` | [string](#string) | | status enables to query for validators matching a given status. | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | +| `subspace` | [string](#string) | | subspace defines the module to query the parameter for. | +| `key` | [string](#string) | | key defines the key of the parameter in the subspace. | - + -### QueryValidatorsResponse -QueryValidatorsResponse is response type for the Query/Validators RPC method +### QueryParamsResponse +QueryParamsResponse is response type for the Query/Params RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `validators` | [Validator](#cosmos.staking.v1beta1.Validator) | repeated | validators contains all the queried validators. | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | +| `param` | [ParamChange](#cosmos.params.v1beta1.ParamChange) | | param defines the queried parameter. | @@ -6119,775 +6192,783 @@ QueryValidatorsResponse is response type for the Query/Validators RPC method - + ### Query Query defines the gRPC querier service. | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Validators` | [QueryValidatorsRequest](#cosmos.staking.v1beta1.QueryValidatorsRequest) | [QueryValidatorsResponse](#cosmos.staking.v1beta1.QueryValidatorsResponse) | Validators queries all validators that match the given status. | GET|/cosmos/staking/v1beta1/validators| -| `Validator` | [QueryValidatorRequest](#cosmos.staking.v1beta1.QueryValidatorRequest) | [QueryValidatorResponse](#cosmos.staking.v1beta1.QueryValidatorResponse) | Validator queries validator info for given validator address. | GET|/cosmos/staking/v1beta1/validators/{validator_addr}| -| `ValidatorDelegations` | [QueryValidatorDelegationsRequest](#cosmos.staking.v1beta1.QueryValidatorDelegationsRequest) | [QueryValidatorDelegationsResponse](#cosmos.staking.v1beta1.QueryValidatorDelegationsResponse) | ValidatorDelegations queries delegate info for given validator. | GET|/cosmos/staking/v1beta1/validators/{validator_addr}/delegations| -| `ValidatorUnbondingDelegations` | [QueryValidatorUnbondingDelegationsRequest](#cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest) | [QueryValidatorUnbondingDelegationsResponse](#cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse) | ValidatorUnbondingDelegations queries unbonding delegations of a validator. | GET|/cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations| -| `Delegation` | [QueryDelegationRequest](#cosmos.staking.v1beta1.QueryDelegationRequest) | [QueryDelegationResponse](#cosmos.staking.v1beta1.QueryDelegationResponse) | Delegation queries delegate info for given validator delegator pair. | GET|/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}| -| `UnbondingDelegation` | [QueryUnbondingDelegationRequest](#cosmos.staking.v1beta1.QueryUnbondingDelegationRequest) | [QueryUnbondingDelegationResponse](#cosmos.staking.v1beta1.QueryUnbondingDelegationResponse) | UnbondingDelegation queries unbonding info for given validator delegator pair. | GET|/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation| -| `DelegatorDelegations` | [QueryDelegatorDelegationsRequest](#cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest) | [QueryDelegatorDelegationsResponse](#cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse) | DelegatorDelegations queries all delegations of a given delegator address. | GET|/cosmos/staking/v1beta1/delegations/{delegator_addr}| -| `DelegatorUnbondingDelegations` | [QueryDelegatorUnbondingDelegationsRequest](#cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest) | [QueryDelegatorUnbondingDelegationsResponse](#cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse) | DelegatorUnbondingDelegations queries all unbonding delegations of a given delegator address. | GET|/cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations| -| `Redelegations` | [QueryRedelegationsRequest](#cosmos.staking.v1beta1.QueryRedelegationsRequest) | [QueryRedelegationsResponse](#cosmos.staking.v1beta1.QueryRedelegationsResponse) | Redelegations queries redelegations of given address. | GET|/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations| -| `DelegatorValidators` | [QueryDelegatorValidatorsRequest](#cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest) | [QueryDelegatorValidatorsResponse](#cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse) | DelegatorValidators queries all validators info for given delegator address. | GET|/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators| -| `DelegatorValidator` | [QueryDelegatorValidatorRequest](#cosmos.staking.v1beta1.QueryDelegatorValidatorRequest) | [QueryDelegatorValidatorResponse](#cosmos.staking.v1beta1.QueryDelegatorValidatorResponse) | DelegatorValidator queries validator info for given delegator validator pair. | GET|/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}| -| `HistoricalInfo` | [QueryHistoricalInfoRequest](#cosmos.staking.v1beta1.QueryHistoricalInfoRequest) | [QueryHistoricalInfoResponse](#cosmos.staking.v1beta1.QueryHistoricalInfoResponse) | HistoricalInfo queries the historical info for given height. | GET|/cosmos/staking/v1beta1/historical_info/{height}| -| `Pool` | [QueryPoolRequest](#cosmos.staking.v1beta1.QueryPoolRequest) | [QueryPoolResponse](#cosmos.staking.v1beta1.QueryPoolResponse) | Pool queries the pool info. | GET|/cosmos/staking/v1beta1/pool| -| `Params` | [QueryParamsRequest](#cosmos.staking.v1beta1.QueryParamsRequest) | [QueryParamsResponse](#cosmos.staking.v1beta1.QueryParamsResponse) | Parameters queries the staking parameters. | GET|/cosmos/staking/v1beta1/params| +| `Params` | [QueryParamsRequest](#cosmos.params.v1beta1.QueryParamsRequest) | [QueryParamsResponse](#cosmos.params.v1beta1.QueryParamsResponse) | Params queries a specific parameter of a module, given its subspace and key. | GET|/cosmos/params/v1beta1/params| - +

Top

-## cosmos/staking/v1beta1/tx.proto +## cosmos/slashing/v1beta1/slashing.proto - + -### MsgBeginRedelegate -MsgBeginRedelegate defines a SDK message for performing a redelegation -of coins from a delegator and source validator to a destination validator. +### Params +Params represents the parameters used for by the slashing module. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `delegator_address` | [string](#string) | | | -| `validator_src_address` | [string](#string) | | | -| `validator_dst_address` | [string](#string) | | | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `signed_blocks_window` | [int64](#int64) | | | +| `min_signed_per_window` | [bytes](#bytes) | | | +| `downtime_jail_duration` | [google.protobuf.Duration](#google.protobuf.Duration) | | | +| `slash_fraction_double_sign` | [bytes](#bytes) | | | +| `slash_fraction_downtime` | [bytes](#bytes) | | | - + -### MsgBeginRedelegateResponse -MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. +### ValidatorSigningInfo +ValidatorSigningInfo defines a validator's signing info for monitoring their +liveness activity. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `completion_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `address` | [string](#string) | | | +| `start_height` | [int64](#int64) | | Height at which validator was first a candidate OR was unjailed | +| `index_offset` | [int64](#int64) | | 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`. | +| `jailed_until` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | Timestamp until which the validator is jailed due to liveness downtime. | +| `tombstoned` | [bool](#bool) | | 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. | +| `missed_blocks_counter` | [int64](#int64) | | A counter kept to avoid unnecessary array reads. Note that `Sum(MissedBlocksBitArray)` always equals `MissedBlocksCounter`. | + - + -### MsgCreateValidator -MsgCreateValidator defines a SDK message for creating a new validator. + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `description` | [Description](#cosmos.staking.v1beta1.Description) | | | -| `commission` | [CommissionRates](#cosmos.staking.v1beta1.CommissionRates) | | | -| `min_self_delegation` | [string](#string) | | | -| `delegator_address` | [string](#string) | | | -| `validator_address` | [string](#string) | | | -| `pubkey` | [google.protobuf.Any](#google.protobuf.Any) | | | -| `value` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + +

Top

+## cosmos/slashing/v1beta1/genesis.proto - + -### MsgCreateValidatorResponse -MsgCreateValidatorResponse defines the Msg/CreateValidator response type. +### GenesisState +GenesisState defines the slashing module's genesis state. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `params` | [Params](#cosmos.slashing.v1beta1.Params) | | params defines all the paramaters of related to deposit. | +| `signing_infos` | [SigningInfo](#cosmos.slashing.v1beta1.SigningInfo) | repeated | signing_infos represents a map between validator addresses and their signing infos. | +| `missed_blocks` | [ValidatorMissedBlocks](#cosmos.slashing.v1beta1.ValidatorMissedBlocks) | repeated | signing_infos represents a map between validator addresses and their missed blocks. | - + -### MsgDelegate -MsgDelegate defines a SDK message for performing a delegation of coins -from a delegator to a validator. +### MissedBlock +MissedBlock contains height and missed status as boolean. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `delegator_address` | [string](#string) | | | -| `validator_address` | [string](#string) | | | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `index` | [int64](#int64) | | index is the height at which the block was missed. | +| `missed` | [bool](#bool) | | missed is the missed status. | - + -### MsgDelegateResponse -MsgDelegateResponse defines the Msg/Delegate response type. +### SigningInfo +SigningInfo stores validator signing info of corresponding address. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `address` | [string](#string) | | address is the validator address. | +| `validator_signing_info` | [ValidatorSigningInfo](#cosmos.slashing.v1beta1.ValidatorSigningInfo) | | validator_signing_info represents the signing info of this validator. | - -### MsgEditValidator -MsgEditValidator defines a SDK message for editing an existing validator. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `description` | [Description](#cosmos.staking.v1beta1.Description) | | | -| `validator_address` | [string](#string) | | | -| `commission_rate` | [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 | -| `min_self_delegation` | [string](#string) | | | + +### ValidatorMissedBlocks +ValidatorMissedBlocks contains array of missed blocks of corresponding +address. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `address` | [string](#string) | | address is the validator address. | +| `missed_blocks` | [MissedBlock](#cosmos.slashing.v1beta1.MissedBlock) | repeated | missed_blocks is an array of missed blocks by the validator. | - -### MsgEditValidatorResponse -MsgEditValidatorResponse defines the Msg/EditValidator response type. + + + + - -### MsgUndelegate -MsgUndelegate defines a SDK message for performing an undelegation from a -delegate and a validator. + +

Top

-| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `delegator_address` | [string](#string) | | | -| `validator_address` | [string](#string) | | | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +## cosmos/slashing/v1beta1/query.proto + +### QueryParamsRequest +QueryParamsRequest is the request type for the Query/Params RPC method - -### MsgUndelegateResponse -MsgUndelegateResponse defines the Msg/Undelegate response type. -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `completion_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | + +### QueryParamsResponse +QueryParamsResponse is the response type for the Query/Params RPC method +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `params` | [Params](#cosmos.slashing.v1beta1.Params) | | | - - - - -### Msg -Msg defines the staking Msg service. + -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `CreateValidator` | [MsgCreateValidator](#cosmos.staking.v1beta1.MsgCreateValidator) | [MsgCreateValidatorResponse](#cosmos.staking.v1beta1.MsgCreateValidatorResponse) | CreateValidator defines a method for creating a new validator. | | -| `EditValidator` | [MsgEditValidator](#cosmos.staking.v1beta1.MsgEditValidator) | [MsgEditValidatorResponse](#cosmos.staking.v1beta1.MsgEditValidatorResponse) | EditValidator defines a method for editing an existing validator. | | -| `Delegate` | [MsgDelegate](#cosmos.staking.v1beta1.MsgDelegate) | [MsgDelegateResponse](#cosmos.staking.v1beta1.MsgDelegateResponse) | Delegate defines a method for performing a delegation of coins from a delegator to a validator. | | -| `BeginRedelegate` | [MsgBeginRedelegate](#cosmos.staking.v1beta1.MsgBeginRedelegate) | [MsgBeginRedelegateResponse](#cosmos.staking.v1beta1.MsgBeginRedelegateResponse) | BeginRedelegate defines a method for performing a redelegation of coins from a delegator and source validator to a destination validator. | | -| `Undelegate` | [MsgUndelegate](#cosmos.staking.v1beta1.MsgUndelegate) | [MsgUndelegateResponse](#cosmos.staking.v1beta1.MsgUndelegateResponse) | Undelegate defines a method for performing an undelegation from a delegate and a validator. | | +### QuerySigningInfoRequest +QuerySigningInfoRequest is the request type for the Query/SigningInfo RPC +method - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `cons_address` | [string](#string) | | cons_address is the address to query signing info of | - -

Top

-## cosmos/tx/signing/v1beta1/signing.proto - + -### SignatureDescriptor -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. +### QuerySigningInfoResponse +QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC +method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `public_key` | [google.protobuf.Any](#google.protobuf.Any) | | public_key is the public key of the signer | -| `data` | [SignatureDescriptor.Data](#cosmos.tx.signing.v1beta1.SignatureDescriptor.Data) | | | -| `sequence` | [uint64](#uint64) | | 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. | +| `val_signing_info` | [ValidatorSigningInfo](#cosmos.slashing.v1beta1.ValidatorSigningInfo) | | val_signing_info is the signing info of requested val cons address | - + -### SignatureDescriptor.Data -Data represents signature data +### QuerySigningInfosRequest +QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC +method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `single` | [SignatureDescriptor.Data.Single](#cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single) | | single represents a single signer | -| `multi` | [SignatureDescriptor.Data.Multi](#cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi) | | multi represents a multisig signer | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - + -### SignatureDescriptor.Data.Multi -Multi is the signature data for a multisig public key +### QuerySigningInfosResponse +QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC +method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `bitarray` | [cosmos.crypto.multisig.v1beta1.CompactBitArray](#cosmos.crypto.multisig.v1beta1.CompactBitArray) | | bitarray specifies which keys within the multisig are signing | -| `signatures` | [SignatureDescriptor.Data](#cosmos.tx.signing.v1beta1.SignatureDescriptor.Data) | repeated | signatures is the signatures of the multi-signature | +| `info` | [ValidatorSigningInfo](#cosmos.slashing.v1beta1.ValidatorSigningInfo) | repeated | info is the signing info of all validators | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | + - + -### SignatureDescriptor.Data.Single -Single is the signature data for a single signer + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `mode` | [SignMode](#cosmos.tx.signing.v1beta1.SignMode) | | mode is the signing mode of the single signer | -| `signature` | [bytes](#bytes) | | signature is the raw signature bytes | + +### Query +Query provides defines the gRPC querier service +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `Params` | [QueryParamsRequest](#cosmos.slashing.v1beta1.QueryParamsRequest) | [QueryParamsResponse](#cosmos.slashing.v1beta1.QueryParamsResponse) | Params queries the parameters of slashing module | GET|/cosmos/slashing/v1beta1/params| +| `SigningInfo` | [QuerySigningInfoRequest](#cosmos.slashing.v1beta1.QuerySigningInfoRequest) | [QuerySigningInfoResponse](#cosmos.slashing.v1beta1.QuerySigningInfoResponse) | SigningInfo queries the signing info of given cons address | GET|/cosmos/slashing/v1beta1/signing_infos/{cons_address}| +| `SigningInfos` | [QuerySigningInfosRequest](#cosmos.slashing.v1beta1.QuerySigningInfosRequest) | [QuerySigningInfosResponse](#cosmos.slashing.v1beta1.QuerySigningInfosResponse) | SigningInfos queries signing info of all validators | GET|/cosmos/slashing/v1beta1/signing_infos| + - + +

Top

-### SignatureDescriptors -SignatureDescriptors wraps multiple SignatureDescriptor's. +## cosmos/slashing/v1beta1/tx.proto + + + + + +### MsgUnjail +MsgUnjail defines the Msg/Unjail request type | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `signatures` | [SignatureDescriptor](#cosmos.tx.signing.v1beta1.SignatureDescriptor) | repeated | signatures are the signature descriptors | +| `validator_addr` | [string](#string) | | | - + + +### MsgUnjailResponse +MsgUnjailResponse defines the Msg/Unjail response type - -### SignMode -SignMode represents a signing mode with its own security guarantees. -| Name | Number | Description | -| ---- | ------ | ----------- | -| SIGN_MODE_UNSPECIFIED | 0 | SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be rejected | -| SIGN_MODE_DIRECT | 1 | SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is verified with raw bytes from Tx | -| SIGN_MODE_TEXTUAL | 2 | 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 | -| SIGN_MODE_LEGACY_AMINO_JSON | 127 | SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses Amino JSON and will be removed in the future | + + + + + +### Msg +Msg defines the slashing Msg service. + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `Unjail` | [MsgUnjail](#cosmos.slashing.v1beta1.MsgUnjail) | [MsgUnjailResponse](#cosmos.slashing.v1beta1.MsgUnjailResponse) | Unjail defines a method for unjailing a jailed validator, thus returning them into the bonded validator set, so they can begin receiving provisions and rewards again. | | + - +

Top

-## cosmos/tx/v1beta1/tx.proto +## cosmos/staking/v1beta1/authz.proto - + -### AuthInfo -AuthInfo describes the fee and signer modes that are used to sign a -transaction. +### StakeAuthorization +StakeAuthorization defines authorization for delegate/undelegate/redelegate. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `signer_infos` | [SignerInfo](#cosmos.tx.v1beta1.SignerInfo) | repeated | 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. | -| `fee` | [Fee](#cosmos.tx.v1beta1.Fee) | | 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. | +| `max_tokens` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | 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. | +| `allow_list` | [StakeAuthorization.Validators](#cosmos.staking.v1beta1.StakeAuthorization.Validators) | | allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's account. | +| `deny_list` | [StakeAuthorization.Validators](#cosmos.staking.v1beta1.StakeAuthorization.Validators) | | deny_list specifies list of validator addresses to whom grantee can not delegate tokens. | +| `authorization_type` | [AuthorizationType](#cosmos.staking.v1beta1.AuthorizationType) | | authorization_type defines one of AuthorizationType. | - + -### Fee -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. +### StakeAuthorization.Validators +Validators defines list of validator addresses. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | amount is the amount of coins to be paid as a fee | -| `gas_limit` | [uint64](#uint64) | | gas_limit is the maximum gas that can be used in transaction processing before an out of gas error occurs | -| `payer` | [string](#string) | | 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. | -| `granter` | [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 | +| `address` | [string](#string) | repeated | | + - -### ModeInfo -ModeInfo describes the signing mode of a single or nested multisig signer. + +### AuthorizationType +AuthorizationType defines the type of staking module authorization type -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `single` | [ModeInfo.Single](#cosmos.tx.v1beta1.ModeInfo.Single) | | single represents a single signer | -| `multi` | [ModeInfo.Multi](#cosmos.tx.v1beta1.ModeInfo.Multi) | | multi represents a nested multisig signer | +| Name | Number | Description | +| ---- | ------ | ----------- | +| AUTHORIZATION_TYPE_UNSPECIFIED | 0 | AUTHORIZATION_TYPE_UNSPECIFIED specifies an unknown authorization type | +| AUTHORIZATION_TYPE_DELEGATE | 1 | AUTHORIZATION_TYPE_DELEGATE defines an authorization type for Msg/Delegate | +| AUTHORIZATION_TYPE_UNDELEGATE | 2 | AUTHORIZATION_TYPE_UNDELEGATE defines an authorization type for Msg/Undelegate | +| AUTHORIZATION_TYPE_REDELEGATE | 3 | AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for Msg/BeginRedelegate | + + + - -### ModeInfo.Multi -Multi is the mode info for a multisig public key + +

Top

+ +## cosmos/staking/v1beta1/staking.proto + + + + + +### Commission +Commission defines commission parameters for a given validator. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `bitarray` | [cosmos.crypto.multisig.v1beta1.CompactBitArray](#cosmos.crypto.multisig.v1beta1.CompactBitArray) | | bitarray specifies which keys within the multisig are signing | -| `mode_infos` | [ModeInfo](#cosmos.tx.v1beta1.ModeInfo) | repeated | mode_infos is the corresponding modes of the signers of the multisig which could include nested multisig public keys | +| `commission_rates` | [CommissionRates](#cosmos.staking.v1beta1.CommissionRates) | | commission_rates defines the initial commission rates to be used for creating a validator. | +| `update_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | update_time is the last time the commission rate was changed. | - + -### ModeInfo.Single -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 +### CommissionRates +CommissionRates defines the initial commission rates to be used for creating +a validator. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `mode` | [cosmos.tx.signing.v1beta1.SignMode](#cosmos.tx.signing.v1beta1.SignMode) | | mode is the signing mode of the single signer | +| `rate` | [string](#string) | | rate is the commission rate charged to delegators, as a fraction. | +| `max_rate` | [string](#string) | | max_rate defines the maximum commission rate which validator can ever charge, as a fraction. | +| `max_change_rate` | [string](#string) | | max_change_rate defines the maximum daily increase of the validator commission, as a fraction. | - + -### SignDoc -SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT. +### DVPair +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. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `body_bytes` | [bytes](#bytes) | | body_bytes is protobuf serialization of a TxBody that matches the representation in TxRaw. | -| `auth_info_bytes` | [bytes](#bytes) | | auth_info_bytes is a protobuf serialization of an AuthInfo that matches the representation in TxRaw. | -| `chain_id` | [string](#string) | | 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 | -| `account_number` | [uint64](#uint64) | | account_number is the account number of the account in state | +| `delegator_address` | [string](#string) | | | +| `validator_address` | [string](#string) | | | - + -### SignerInfo -SignerInfo describes the public key and signing mode of a single top-level -signer. +### DVPairs +DVPairs defines an array of DVPair objects. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `public_key` | [google.protobuf.Any](#google.protobuf.Any) | | 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. | -| `mode_info` | [ModeInfo](#cosmos.tx.v1beta1.ModeInfo) | | mode_info describes the signing mode of the signer and is a nested structure to support nested multisig pubkey's | -| `sequence` | [uint64](#uint64) | | 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. | +| `pairs` | [DVPair](#cosmos.staking.v1beta1.DVPair) | repeated | | - + -### Tx -Tx is the standard type used for broadcasting transactions. +### DVVTriplet +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. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `body` | [TxBody](#cosmos.tx.v1beta1.TxBody) | | body is the processable content of the transaction | -| `auth_info` | [AuthInfo](#cosmos.tx.v1beta1.AuthInfo) | | auth_info is the authorization related content of the transaction, specifically signers, signer modes and fee | -| `signatures` | [bytes](#bytes) | repeated | 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. | +| `delegator_address` | [string](#string) | | | +| `validator_src_address` | [string](#string) | | | +| `validator_dst_address` | [string](#string) | | | - + -### TxBody -TxBody is the body of a transaction that all signers sign over. +### DVVTriplets +DVVTriplets defines an array of DVVTriplet objects. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `messages` | [google.protobuf.Any](#google.protobuf.Any) | repeated | 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. | -| `memo` | [string](#string) | | memo is any arbitrary memo to be added to the transaction | -| `timeout_height` | [uint64](#uint64) | | timeout is the block height after which this transaction will not be processed by the chain | -| `extension_options` | [google.protobuf.Any](#google.protobuf.Any) | repeated | 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 | -| `non_critical_extension_options` | [google.protobuf.Any](#google.protobuf.Any) | repeated | 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 | +| `triplets` | [DVVTriplet](#cosmos.staking.v1beta1.DVVTriplet) | repeated | | - + -### TxRaw -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. +### Delegation +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. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `body_bytes` | [bytes](#bytes) | | body_bytes is a protobuf serialization of a TxBody that matches the representation in SignDoc. | -| `auth_info_bytes` | [bytes](#bytes) | | auth_info_bytes is a protobuf serialization of an AuthInfo that matches the representation in SignDoc. | -| `signatures` | [bytes](#bytes) | repeated | 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. | +| `delegator_address` | [string](#string) | | delegator_address is the bech32-encoded address of the delegator. | +| `validator_address` | [string](#string) | | validator_address is the bech32-encoded address of the validator. | +| `shares` | [string](#string) | | shares define the delegation shares received. | - - + - +### DelegationResponse +DelegationResponse is equivalent to Delegation except that it contains a +balance in addition to shares which is more suitable for client responses. - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `delegation` | [Delegation](#cosmos.staking.v1beta1.Delegation) | | | +| `balance` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - -

Top

-## cosmos/tx/v1beta1/service.proto - + -### BroadcastTxRequest -BroadcastTxRequest is the request type for the Service.BroadcastTxRequest -RPC method. +### Description +Description defines a validator description. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `tx_bytes` | [bytes](#bytes) | | tx_bytes is the raw transaction. | -| `mode` | [BroadcastMode](#cosmos.tx.v1beta1.BroadcastMode) | | | +| `moniker` | [string](#string) | | moniker defines a human-readable name for the validator. | +| `identity` | [string](#string) | | identity defines an optional identity signature (ex. UPort or Keybase). | +| `website` | [string](#string) | | website defines an optional website link. | +| `security_contact` | [string](#string) | | security_contact defines an optional email for security contact. | +| `details` | [string](#string) | | details define other optional details. | - + -### BroadcastTxResponse -BroadcastTxResponse is the response type for the -Service.BroadcastTx method. +### HistoricalInfo +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). | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `tx_response` | [cosmos.base.abci.v1beta1.TxResponse](#cosmos.base.abci.v1beta1.TxResponse) | | tx_response is the queried TxResponses. | +| `header` | [tendermint.types.Header](#tendermint.types.Header) | | | +| `valset` | [Validator](#cosmos.staking.v1beta1.Validator) | repeated | | - + -### GetTxRequest -GetTxRequest is the request type for the Service.GetTx -RPC method. +### Params +Params defines the parameters for the staking module. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `hash` | [string](#string) | | hash is the tx hash to query, encoded as a hex string. | +| `unbonding_time` | [google.protobuf.Duration](#google.protobuf.Duration) | | unbonding_time is the time duration of unbonding. | +| `max_validators` | [uint32](#uint32) | | max_validators is the maximum number of validators. | +| `max_entries` | [uint32](#uint32) | | max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). | +| `historical_entries` | [uint32](#uint32) | | historical_entries is the number of historical entries to persist. | +| `bond_denom` | [string](#string) | | bond_denom defines the bondable coin denomination. | +| `power_reduction` | [string](#string) | | power_reduction is the amount of staking tokens required for 1 unit of consensus-engine power | - + -### GetTxResponse -GetTxResponse is the response type for the Service.GetTx method. +### Pool +Pool is used for tracking bonded and not-bonded token supply of the bond +denomination. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `tx` | [Tx](#cosmos.tx.v1beta1.Tx) | | tx is the queried transaction. | -| `tx_response` | [cosmos.base.abci.v1beta1.TxResponse](#cosmos.base.abci.v1beta1.TxResponse) | | tx_response is the queried TxResponses. | +| `not_bonded_tokens` | [string](#string) | | | +| `bonded_tokens` | [string](#string) | | | - + -### GetTxsEventRequest -GetTxsEventRequest is the request type for the Service.TxsByEvents -RPC method. +### Redelegation +Redelegation contains the list of a particular delegator's redelegating bonds +from a particular source validator to a particular destination validator. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `events` | [string](#string) | repeated | events is the list of transaction event type. | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an pagination for the request. | -| `order_by` | [OrderBy](#cosmos.tx.v1beta1.OrderBy) | | | +| `delegator_address` | [string](#string) | | delegator_address is the bech32-encoded address of the delegator. | +| `validator_src_address` | [string](#string) | | validator_src_address is the validator redelegation source operator address. | +| `validator_dst_address` | [string](#string) | | validator_dst_address is the validator redelegation destination operator address. | +| `entries` | [RedelegationEntry](#cosmos.staking.v1beta1.RedelegationEntry) | repeated | entries are the redelegation entries. +redelegation entries | - -### GetTxsEventResponse -GetTxsEventResponse is the response type for the Service.TxsByEvents -RPC method. + + +### RedelegationEntry +RedelegationEntry defines a redelegation object with relevant metadata. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `txs` | [Tx](#cosmos.tx.v1beta1.Tx) | repeated | txs is the list of queried transactions. | -| `tx_responses` | [cosmos.base.abci.v1beta1.TxResponse](#cosmos.base.abci.v1beta1.TxResponse) | repeated | tx_responses is the list of queried TxResponses. | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines an pagination for the response. | +| `creation_height` | [int64](#int64) | | creation_height defines the height which the redelegation took place. | +| `completion_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | completion_time defines the unix time for redelegation completion. | +| `initial_balance` | [string](#string) | | initial_balance defines the initial balance when redelegation started. | +| `shares_dst` | [string](#string) | | shares_dst is the amount of destination-validator shares created by redelegation. | - + -### SimulateRequest -SimulateRequest is the request type for the Service.Simulate -RPC method. +### RedelegationEntryResponse +RedelegationEntryResponse is equivalent to a RedelegationEntry except that it +contains a balance in addition to shares which is more suitable for client +responses. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `tx` | [Tx](#cosmos.tx.v1beta1.Tx) | | tx is the transaction to simulate. | +| `redelegation_entry` | [RedelegationEntry](#cosmos.staking.v1beta1.RedelegationEntry) | | | +| `balance` | [string](#string) | | | - + -### SimulateResponse -SimulateResponse is the response type for the -Service.SimulateRPC method. +### RedelegationResponse +RedelegationResponse is equivalent to a Redelegation except that its entries +contain a balance in addition to shares which is more suitable for client +responses. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `gas_info` | [cosmos.base.abci.v1beta1.GasInfo](#cosmos.base.abci.v1beta1.GasInfo) | | gas_info is the information about gas used in the simulation. | -| `result` | [cosmos.base.abci.v1beta1.Result](#cosmos.base.abci.v1beta1.Result) | | result is the result of the simulation. | - - - - +| `redelegation` | [Redelegation](#cosmos.staking.v1beta1.Redelegation) | | | +| `entries` | [RedelegationEntryResponse](#cosmos.staking.v1beta1.RedelegationEntryResponse) | repeated | | - - -### BroadcastMode -BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC method. -| Name | Number | Description | -| ---- | ------ | ----------- | -| BROADCAST_MODE_UNSPECIFIED | 0 | zero-value for mode ordering | -| BROADCAST_MODE_BLOCK | 1 | BROADCAST_MODE_BLOCK defines a tx broadcasting mode where the client waits for the tx to be committed in a block. | -| BROADCAST_MODE_SYNC | 2 | BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for a CheckTx execution response only. | -| BROADCAST_MODE_ASYNC | 3 | BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns immediately. | + +### UnbondingDelegation +UnbondingDelegation stores all of a single delegator's unbonding bonds +for a single validator in an time-ordered list. - -### OrderBy -OrderBy defines the sorting order +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `delegator_address` | [string](#string) | | delegator_address is the bech32-encoded address of the delegator. | +| `validator_address` | [string](#string) | | validator_address is the bech32-encoded address of the validator. | +| `entries` | [UnbondingDelegationEntry](#cosmos.staking.v1beta1.UnbondingDelegationEntry) | repeated | entries are the unbonding delegation entries. -| Name | Number | Description | -| ---- | ------ | ----------- | -| ORDER_BY_UNSPECIFIED | 0 | ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults to ASC in this case. | -| ORDER_BY_ASC | 1 | ORDER_BY_ASC defines ascending order | -| ORDER_BY_DESC | 2 | ORDER_BY_DESC defines descending order | +unbonding delegation entries | - - - -### Service -Service defines a gRPC service for interacting with transactions. + -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Simulate` | [SimulateRequest](#cosmos.tx.v1beta1.SimulateRequest) | [SimulateResponse](#cosmos.tx.v1beta1.SimulateResponse) | Simulate simulates executing a transaction for estimating gas usage. | POST|/cosmos/tx/v1beta1/simulate| -| `GetTx` | [GetTxRequest](#cosmos.tx.v1beta1.GetTxRequest) | [GetTxResponse](#cosmos.tx.v1beta1.GetTxResponse) | GetTx fetches a tx by hash. | GET|/cosmos/tx/v1beta1/txs/{hash}| -| `BroadcastTx` | [BroadcastTxRequest](#cosmos.tx.v1beta1.BroadcastTxRequest) | [BroadcastTxResponse](#cosmos.tx.v1beta1.BroadcastTxResponse) | BroadcastTx broadcast transaction. | POST|/cosmos/tx/v1beta1/txs| -| `GetTxsEvent` | [GetTxsEventRequest](#cosmos.tx.v1beta1.GetTxsEventRequest) | [GetTxsEventResponse](#cosmos.tx.v1beta1.GetTxsEventResponse) | GetTxsEvent fetches txs by event. | GET|/cosmos/tx/v1beta1/txs| +### UnbondingDelegationEntry +UnbondingDelegationEntry defines an unbonding object with relevant metadata. - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `creation_height` | [int64](#int64) | | creation_height is the height which the unbonding took place. | +| `completion_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | completion_time is the unix time for unbonding completion. | +| `initial_balance` | [string](#string) | | initial_balance defines the tokens initially scheduled to receive at completion. | +| `balance` | [string](#string) | | balance defines the tokens to receive at completion. | - -

Top

-## cosmos/upgrade/v1beta1/upgrade.proto - + -### CancelSoftwareUpgradeProposal -CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software -upgrade. +### ValAddresses +ValAddresses defines a repeated set of validator addresses. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | +| `addresses` | [string](#string) | repeated | | - + -### Plan -Plan specifies information about a planned upgrade and when it should occur. +### Validator +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. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `name` | [string](#string) | | 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. | -| `time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | The time after which the upgrade must be performed. Leave set to its zero value to use a pre-defined Height instead. | -| `height` | [int64](#int64) | | The height at which the upgrade must be performed. Only used if Time is not set. | -| `info` | [string](#string) | | Any application specific upgrade info to be included on-chain such as a git commit that validators could automatically upgrade to | -| `upgraded_client_state` | [google.protobuf.Any](#google.protobuf.Any) | | IBC-enabled chains can opt-in to including the upgraded client state in its upgrade plan 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 | +| `operator_address` | [string](#string) | | operator_address defines the address of the validator's operator; bech encoded in JSON. | +| `consensus_pubkey` | [google.protobuf.Any](#google.protobuf.Any) | | consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. | +| `jailed` | [bool](#bool) | | jailed defined whether the validator has been jailed from bonded status or not. | +| `status` | [BondStatus](#cosmos.staking.v1beta1.BondStatus) | | status is the validator status (bonded/unbonding/unbonded). | +| `tokens` | [string](#string) | | tokens define the delegated tokens (incl. self-delegation). | +| `delegator_shares` | [string](#string) | | delegator_shares defines total shares issued to a validator's delegators. | +| `description` | [Description](#cosmos.staking.v1beta1.Description) | | description defines the description terms for the validator. | +| `unbonding_height` | [int64](#int64) | | unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. | +| `unbonding_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. | +| `commission` | [Commission](#cosmos.staking.v1beta1.Commission) | | commission defines the commission parameters. | +| `min_self_delegation` | [string](#string) | | min_self_delegation is the validator's self declared minimum self delegation. | - - - -### SoftwareUpgradeProposal -SoftwareUpgradeProposal is a gov Content type for initiating a software -upgrade. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `plan` | [Plan](#cosmos.upgrade.v1beta1.Plan) | | | + + +### BondStatus +BondStatus is the status of a validator. +| Name | Number | Description | +| ---- | ------ | ----------- | +| BOND_STATUS_UNSPECIFIED | 0 | UNSPECIFIED defines an invalid validator status. | +| BOND_STATUS_UNBONDED | 1 | UNBONDED defines a validator that is not bonded. | +| BOND_STATUS_UNBONDING | 2 | UNBONDING defines a validator that is unbonding. | +| BOND_STATUS_BONDED | 3 | BONDED defines a validator that is bonded. | - @@ -6897,543 +6978,508 @@ upgrade. - +

Top

-## cosmos/upgrade/v1beta1/query.proto +## cosmos/staking/v1beta1/genesis.proto - + -### QueryAppliedPlanRequest -QueryCurrentPlanRequest is the request type for the Query/AppliedPlan RPC -method. +### GenesisState +GenesisState defines the staking module's genesis state. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `name` | [string](#string) | | name is the name of the applied plan to query for. | +| `params` | [Params](#cosmos.staking.v1beta1.Params) | | params defines all the paramaters of related to deposit. | +| `last_total_power` | [bytes](#bytes) | | last_total_power tracks the total amounts of bonded tokens recorded during the previous end block. | +| `last_validator_powers` | [LastValidatorPower](#cosmos.staking.v1beta1.LastValidatorPower) | repeated | last_validator_powers is a special index that provides a historical list of the last-block's bonded validators. | +| `validators` | [Validator](#cosmos.staking.v1beta1.Validator) | repeated | delegations defines the validator set at genesis. | +| `delegations` | [Delegation](#cosmos.staking.v1beta1.Delegation) | repeated | delegations defines the delegations active at genesis. | +| `unbonding_delegations` | [UnbondingDelegation](#cosmos.staking.v1beta1.UnbondingDelegation) | repeated | unbonding_delegations defines the unbonding delegations active at genesis. | +| `redelegations` | [Redelegation](#cosmos.staking.v1beta1.Redelegation) | repeated | redelegations defines the redelegations active at genesis. | +| `exported` | [bool](#bool) | | | - + -### QueryAppliedPlanResponse -QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC -method. +### LastValidatorPower +LastValidatorPower required for validator set update logic. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `height` | [int64](#int64) | | height is the block height at which the plan was applied. | +| `address` | [string](#string) | | address is the address of the validator. | +| `power` | [int64](#int64) | | power defines the power of the validator. | + - + -### QueryCurrentPlanRequest -QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC -method. + + + +

Top

+## cosmos/staking/v1beta1/query.proto - -### QueryCurrentPlanResponse -QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC -method. + + + +### QueryDelegationRequest +QueryDelegationRequest is request type for the Query/Delegation RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `plan` | [Plan](#cosmos.upgrade.v1beta1.Plan) | | plan is the current upgrade plan. | +| `delegator_addr` | [string](#string) | | delegator_addr defines the delegator address to query for. | +| `validator_addr` | [string](#string) | | validator_addr defines the validator address to query for. | - + -### QueryUpgradedConsensusStateRequest -QueryUpgradedConsensusStateRequest is the request type for the Query/UpgradedConsensusState -RPC method. +### QueryDelegationResponse +QueryDelegationResponse is response type for the Query/Delegation RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `last_height` | [int64](#int64) | | last height of the current chain must be sent in request as this is the height under which next consensus state is stored | +| `delegation_response` | [DelegationResponse](#cosmos.staking.v1beta1.DelegationResponse) | | delegation_responses defines the delegation info of a delegation. | - + -### QueryUpgradedConsensusStateResponse -QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState -RPC method. +### QueryDelegatorDelegationsRequest +QueryDelegatorDelegationsRequest is request type for the +Query/DelegatorDelegations RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `upgraded_consensus_state` | [google.protobuf.Any](#google.protobuf.Any) | | | +| `delegator_addr` | [string](#string) | | delegator_addr defines the delegator address to query for. | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | - - + - +### QueryDelegatorDelegationsResponse +QueryDelegatorDelegationsResponse is response type for the +Query/DelegatorDelegations RPC method. - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `delegation_responses` | [DelegationResponse](#cosmos.staking.v1beta1.DelegationResponse) | repeated | delegation_responses defines all the delegations' info of a delegator. | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | -### Query -Query defines the gRPC upgrade querier service. -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `CurrentPlan` | [QueryCurrentPlanRequest](#cosmos.upgrade.v1beta1.QueryCurrentPlanRequest) | [QueryCurrentPlanResponse](#cosmos.upgrade.v1beta1.QueryCurrentPlanResponse) | CurrentPlan queries the current upgrade plan. | GET|/cosmos/upgrade/v1beta1/current_plan| -| `AppliedPlan` | [QueryAppliedPlanRequest](#cosmos.upgrade.v1beta1.QueryAppliedPlanRequest) | [QueryAppliedPlanResponse](#cosmos.upgrade.v1beta1.QueryAppliedPlanResponse) | AppliedPlan queries a previously applied upgrade plan by its name. | GET|/cosmos/upgrade/v1beta1/applied_plan/{name}| -| `UpgradedConsensusState` | [QueryUpgradedConsensusStateRequest](#cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest) | [QueryUpgradedConsensusStateResponse](#cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse) | UpgradedConsensusState queries the consensus state that will serve as a trusted kernel for the next version of this chain. It will only be stored at the last height of this chain. UpgradedConsensusState RPC not supported with legacy querier | GET|/cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}| - - -

Top

+ -## cosmos/vesting/v1beta1/vesting.proto +### QueryDelegatorUnbondingDelegationsRequest +QueryDelegatorUnbondingDelegationsRequest is request type for the +Query/DelegatorUnbondingDelegations RPC method. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `delegator_addr` | [string](#string) | | delegator_addr defines the delegator address to query for. | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | - -### BaseVestingAccount -BaseVestingAccount implements the VestingAccount interface. It contains all -the necessary fields needed for any vesting account implementation. + + + + + + +### QueryDelegatorUnbondingDelegationsResponse +QueryUnbondingDelegatorDelegationsResponse is response type for the +Query/UnbondingDelegatorDelegations RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `base_account` | [cosmos.auth.v1beta1.BaseAccount](#cosmos.auth.v1beta1.BaseAccount) | | | -| `original_vesting` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | -| `delegated_free` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | -| `delegated_vesting` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | -| `end_time` | [int64](#int64) | | | +| `unbonding_responses` | [UnbondingDelegation](#cosmos.staking.v1beta1.UnbondingDelegation) | repeated | | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | - - + - +### QueryDelegatorValidatorRequest +QueryDelegatorValidatorRequest is request type for the +Query/DelegatorValidator RPC method. - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `delegator_addr` | [string](#string) | | delegator_addr defines the delegator address to query for. | +| `validator_addr` | [string](#string) | | validator_addr defines the validator address to query for. | - -

Top

-## ibc/applications/transfer/v1/transfer.proto - + -### DenomTrace -DenomTrace contains the base denomination for ICS20 fungible tokens and the -source tracing information path. +### QueryDelegatorValidatorResponse +QueryDelegatorValidatorResponse response type for the +Query/DelegatorValidator RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `path` | [string](#string) | | path defines the chain of port/channel identifiers used for tracing the source of the fungible token. | -| `base_denom` | [string](#string) | | base denomination of the relayed fungible token. | +| `validator` | [Validator](#cosmos.staking.v1beta1.Validator) | | validator defines the the validator info. | - + -### FungibleTokenPacketData -FungibleTokenPacketData defines a struct for the packet payload -See FungibleTokenPacketData spec: -https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer#data-structures +### QueryDelegatorValidatorsRequest +QueryDelegatorValidatorsRequest is request type for the +Query/DelegatorValidators RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `denom` | [string](#string) | | the token denomination to be transferred | -| `amount` | [uint64](#uint64) | | the token amount to be transferred | -| `sender` | [string](#string) | | the sender address | -| `receiver` | [string](#string) | | the recipient address on the destination chain | +| `delegator_addr` | [string](#string) | | delegator_addr defines the delegator address to query for. | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | - + -### Params -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. +### QueryDelegatorValidatorsResponse +QueryDelegatorValidatorsResponse is response type for the +Query/DelegatorValidators RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `send_enabled` | [bool](#bool) | | send_enabled enables or disables all cross-chain token transfers from this chain. | -| `receive_enabled` | [bool](#bool) | | receive_enabled enables or disables all cross-chain token transfers to this chain. | +| `validators` | [Validator](#cosmos.staking.v1beta1.Validator) | repeated | validators defines the the validators' info of a delegator. | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | - - + - +### QueryHistoricalInfoRequest +QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC +method. - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `height` | [int64](#int64) | | height defines at which height to query the historical info. | - -

Top

-## ibc/applications/transfer/v1/genesis.proto - + -### GenesisState -GenesisState defines the ibc-transfer genesis state +### QueryHistoricalInfoResponse +QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC +method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `port_id` | [string](#string) | | | -| `denom_traces` | [DenomTrace](#ibc.applications.transfer.v1.DenomTrace) | repeated | | -| `params` | [Params](#ibc.applications.transfer.v1.Params) | | | - - +| `hist` | [HistoricalInfo](#cosmos.staking.v1beta1.HistoricalInfo) | | hist defines the historical info at the given height. | - - - - + +### QueryParamsRequest +QueryParamsRequest is request type for the Query/Params RPC method. - -

Top

-## ibc/applications/transfer/v1/query.proto - + -### QueryDenomTraceRequest -QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC -method +### QueryParamsResponse +QueryParamsResponse is response type for the Query/Params RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `hash` | [string](#string) | | hash (in hex format) of the denomination trace information. | +| `params` | [Params](#cosmos.staking.v1beta1.Params) | | params holds all the parameters of this module. | - + -### QueryDenomTraceResponse -QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC -method. +### QueryPoolRequest +QueryPoolRequest is request type for the Query/Pool RPC method. -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `denom_trace` | [DenomTrace](#ibc.applications.transfer.v1.DenomTrace) | | denom_trace returns the requested denomination trace information. | + - - - -### QueryDenomTracesRequest -QueryConnectionsRequest is the request type for the Query/DenomTraces RPC -method +### QueryPoolResponse +QueryPoolResponse is response type for the Query/Pool RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | +| `pool` | [Pool](#cosmos.staking.v1beta1.Pool) | | pool defines the pool info. | - + -### QueryDenomTracesResponse -QueryConnectionsResponse is the response type for the Query/DenomTraces RPC +### QueryRedelegationsRequest +QueryRedelegationsRequest is request type for the Query/Redelegations RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `denom_traces` | [DenomTrace](#ibc.applications.transfer.v1.DenomTrace) | repeated | denom_traces returns all denominations trace information. | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | - - - - - - - - -### QueryParamsRequest -QueryParamsRequest is the request type for the Query/Params RPC method. +| `delegator_addr` | [string](#string) | | delegator_addr defines the delegator address to query for. | +| `src_validator_addr` | [string](#string) | | src_validator_addr defines the validator address to redelegate from. | +| `dst_validator_addr` | [string](#string) | | dst_validator_addr defines the validator address to redelegate to. | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | - + -### QueryParamsResponse -QueryParamsResponse is the response type for the Query/Params RPC method. +### QueryRedelegationsResponse +QueryRedelegationsResponse is response type for the Query/Redelegations RPC +method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `params` | [Params](#ibc.applications.transfer.v1.Params) | | params defines the parameters of the module. | - - - - +| `redelegation_responses` | [RedelegationResponse](#cosmos.staking.v1beta1.RedelegationResponse) | repeated | | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | - - - - -### Query -Query provides defines the gRPC querier service. + -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `DenomTrace` | [QueryDenomTraceRequest](#ibc.applications.transfer.v1.QueryDenomTraceRequest) | [QueryDenomTraceResponse](#ibc.applications.transfer.v1.QueryDenomTraceResponse) | DenomTrace queries a denomination trace information. | GET|/ibc/applications/transfer/v1beta1/denom_traces/{hash}| -| `DenomTraces` | [QueryDenomTracesRequest](#ibc.applications.transfer.v1.QueryDenomTracesRequest) | [QueryDenomTracesResponse](#ibc.applications.transfer.v1.QueryDenomTracesResponse) | DenomTraces queries all denomination traces. | GET|/ibc/applications/transfer/v1beta1/denom_traces| -| `Params` | [QueryParamsRequest](#ibc.applications.transfer.v1.QueryParamsRequest) | [QueryParamsResponse](#ibc.applications.transfer.v1.QueryParamsResponse) | Params queries all parameters of the ibc-transfer module. | GET|/ibc/applications/transfer/v1beta1/params| +### QueryUnbondingDelegationRequest +QueryUnbondingDelegationRequest is request type for the +Query/UnbondingDelegation RPC method. - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `delegator_addr` | [string](#string) | | delegator_addr defines the delegator address to query for. | +| `validator_addr` | [string](#string) | | validator_addr defines the validator address to query for. | - -

Top

-## ibc/core/client/v1/client.proto - + -### ClientConsensusStates -ClientConsensusStates defines all the stored consensus states for a given -client. +### QueryUnbondingDelegationResponse +QueryDelegationResponse is response type for the Query/UnbondingDelegation +RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `client_id` | [string](#string) | | client identifier | -| `consensus_states` | [ConsensusStateWithHeight](#ibc.core.client.v1.ConsensusStateWithHeight) | repeated | consensus states and their heights associated with the client | +| `unbond` | [UnbondingDelegation](#cosmos.staking.v1beta1.UnbondingDelegation) | | unbond defines the unbonding information of a delegation. | - + -### ClientUpdateProposal -ClientUpdateProposal is a governance proposal. If it passes, the client is -updated with the provided header. The update may fail if the header is not -valid given certain conditions specified by the client implementation. +### QueryValidatorDelegationsRequest +QueryValidatorDelegationsRequest is request type for the +Query/ValidatorDelegations RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | the title of the update proposal | -| `description` | [string](#string) | | the description of the proposal | -| `client_id` | [string](#string) | | the client identifier for the client to be updated if the proposal passes | -| `header` | [google.protobuf.Any](#google.protobuf.Any) | | the header used to update the client if the proposal passes | +| `validator_addr` | [string](#string) | | validator_addr defines the validator address to query for. | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | - + -### ConsensusStateWithHeight -ConsensusStateWithHeight defines a consensus state with an additional height field. +### QueryValidatorDelegationsResponse +QueryValidatorDelegationsResponse is response type for the +Query/ValidatorDelegations RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `height` | [Height](#ibc.core.client.v1.Height) | | consensus state height | -| `consensus_state` | [google.protobuf.Any](#google.protobuf.Any) | | consensus state | - +| `delegation_responses` | [DelegationResponse](#cosmos.staking.v1beta1.DelegationResponse) | repeated | | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | - -### Height -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 +### QueryValidatorRequest +QueryValidatorRequest is response type for the Query/Validator RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `revision_number` | [uint64](#uint64) | | the revision that the client is currently on | -| `revision_height` | [uint64](#uint64) | | the height within the given revision | +| `validator_addr` | [string](#string) | | validator_addr defines the validator address to query for. | - + -### IdentifiedClientState -IdentifiedClientState defines a client state with an additional client -identifier field. +### QueryValidatorResponse +QueryValidatorResponse is response type for the Query/Validator RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `client_id` | [string](#string) | | client identifier | -| `client_state` | [google.protobuf.Any](#google.protobuf.Any) | | client state | +| `validator` | [Validator](#cosmos.staking.v1beta1.Validator) | | validator defines the the validator info. | - + -### Params -Params defines the set of IBC light client parameters. +### QueryValidatorUnbondingDelegationsRequest +QueryValidatorUnbondingDelegationsRequest is required type for the +Query/ValidatorUnbondingDelegations RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `allowed_clients` | [string](#string) | repeated | allowed_clients defines the list of allowed client state types. | +| `validator_addr` | [string](#string) | | validator_addr defines the validator address to query for. | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | - - + - +### QueryValidatorUnbondingDelegationsResponse +QueryValidatorUnbondingDelegationsResponse is response type for the +Query/ValidatorUnbondingDelegations RPC method. - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `unbonding_responses` | [UnbondingDelegation](#cosmos.staking.v1beta1.UnbondingDelegation) | repeated | | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | - -

Top

-## ibc/applications/transfer/v1/tx.proto - + -### MsgTransfer -MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between -ICS20 enabled chains. See ICS Spec here: -https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer#data-structures +### QueryValidatorsRequest +QueryValidatorsRequest is request type for Query/Validators RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `source_port` | [string](#string) | | the port on which the packet will be sent | -| `source_channel` | [string](#string) | | the channel by which the packet will be sent | -| `token` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | the tokens to be transferred | -| `sender` | [string](#string) | | the sender address | -| `receiver` | [string](#string) | | the recipient address on the destination chain | -| `timeout_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | Timeout height relative to the current block height. The timeout is disabled when set to 0. | -| `timeout_timestamp` | [uint64](#uint64) | | Timeout timestamp (in nanoseconds) relative to the current block timestamp. The timeout is disabled when set to 0. | +| `status` | [string](#string) | | status enables to query for validators matching a given status. | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | - + -### MsgTransferResponse -MsgTransferResponse defines the Msg/Transfer response type. +### QueryValidatorsResponse +QueryValidatorsResponse is response type for the Query/Validators RPC method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `validators` | [Validator](#cosmos.staking.v1beta1.Validator) | repeated | validators contains all the queried validators. | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | @@ -7446,229 +7492,187 @@ MsgTransferResponse defines the Msg/Transfer response type. - + -### Msg -Msg defines the ibc/transfer Msg service. +### Query +Query defines the gRPC querier service. | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Transfer` | [MsgTransfer](#ibc.applications.transfer.v1.MsgTransfer) | [MsgTransferResponse](#ibc.applications.transfer.v1.MsgTransferResponse) | Transfer defines a rpc handler method for MsgTransfer. | | +| `Validators` | [QueryValidatorsRequest](#cosmos.staking.v1beta1.QueryValidatorsRequest) | [QueryValidatorsResponse](#cosmos.staking.v1beta1.QueryValidatorsResponse) | Validators queries all validators that match the given status. | GET|/cosmos/staking/v1beta1/validators| +| `Validator` | [QueryValidatorRequest](#cosmos.staking.v1beta1.QueryValidatorRequest) | [QueryValidatorResponse](#cosmos.staking.v1beta1.QueryValidatorResponse) | Validator queries validator info for given validator address. | GET|/cosmos/staking/v1beta1/validators/{validator_addr}| +| `ValidatorDelegations` | [QueryValidatorDelegationsRequest](#cosmos.staking.v1beta1.QueryValidatorDelegationsRequest) | [QueryValidatorDelegationsResponse](#cosmos.staking.v1beta1.QueryValidatorDelegationsResponse) | ValidatorDelegations queries delegate info for given validator. | GET|/cosmos/staking/v1beta1/validators/{validator_addr}/delegations| +| `ValidatorUnbondingDelegations` | [QueryValidatorUnbondingDelegationsRequest](#cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest) | [QueryValidatorUnbondingDelegationsResponse](#cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse) | ValidatorUnbondingDelegations queries unbonding delegations of a validator. | GET|/cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations| +| `Delegation` | [QueryDelegationRequest](#cosmos.staking.v1beta1.QueryDelegationRequest) | [QueryDelegationResponse](#cosmos.staking.v1beta1.QueryDelegationResponse) | Delegation queries delegate info for given validator delegator pair. | GET|/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}| +| `UnbondingDelegation` | [QueryUnbondingDelegationRequest](#cosmos.staking.v1beta1.QueryUnbondingDelegationRequest) | [QueryUnbondingDelegationResponse](#cosmos.staking.v1beta1.QueryUnbondingDelegationResponse) | UnbondingDelegation queries unbonding info for given validator delegator pair. | GET|/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation| +| `DelegatorDelegations` | [QueryDelegatorDelegationsRequest](#cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest) | [QueryDelegatorDelegationsResponse](#cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse) | DelegatorDelegations queries all delegations of a given delegator address. | GET|/cosmos/staking/v1beta1/delegations/{delegator_addr}| +| `DelegatorUnbondingDelegations` | [QueryDelegatorUnbondingDelegationsRequest](#cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest) | [QueryDelegatorUnbondingDelegationsResponse](#cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse) | DelegatorUnbondingDelegations queries all unbonding delegations of a given delegator address. | GET|/cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations| +| `Redelegations` | [QueryRedelegationsRequest](#cosmos.staking.v1beta1.QueryRedelegationsRequest) | [QueryRedelegationsResponse](#cosmos.staking.v1beta1.QueryRedelegationsResponse) | Redelegations queries redelegations of given address. | GET|/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations| +| `DelegatorValidators` | [QueryDelegatorValidatorsRequest](#cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest) | [QueryDelegatorValidatorsResponse](#cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse) | DelegatorValidators queries all validators info for given delegator address. | GET|/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators| +| `DelegatorValidator` | [QueryDelegatorValidatorRequest](#cosmos.staking.v1beta1.QueryDelegatorValidatorRequest) | [QueryDelegatorValidatorResponse](#cosmos.staking.v1beta1.QueryDelegatorValidatorResponse) | DelegatorValidator queries validator info for given delegator validator pair. | GET|/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}| +| `HistoricalInfo` | [QueryHistoricalInfoRequest](#cosmos.staking.v1beta1.QueryHistoricalInfoRequest) | [QueryHistoricalInfoResponse](#cosmos.staking.v1beta1.QueryHistoricalInfoResponse) | HistoricalInfo queries the historical info for given height. | GET|/cosmos/staking/v1beta1/historical_info/{height}| +| `Pool` | [QueryPoolRequest](#cosmos.staking.v1beta1.QueryPoolRequest) | [QueryPoolResponse](#cosmos.staking.v1beta1.QueryPoolResponse) | Pool queries the pool info. | GET|/cosmos/staking/v1beta1/pool| +| `Params` | [QueryParamsRequest](#cosmos.staking.v1beta1.QueryParamsRequest) | [QueryParamsResponse](#cosmos.staking.v1beta1.QueryParamsResponse) | Parameters queries the staking parameters. | GET|/cosmos/staking/v1beta1/params| - +

Top

-## ibc/core/channel/v1/channel.proto +## cosmos/staking/v1beta1/tx.proto - + -### Acknowledgement -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: -https://github.com/cosmos/ics/tree/master/spec/ics-004-channel-and-packet-semantics#acknowledgement-envelope +### MsgBeginRedelegate +MsgBeginRedelegate defines a SDK message for performing a redelegation +of coins from a delegator and source validator to a destination validator. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `result` | [bytes](#bytes) | | | -| `error` | [string](#string) | | | +| `delegator_address` | [string](#string) | | | +| `validator_src_address` | [string](#string) | | | +| `validator_dst_address` | [string](#string) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - + -### Channel -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. +### MsgBeginRedelegateResponse +MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `state` | [State](#ibc.core.channel.v1.State) | | current state of the channel end | -| `ordering` | [Order](#ibc.core.channel.v1.Order) | | whether the channel is ordered or unordered | -| `counterparty` | [Counterparty](#ibc.core.channel.v1.Counterparty) | | counterparty channel end | -| `connection_hops` | [string](#string) | repeated | list of connection identifiers, in order, along which packets sent on this channel will travel | -| `version` | [string](#string) | | opaque channel version, which is agreed upon during the handshake | +| `completion_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | - + -### Counterparty -Counterparty defines a channel end counterparty +### MsgCreateValidator +MsgCreateValidator defines a SDK message for creating a new validator. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `port_id` | [string](#string) | | port on the counterparty chain which owns the other end of the channel. | -| `channel_id` | [string](#string) | | channel end on the counterparty chain | +| `description` | [Description](#cosmos.staking.v1beta1.Description) | | | +| `commission` | [CommissionRates](#cosmos.staking.v1beta1.CommissionRates) | | | +| `min_self_delegation` | [string](#string) | | | +| `delegator_address` | [string](#string) | | | +| `validator_address` | [string](#string) | | | +| `pubkey` | [google.protobuf.Any](#google.protobuf.Any) | | | +| `value` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - + -### IdentifiedChannel -IdentifiedChannel defines a channel with additional port and channel -identifier fields. +### MsgCreateValidatorResponse +MsgCreateValidatorResponse defines the Msg/CreateValidator response type. -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `state` | [State](#ibc.core.channel.v1.State) | | current state of the channel end | -| `ordering` | [Order](#ibc.core.channel.v1.Order) | | whether the channel is ordered or unordered | -| `counterparty` | [Counterparty](#ibc.core.channel.v1.Counterparty) | | counterparty channel end | -| `connection_hops` | [string](#string) | repeated | list of connection identifiers, in order, along which packets sent on this channel will travel | -| `version` | [string](#string) | | opaque channel version, which is agreed upon during the handshake | -| `port_id` | [string](#string) | | port identifier | -| `channel_id` | [string](#string) | | channel identifier | - + - - -### Packet -Packet defines a type that carries data across different chains through IBC +### MsgDelegate +MsgDelegate defines a SDK message for performing a delegation of coins +from a delegator to a validator. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `sequence` | [uint64](#uint64) | | 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. | -| `source_port` | [string](#string) | | identifies the port on the sending chain. | -| `source_channel` | [string](#string) | | identifies the channel end on the sending chain. | -| `destination_port` | [string](#string) | | identifies the port on the receiving chain. | -| `destination_channel` | [string](#string) | | identifies the channel end on the receiving chain. | -| `data` | [bytes](#bytes) | | actual opaque bytes transferred directly to the application module | -| `timeout_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | block height after which the packet times out | -| `timeout_timestamp` | [uint64](#uint64) | | block timestamp (in nanoseconds) after which the packet times out | - - - - - +| `delegator_address` | [string](#string) | | | +| `validator_address` | [string](#string) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - -### PacketState -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. -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `port_id` | [string](#string) | | channel port identifier. | -| `channel_id` | [string](#string) | | channel unique identifier. | -| `sequence` | [uint64](#uint64) | | packet sequence. | -| `data` | [bytes](#bytes) | | embedded data that represents packet state. | + +### MsgDelegateResponse +MsgDelegateResponse defines the Msg/Delegate response type. - - -### Order -Order defines if a channel is ORDERED or UNORDERED -| Name | Number | Description | -| ---- | ------ | ----------- | -| ORDER_NONE_UNSPECIFIED | 0 | zero-value for channel ordering | -| ORDER_UNORDERED | 1 | packets can be delivered in any order, which may differ from the order in which they were sent. | -| ORDER_ORDERED | 2 | packets are delivered exactly in the order which they were sent | + +### MsgEditValidator +MsgEditValidator defines a SDK message for editing an existing validator. - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `description` | [Description](#cosmos.staking.v1beta1.Description) | | | +| `validator_address` | [string](#string) | | | +| `commission_rate` | [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 | +| `min_self_delegation` | [string](#string) | | | -### State -State defines if a channel is in one of the following states: -CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. -| Name | Number | Description | -| ---- | ------ | ----------- | -| STATE_UNINITIALIZED_UNSPECIFIED | 0 | Default State | -| STATE_INIT | 1 | A channel has just started the opening handshake. | -| STATE_TRYOPEN | 2 | A channel has acknowledged the handshake step on the counterparty chain. | -| STATE_OPEN | 3 | A channel has completed the handshake. Open channels are ready to send and receive packets. | -| STATE_CLOSED | 4 | A channel has been closed and can no longer be used to send or receive packets. | - - - + +### MsgEditValidatorResponse +MsgEditValidatorResponse defines the Msg/EditValidator response type. - -

Top

-## ibc/core/channel/v1/genesis.proto - + -### GenesisState -GenesisState defines the ibc channel submodule's genesis state. +### MsgUndelegate +MsgUndelegate defines a SDK message for performing an undelegation from a +delegate and a validator. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `channels` | [IdentifiedChannel](#ibc.core.channel.v1.IdentifiedChannel) | repeated | | -| `acknowledgements` | [PacketState](#ibc.core.channel.v1.PacketState) | repeated | | -| `commitments` | [PacketState](#ibc.core.channel.v1.PacketState) | repeated | | -| `receipts` | [PacketState](#ibc.core.channel.v1.PacketState) | repeated | | -| `send_sequences` | [PacketSequence](#ibc.core.channel.v1.PacketSequence) | repeated | | -| `recv_sequences` | [PacketSequence](#ibc.core.channel.v1.PacketSequence) | repeated | | -| `ack_sequences` | [PacketSequence](#ibc.core.channel.v1.PacketSequence) | repeated | | -| `next_channel_sequence` | [uint64](#uint64) | | the sequence for the next generated channel identifier | +| `delegator_address` | [string](#string) | | | +| `validator_address` | [string](#string) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - + -### PacketSequence -PacketSequence defines the genesis type necessary to retrieve and store -next send and receive sequences. +### MsgUndelegateResponse +MsgUndelegateResponse defines the Msg/Undelegate response type. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `port_id` | [string](#string) | | | -| `channel_id` | [string](#string) | | | -| `sequence` | [uint64](#uint64) | | | +| `completion_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | @@ -7680,1077 +7684,1104 @@ next send and receive sequences. + + + +### Msg +Msg defines the staking Msg service. + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `CreateValidator` | [MsgCreateValidator](#cosmos.staking.v1beta1.MsgCreateValidator) | [MsgCreateValidatorResponse](#cosmos.staking.v1beta1.MsgCreateValidatorResponse) | CreateValidator defines a method for creating a new validator. | | +| `EditValidator` | [MsgEditValidator](#cosmos.staking.v1beta1.MsgEditValidator) | [MsgEditValidatorResponse](#cosmos.staking.v1beta1.MsgEditValidatorResponse) | EditValidator defines a method for editing an existing validator. | | +| `Delegate` | [MsgDelegate](#cosmos.staking.v1beta1.MsgDelegate) | [MsgDelegateResponse](#cosmos.staking.v1beta1.MsgDelegateResponse) | Delegate defines a method for performing a delegation of coins from a delegator to a validator. | | +| `BeginRedelegate` | [MsgBeginRedelegate](#cosmos.staking.v1beta1.MsgBeginRedelegate) | [MsgBeginRedelegateResponse](#cosmos.staking.v1beta1.MsgBeginRedelegateResponse) | BeginRedelegate defines a method for performing a redelegation of coins from a delegator and source validator to a destination validator. | | +| `Undelegate` | [MsgUndelegate](#cosmos.staking.v1beta1.MsgUndelegate) | [MsgUndelegateResponse](#cosmos.staking.v1beta1.MsgUndelegateResponse) | Undelegate defines a method for performing an undelegation from a delegate and a validator. | | + - +

Top

-## ibc/core/channel/v1/query.proto +## cosmos/tx/signing/v1beta1/signing.proto - + -### QueryChannelClientStateRequest -QueryChannelClientStateRequest is the request type for the Query/ClientState -RPC method +### SignatureDescriptor +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. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `port_id` | [string](#string) | | port unique identifier | -| `channel_id` | [string](#string) | | channel unique identifier | +| `public_key` | [google.protobuf.Any](#google.protobuf.Any) | | public_key is the public key of the signer | +| `data` | [SignatureDescriptor.Data](#cosmos.tx.signing.v1beta1.SignatureDescriptor.Data) | | | +| `sequence` | [uint64](#uint64) | | 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. | - + -### QueryChannelClientStateResponse -QueryChannelClientStateResponse is the Response type for the -Query/QueryChannelClientState RPC method +### SignatureDescriptor.Data +Data represents signature data | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `identified_client_state` | [ibc.core.client.v1.IdentifiedClientState](#ibc.core.client.v1.IdentifiedClientState) | | client state associated with the channel | -| `proof` | [bytes](#bytes) | | merkle proof of existence | -| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | height at which the proof was retrieved | +| `single` | [SignatureDescriptor.Data.Single](#cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single) | | single represents a single signer | +| `multi` | [SignatureDescriptor.Data.Multi](#cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi) | | multi represents a multisig signer | - + -### QueryChannelConsensusStateRequest -QueryChannelConsensusStateRequest is the request type for the -Query/ConsensusState RPC method +### SignatureDescriptor.Data.Multi +Multi is the signature data for a multisig public key | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `port_id` | [string](#string) | | port unique identifier | -| `channel_id` | [string](#string) | | channel unique identifier | -| `revision_number` | [uint64](#uint64) | | revision number of the consensus state | -| `revision_height` | [uint64](#uint64) | | revision height of the consensus state | +| `bitarray` | [cosmos.crypto.multisig.v1beta1.CompactBitArray](#cosmos.crypto.multisig.v1beta1.CompactBitArray) | | bitarray specifies which keys within the multisig are signing | +| `signatures` | [SignatureDescriptor.Data](#cosmos.tx.signing.v1beta1.SignatureDescriptor.Data) | repeated | signatures is the signatures of the multi-signature | - + -### QueryChannelConsensusStateResponse -QueryChannelClientStateResponse is the Response type for the -Query/QueryChannelClientState RPC method +### SignatureDescriptor.Data.Single +Single is the signature data for a single signer | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `consensus_state` | [google.protobuf.Any](#google.protobuf.Any) | | consensus state associated with the channel | -| `client_id` | [string](#string) | | client ID associated with the consensus state | -| `proof` | [bytes](#bytes) | | merkle proof of existence | -| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | height at which the proof was retrieved | +| `mode` | [SignMode](#cosmos.tx.signing.v1beta1.SignMode) | | mode is the signing mode of the single signer | +| `signature` | [bytes](#bytes) | | signature is the raw signature bytes | - + -### QueryChannelRequest -QueryChannelRequest is the request type for the Query/Channel RPC method +### SignatureDescriptors +SignatureDescriptors wraps multiple SignatureDescriptor's. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `port_id` | [string](#string) | | port unique identifier | -| `channel_id` | [string](#string) | | channel unique identifier | +| `signatures` | [SignatureDescriptor](#cosmos.tx.signing.v1beta1.SignatureDescriptor) | repeated | signatures are the signature descriptors | + - -### QueryChannelResponse -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. + +### SignMode +SignMode represents a signing mode with its own security guarantees. -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `channel` | [Channel](#ibc.core.channel.v1.Channel) | | channel associated with the request identifiers | -| `proof` | [bytes](#bytes) | | merkle proof of existence | -| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | height at which the proof was retrieved | +| Name | Number | Description | +| ---- | ------ | ----------- | +| SIGN_MODE_UNSPECIFIED | 0 | SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be rejected | +| SIGN_MODE_DIRECT | 1 | SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is verified with raw bytes from Tx | +| SIGN_MODE_TEXTUAL | 2 | 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 | +| SIGN_MODE_LEGACY_AMINO_JSON | 127 | SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses Amino JSON and will be removed in the future | + + + + - + +

Top

-### QueryChannelsRequest -QueryChannelsRequest is the request type for the Query/Channels RPC method +## cosmos/tx/v1beta1/tx.proto + + + + + +### AuthInfo +AuthInfo describes the fee and signer modes that are used to sign a +transaction. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination request | +| `signer_infos` | [SignerInfo](#cosmos.tx.v1beta1.SignerInfo) | repeated | 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. | +| `fee` | [Fee](#cosmos.tx.v1beta1.Fee) | | 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. | - + -### QueryChannelsResponse -QueryChannelsResponse is the response type for the Query/Channels RPC method. +### Fee +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. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `channels` | [IdentifiedChannel](#ibc.core.channel.v1.IdentifiedChannel) | repeated | list of stored channels of the chain. | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination response | -| `height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | query block height | - +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | amount is the amount of coins to be paid as a fee | +| `gas_limit` | [uint64](#uint64) | | gas_limit is the maximum gas that can be used in transaction processing before an out of gas error occurs | +| `payer` | [string](#string) | | 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. | +| `granter` | [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 | - -### QueryConnectionChannelsRequest -QueryConnectionChannelsRequest is the request type for the -Query/QueryConnectionChannels RPC method + + +### ModeInfo +ModeInfo describes the signing mode of a single or nested multisig signer. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `connection` | [string](#string) | | connection unique identifier | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination request | +| `single` | [ModeInfo.Single](#cosmos.tx.v1beta1.ModeInfo.Single) | | single represents a single signer | +| `multi` | [ModeInfo.Multi](#cosmos.tx.v1beta1.ModeInfo.Multi) | | multi represents a nested multisig signer | - + -### QueryConnectionChannelsResponse -QueryConnectionChannelsResponse is the Response type for the -Query/QueryConnectionChannels RPC method +### ModeInfo.Multi +Multi is the mode info for a multisig public key | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `channels` | [IdentifiedChannel](#ibc.core.channel.v1.IdentifiedChannel) | repeated | list of channels associated with a connection. | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination response | -| `height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | query block height | +| `bitarray` | [cosmos.crypto.multisig.v1beta1.CompactBitArray](#cosmos.crypto.multisig.v1beta1.CompactBitArray) | | bitarray specifies which keys within the multisig are signing | +| `mode_infos` | [ModeInfo](#cosmos.tx.v1beta1.ModeInfo) | repeated | mode_infos is the corresponding modes of the signers of the multisig which could include nested multisig public keys | - + -### QueryNextSequenceReceiveRequest -QueryNextSequenceReceiveRequest is the request type for the -Query/QueryNextSequenceReceiveRequest RPC method +### ModeInfo.Single +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 | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `port_id` | [string](#string) | | port unique identifier | -| `channel_id` | [string](#string) | | channel unique identifier | +| `mode` | [cosmos.tx.signing.v1beta1.SignMode](#cosmos.tx.signing.v1beta1.SignMode) | | mode is the signing mode of the single signer | - + -### QueryNextSequenceReceiveResponse -QuerySequenceResponse is the request type for the -Query/QueryNextSequenceReceiveResponse RPC method +### SignDoc +SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `next_sequence_receive` | [uint64](#uint64) | | next sequence receive number | -| `proof` | [bytes](#bytes) | | merkle proof of existence | -| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | height at which the proof was retrieved | +| `body_bytes` | [bytes](#bytes) | | body_bytes is protobuf serialization of a TxBody that matches the representation in TxRaw. | +| `auth_info_bytes` | [bytes](#bytes) | | auth_info_bytes is a protobuf serialization of an AuthInfo that matches the representation in TxRaw. | +| `chain_id` | [string](#string) | | 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 | +| `account_number` | [uint64](#uint64) | | account_number is the account number of the account in state | - + -### QueryPacketAcknowledgementRequest -QueryPacketAcknowledgementRequest is the request type for the -Query/PacketAcknowledgement RPC method +### SignerInfo +SignerInfo describes the public key and signing mode of a single top-level +signer. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `port_id` | [string](#string) | | port unique identifier | -| `channel_id` | [string](#string) | | channel unique identifier | -| `sequence` | [uint64](#uint64) | | packet sequence | +| `public_key` | [google.protobuf.Any](#google.protobuf.Any) | | 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. | +| `mode_info` | [ModeInfo](#cosmos.tx.v1beta1.ModeInfo) | | mode_info describes the signing mode of the signer and is a nested structure to support nested multisig pubkey's | +| `sequence` | [uint64](#uint64) | | 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. | - + -### QueryPacketAcknowledgementResponse -QueryPacketAcknowledgementResponse defines the client query response for a -packet which also includes a proof and the height from which the -proof was retrieved +### Tx +Tx is the standard type used for broadcasting transactions. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `acknowledgement` | [bytes](#bytes) | | packet associated with the request fields | -| `proof` | [bytes](#bytes) | | merkle proof of existence | -| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | height at which the proof was retrieved | +| `body` | [TxBody](#cosmos.tx.v1beta1.TxBody) | | body is the processable content of the transaction | +| `auth_info` | [AuthInfo](#cosmos.tx.v1beta1.AuthInfo) | | auth_info is the authorization related content of the transaction, specifically signers, signer modes and fee | +| `signatures` | [bytes](#bytes) | repeated | 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. | - + -### QueryPacketAcknowledgementsRequest -QueryPacketAcknowledgementsRequest is the request type for the -Query/QueryPacketCommitments RPC method +### TxBody +TxBody is the body of a transaction that all signers sign over. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `port_id` | [string](#string) | | port unique identifier | -| `channel_id` | [string](#string) | | channel unique identifier | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination request | +| `messages` | [google.protobuf.Any](#google.protobuf.Any) | repeated | 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. | +| `memo` | [string](#string) | | 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 https://github.com/cosmos/cosmos-sdk/issues/9122). | +| `timeout_height` | [uint64](#uint64) | | timeout is the block height after which this transaction will not be processed by the chain | +| `extension_options` | [google.protobuf.Any](#google.protobuf.Any) | repeated | 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 | +| `non_critical_extension_options` | [google.protobuf.Any](#google.protobuf.Any) | repeated | 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 | - + -### QueryPacketAcknowledgementsResponse -QueryPacketAcknowledgemetsResponse is the request type for the -Query/QueryPacketAcknowledgements RPC method +### TxRaw +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. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `acknowledgements` | [PacketState](#ibc.core.channel.v1.PacketState) | repeated | | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination response | -| `height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | query block height | +| `body_bytes` | [bytes](#bytes) | | body_bytes is a protobuf serialization of a TxBody that matches the representation in SignDoc. | +| `auth_info_bytes` | [bytes](#bytes) | | auth_info_bytes is a protobuf serialization of an AuthInfo that matches the representation in SignDoc. | +| `signatures` | [bytes](#bytes) | repeated | 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. | + - + -### QueryPacketCommitmentRequest -QueryPacketCommitmentRequest is the request type for the -Query/PacketCommitment RPC method + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `port_id` | [string](#string) | | port unique identifier | -| `channel_id` | [string](#string) | | channel unique identifier | -| `sequence` | [uint64](#uint64) | | packet sequence | + +

Top

+## cosmos/tx/v1beta1/service.proto - + -### QueryPacketCommitmentResponse -QueryPacketCommitmentResponse defines the client query response for a packet -which also includes a proof and the height from which the proof was -retrieved +### BroadcastTxRequest +BroadcastTxRequest is the request type for the Service.BroadcastTxRequest +RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `commitment` | [bytes](#bytes) | | packet associated with the request fields | -| `proof` | [bytes](#bytes) | | merkle proof of existence | -| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | height at which the proof was retrieved | +| `tx_bytes` | [bytes](#bytes) | | tx_bytes is the raw transaction. | +| `mode` | [BroadcastMode](#cosmos.tx.v1beta1.BroadcastMode) | | | - + -### QueryPacketCommitmentsRequest -QueryPacketCommitmentsRequest is the request type for the -Query/QueryPacketCommitments RPC method +### BroadcastTxResponse +BroadcastTxResponse is the response type for the +Service.BroadcastTx method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `port_id` | [string](#string) | | port unique identifier | -| `channel_id` | [string](#string) | | channel unique identifier | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination request | +| `tx_response` | [cosmos.base.abci.v1beta1.TxResponse](#cosmos.base.abci.v1beta1.TxResponse) | | tx_response is the queried TxResponses. | - + -### QueryPacketCommitmentsResponse -QueryPacketCommitmentsResponse is the request type for the -Query/QueryPacketCommitments RPC method +### GetTxRequest +GetTxRequest is the request type for the Service.GetTx +RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `commitments` | [PacketState](#ibc.core.channel.v1.PacketState) | repeated | | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination response | -| `height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | query block height | +| `hash` | [string](#string) | | hash is the tx hash to query, encoded as a hex string. | - + -### QueryPacketReceiptRequest -QueryPacketReceiptRequest is the request type for the -Query/PacketReceipt RPC method +### GetTxResponse +GetTxResponse is the response type for the Service.GetTx method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `port_id` | [string](#string) | | port unique identifier | -| `channel_id` | [string](#string) | | channel unique identifier | -| `sequence` | [uint64](#uint64) | | packet sequence | +| `tx` | [Tx](#cosmos.tx.v1beta1.Tx) | | tx is the queried transaction. | +| `tx_response` | [cosmos.base.abci.v1beta1.TxResponse](#cosmos.base.abci.v1beta1.TxResponse) | | tx_response is the queried TxResponses. | - + -### QueryPacketReceiptResponse -QueryPacketReceiptResponse defines the client query response for a packet receipt -which also includes a proof, and the height from which the proof was -retrieved +### GetTxsEventRequest +GetTxsEventRequest is the request type for the Service.TxsByEvents +RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `received` | [bool](#bool) | | success flag for if receipt exists | -| `proof` | [bytes](#bytes) | | merkle proof of existence | -| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | height at which the proof was retrieved | +| `events` | [string](#string) | repeated | events is the list of transaction event type. | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an pagination for the request. | +| `order_by` | [OrderBy](#cosmos.tx.v1beta1.OrderBy) | | | - + -### QueryUnreceivedAcksRequest -QueryUnreceivedAcks is the request type for the -Query/UnreceivedAcks RPC method +### GetTxsEventResponse +GetTxsEventResponse is the response type for the Service.TxsByEvents +RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `port_id` | [string](#string) | | port unique identifier | -| `channel_id` | [string](#string) | | channel unique identifier | -| `packet_ack_sequences` | [uint64](#uint64) | repeated | list of acknowledgement sequences | +| `txs` | [Tx](#cosmos.tx.v1beta1.Tx) | repeated | txs is the list of queried transactions. | +| `tx_responses` | [cosmos.base.abci.v1beta1.TxResponse](#cosmos.base.abci.v1beta1.TxResponse) | repeated | tx_responses is the list of queried TxResponses. | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines an pagination for the response. | - + -### QueryUnreceivedAcksResponse -QueryUnreceivedAcksResponse is the response type for the -Query/UnreceivedAcks RPC method +### SimulateRequest +SimulateRequest is the request type for the Service.Simulate +RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `sequences` | [uint64](#uint64) | repeated | list of unreceived acknowledgement sequences | -| `height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | query block height | +| `tx` | [Tx](#cosmos.tx.v1beta1.Tx) | | **Deprecated.** tx is the transaction to simulate. Deprecated. Send raw tx bytes instead. | +| `tx_bytes` | [bytes](#bytes) | | tx_bytes is the raw transaction. | - + -### QueryUnreceivedPacketsRequest -QueryUnreceivedPacketsRequest is the request type for the -Query/UnreceivedPackets RPC method +### SimulateResponse +SimulateResponse is the response type for the +Service.SimulateRPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `port_id` | [string](#string) | | port unique identifier | -| `channel_id` | [string](#string) | | channel unique identifier | -| `packet_commitment_sequences` | [uint64](#uint64) | repeated | list of packet sequences | +| `gas_info` | [cosmos.base.abci.v1beta1.GasInfo](#cosmos.base.abci.v1beta1.GasInfo) | | gas_info is the information about gas used in the simulation. | +| `result` | [cosmos.base.abci.v1beta1.Result](#cosmos.base.abci.v1beta1.Result) | | result is the result of the simulation. | + - -### QueryUnreceivedPacketsResponse -QueryUnreceivedPacketsResponse is the response type for the -Query/UnreceivedPacketCommitments RPC method + +### BroadcastMode +BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC method. + +| Name | Number | Description | +| ---- | ------ | ----------- | +| BROADCAST_MODE_UNSPECIFIED | 0 | zero-value for mode ordering | +| BROADCAST_MODE_BLOCK | 1 | BROADCAST_MODE_BLOCK defines a tx broadcasting mode where the client waits for the tx to be committed in a block. | +| BROADCAST_MODE_SYNC | 2 | BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for a CheckTx execution response only. | +| BROADCAST_MODE_ASYNC | 3 | BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns immediately. | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sequences` | [uint64](#uint64) | repeated | list of unreceived packet sequences | -| `height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | query block height | + +### OrderBy +OrderBy defines the sorting order +| Name | Number | Description | +| ---- | ------ | ----------- | +| ORDER_BY_UNSPECIFIED | 0 | ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults to ASC in this case. | +| ORDER_BY_ASC | 1 | ORDER_BY_ASC defines ascending order | +| ORDER_BY_DESC | 2 | ORDER_BY_DESC defines descending order | - - + -### Query -Query provides defines the gRPC querier service +### Service +Service defines a gRPC service for interacting with transactions. | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Channel` | [QueryChannelRequest](#ibc.core.channel.v1.QueryChannelRequest) | [QueryChannelResponse](#ibc.core.channel.v1.QueryChannelResponse) | Channel queries an IBC Channel. | GET|/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}| -| `Channels` | [QueryChannelsRequest](#ibc.core.channel.v1.QueryChannelsRequest) | [QueryChannelsResponse](#ibc.core.channel.v1.QueryChannelsResponse) | Channels queries all the IBC channels of a chain. | GET|/ibc/core/channel/v1beta1/channels| -| `ConnectionChannels` | [QueryConnectionChannelsRequest](#ibc.core.channel.v1.QueryConnectionChannelsRequest) | [QueryConnectionChannelsResponse](#ibc.core.channel.v1.QueryConnectionChannelsResponse) | ConnectionChannels queries all the channels associated with a connection end. | GET|/ibc/core/channel/v1beta1/connections/{connection}/channels| -| `ChannelClientState` | [QueryChannelClientStateRequest](#ibc.core.channel.v1.QueryChannelClientStateRequest) | [QueryChannelClientStateResponse](#ibc.core.channel.v1.QueryChannelClientStateResponse) | ChannelClientState queries for the client state for the channel associated with the provided channel identifiers. | GET|/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/client_state| -| `ChannelConsensusState` | [QueryChannelConsensusStateRequest](#ibc.core.channel.v1.QueryChannelConsensusStateRequest) | [QueryChannelConsensusStateResponse](#ibc.core.channel.v1.QueryChannelConsensusStateResponse) | ChannelConsensusState queries for the consensus state for the channel associated with the provided channel identifiers. | GET|/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/consensus_state/revision/{revision_number}/height/{revision_height}| -| `PacketCommitment` | [QueryPacketCommitmentRequest](#ibc.core.channel.v1.QueryPacketCommitmentRequest) | [QueryPacketCommitmentResponse](#ibc.core.channel.v1.QueryPacketCommitmentResponse) | PacketCommitment queries a stored packet commitment hash. | GET|/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence}| -| `PacketCommitments` | [QueryPacketCommitmentsRequest](#ibc.core.channel.v1.QueryPacketCommitmentsRequest) | [QueryPacketCommitmentsResponse](#ibc.core.channel.v1.QueryPacketCommitmentsResponse) | PacketCommitments returns all the packet commitments hashes associated with a channel. | GET|/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments| -| `PacketReceipt` | [QueryPacketReceiptRequest](#ibc.core.channel.v1.QueryPacketReceiptRequest) | [QueryPacketReceiptResponse](#ibc.core.channel.v1.QueryPacketReceiptResponse) | PacketReceipt queries if a given packet sequence has been received on the queried chain | GET|/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_receipts/{sequence}| -| `PacketAcknowledgement` | [QueryPacketAcknowledgementRequest](#ibc.core.channel.v1.QueryPacketAcknowledgementRequest) | [QueryPacketAcknowledgementResponse](#ibc.core.channel.v1.QueryPacketAcknowledgementResponse) | PacketAcknowledgement queries a stored packet acknowledgement hash. | GET|/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence}| -| `PacketAcknowledgements` | [QueryPacketAcknowledgementsRequest](#ibc.core.channel.v1.QueryPacketAcknowledgementsRequest) | [QueryPacketAcknowledgementsResponse](#ibc.core.channel.v1.QueryPacketAcknowledgementsResponse) | PacketAcknowledgements returns all the packet acknowledgements associated with a channel. | GET|/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acknowledgements| -| `UnreceivedPackets` | [QueryUnreceivedPacketsRequest](#ibc.core.channel.v1.QueryUnreceivedPacketsRequest) | [QueryUnreceivedPacketsResponse](#ibc.core.channel.v1.QueryUnreceivedPacketsResponse) | UnreceivedPackets returns all the unreceived IBC packets associated with a channel and sequences. | GET|/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_commitment_sequences}/unreceived_packets| -| `UnreceivedAcks` | [QueryUnreceivedAcksRequest](#ibc.core.channel.v1.QueryUnreceivedAcksRequest) | [QueryUnreceivedAcksResponse](#ibc.core.channel.v1.QueryUnreceivedAcksResponse) | UnreceivedAcks returns all the unreceived IBC acknowledgements associated with a channel and sequences. | GET|/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_ack_sequences}/unreceived_acks| -| `NextSequenceReceive` | [QueryNextSequenceReceiveRequest](#ibc.core.channel.v1.QueryNextSequenceReceiveRequest) | [QueryNextSequenceReceiveResponse](#ibc.core.channel.v1.QueryNextSequenceReceiveResponse) | NextSequenceReceive returns the next receive sequence for a given channel. | GET|/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/next_sequence| - +| `Simulate` | [SimulateRequest](#cosmos.tx.v1beta1.SimulateRequest) | [SimulateResponse](#cosmos.tx.v1beta1.SimulateResponse) | Simulate simulates executing a transaction for estimating gas usage. | POST|/cosmos/tx/v1beta1/simulate| +| `GetTx` | [GetTxRequest](#cosmos.tx.v1beta1.GetTxRequest) | [GetTxResponse](#cosmos.tx.v1beta1.GetTxResponse) | GetTx fetches a tx by hash. | GET|/cosmos/tx/v1beta1/txs/{hash}| +| `BroadcastTx` | [BroadcastTxRequest](#cosmos.tx.v1beta1.BroadcastTxRequest) | [BroadcastTxResponse](#cosmos.tx.v1beta1.BroadcastTxResponse) | BroadcastTx broadcast transaction. | POST|/cosmos/tx/v1beta1/txs| +| `GetTxsEvent` | [GetTxsEventRequest](#cosmos.tx.v1beta1.GetTxsEventRequest) | [GetTxsEventResponse](#cosmos.tx.v1beta1.GetTxsEventResponse) | GetTxsEvent fetches txs by event. | GET|/cosmos/tx/v1beta1/txs| + - +

Top

-## ibc/core/channel/v1/tx.proto +## cosmos/upgrade/v1beta1/upgrade.proto - + -### MsgAcknowledgement -MsgAcknowledgement receives incoming IBC acknowledgement +### CancelSoftwareUpgradeProposal +CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software +upgrade. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `packet` | [Packet](#ibc.core.channel.v1.Packet) | | | -| `acknowledgement` | [bytes](#bytes) | | | -| `proof_acked` | [bytes](#bytes) | | | -| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | | -| `signer` | [string](#string) | | | - - - +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | - -### MsgAcknowledgementResponse -MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. + +### Plan +Plan specifies information about a planned upgrade and when it should occur. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `name` | [string](#string) | | 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. | +| `height` | [int64](#int64) | | The height at which the upgrade must be performed. Only used if Time is not set. | +| `info` | [string](#string) | | Any application specific upgrade info to be included on-chain such as a git commit that validators could automatically upgrade to | - -### MsgChannelCloseConfirm -MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B -to acknowledge the change of channel state to CLOSED on Chain A. -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `port_id` | [string](#string) | | | -| `channel_id` | [string](#string) | | | -| `proof_init` | [bytes](#bytes) | | | -| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | | -| `signer` | [string](#string) | | | + +### SoftwareUpgradeProposal +SoftwareUpgradeProposal is a gov Content type for initiating a software +upgrade. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `plan` | [Plan](#cosmos.upgrade.v1beta1.Plan) | | | - -### MsgChannelCloseConfirmResponse -MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm response type. + + + - + -### MsgChannelCloseInit -MsgChannelCloseInit defines a msg sent by a Relayer to Chain A -to close a channel with Chain B. -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `port_id` | [string](#string) | | | -| `channel_id` | [string](#string) | | | -| `signer` | [string](#string) | | | + +

Top

+## cosmos/upgrade/v1beta1/query.proto + +### QueryAppliedPlanRequest +QueryCurrentPlanRequest is the request type for the Query/AppliedPlan RPC +method. - -### MsgChannelCloseInitResponse -MsgChannelCloseInitResponse defines the Msg/ChannelCloseInit response type. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `name` | [string](#string) | | name is the name of the applied plan to query for. | - + -### MsgChannelOpenAck -MsgChannelOpenAck defines a msg sent by a Relayer to Chain A to acknowledge -the change of channel state to TRYOPEN on Chain B. +### QueryAppliedPlanResponse +QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC +method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `port_id` | [string](#string) | | | -| `channel_id` | [string](#string) | | | -| `counterparty_channel_id` | [string](#string) | | | -| `counterparty_version` | [string](#string) | | | -| `proof_try` | [bytes](#bytes) | | | -| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | | -| `signer` | [string](#string) | | | +| `height` | [int64](#int64) | | height is the block height at which the plan was applied. | - + -### MsgChannelOpenAckResponse -MsgChannelOpenAckResponse defines the Msg/ChannelOpenAck response type. +### QueryCurrentPlanRequest +QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC +method. - + -### MsgChannelOpenConfirm -MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain B to -acknowledge the change of channel state to OPEN on Chain A. +### QueryCurrentPlanResponse +QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC +method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `port_id` | [string](#string) | | | -| `channel_id` | [string](#string) | | | -| `proof_ack` | [bytes](#bytes) | | | -| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | | -| `signer` | [string](#string) | | | +| `plan` | [Plan](#cosmos.upgrade.v1beta1.Plan) | | plan is the current upgrade plan. | - + -### MsgChannelOpenConfirmResponse -MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response type. +### QueryUpgradedConsensusStateRequest +QueryUpgradedConsensusStateRequest is the request type for the Query/UpgradedConsensusState +RPC method. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `last_height` | [int64](#int64) | | last height of the current chain must be sent in request as this is the height under which next consensus state is stored | - -### MsgChannelOpenInit -MsgChannelOpenInit defines an sdk.Msg to initialize a channel handshake. It -is called by a relayer on Chain A. + + + +### QueryUpgradedConsensusStateResponse +QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState +RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `port_id` | [string](#string) | | | -| `channel` | [Channel](#ibc.core.channel.v1.Channel) | | | -| `signer` | [string](#string) | | | +| `upgraded_consensus_state` | [bytes](#bytes) | | | + - + -### MsgChannelOpenInitResponse -MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. + + +### Query +Query defines the gRPC upgrade querier service. +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `CurrentPlan` | [QueryCurrentPlanRequest](#cosmos.upgrade.v1beta1.QueryCurrentPlanRequest) | [QueryCurrentPlanResponse](#cosmos.upgrade.v1beta1.QueryCurrentPlanResponse) | CurrentPlan queries the current upgrade plan. | GET|/cosmos/upgrade/v1beta1/current_plan| +| `AppliedPlan` | [QueryAppliedPlanRequest](#cosmos.upgrade.v1beta1.QueryAppliedPlanRequest) | [QueryAppliedPlanResponse](#cosmos.upgrade.v1beta1.QueryAppliedPlanResponse) | AppliedPlan queries a previously applied upgrade plan by its name. | GET|/cosmos/upgrade/v1beta1/applied_plan/{name}| +| `UpgradedConsensusState` | [QueryUpgradedConsensusStateRequest](#cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest) | [QueryUpgradedConsensusStateResponse](#cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse) | UpgradedConsensusState queries the consensus state that will serve as a trusted kernel for the next version of this chain. It will only be stored at the last height of this chain. UpgradedConsensusState RPC not supported with legacy querier | GET|/cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}| + - -### MsgChannelOpenTry -MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel -on Chain B. + +

Top

-| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `port_id` | [string](#string) | | | -| `previous_channel_id` | [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 | -| `channel` | [Channel](#ibc.core.channel.v1.Channel) | | | -| `counterparty_version` | [string](#string) | | | -| `proof_init` | [bytes](#bytes) | | | -| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | | -| `signer` | [string](#string) | | | +## cosmos/vesting/v1beta1/vesting.proto + +### BaseVestingAccount +BaseVestingAccount implements the VestingAccount interface. It contains all +the necessary fields needed for any vesting account implementation. - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `base_account` | [cosmos.auth.v1beta1.BaseAccount](#cosmos.auth.v1beta1.BaseAccount) | | | +| `original_vesting` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | +| `delegated_free` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | +| `delegated_vesting` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | +| `end_time` | [int64](#int64) | | | -### MsgChannelOpenTryResponse -MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. + + - + -### MsgRecvPacket -MsgRecvPacket receives incoming IBC packet + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `packet` | [Packet](#ibc.core.channel.v1.Packet) | | | -| `proof_commitment` | [bytes](#bytes) | | | -| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | | -| `signer` | [string](#string) | | | + +

Top

+## ibc/applications/transfer/v1/transfer.proto + - +### DenomTrace +DenomTrace contains the base denomination for ICS20 fungible tokens and the +source tracing information path. -### MsgRecvPacketResponse -MsgRecvPacketResponse defines the Msg/RecvPacket response type. + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `path` | [string](#string) | | path defines the chain of port/channel identifiers used for tracing the source of the fungible token. | +| `base_denom` | [string](#string) | | base denomination of the relayed fungible token. | - + -### MsgTimeout -MsgTimeout receives timed-out packet +### FungibleTokenPacketData +FungibleTokenPacketData defines a struct for the packet payload +See FungibleTokenPacketData spec: +https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer#data-structures | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `packet` | [Packet](#ibc.core.channel.v1.Packet) | | | -| `proof_unreceived` | [bytes](#bytes) | | | -| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | | -| `next_sequence_recv` | [uint64](#uint64) | | | -| `signer` | [string](#string) | | | +| `denom` | [string](#string) | | the token denomination to be transferred | +| `amount` | [uint64](#uint64) | | the token amount to be transferred | +| `sender` | [string](#string) | | the sender address | +| `receiver` | [string](#string) | | the recipient address on the destination chain | - + -### MsgTimeoutOnClose -MsgTimeoutOnClose timed-out packet upon counterparty channel closure. +### Params +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. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `packet` | [Packet](#ibc.core.channel.v1.Packet) | | | -| `proof_unreceived` | [bytes](#bytes) | | | -| `proof_close` | [bytes](#bytes) | | | -| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | | -| `next_sequence_recv` | [uint64](#uint64) | | | -| `signer` | [string](#string) | | | +| `send_enabled` | [bool](#bool) | | send_enabled enables or disables all cross-chain token transfers from this chain. | +| `receive_enabled` | [bool](#bool) | | receive_enabled enables or disables all cross-chain token transfers to this chain. | + - + -### MsgTimeoutOnCloseResponse -MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. + + + +

Top

+## ibc/applications/transfer/v1/genesis.proto - -### MsgTimeoutResponse -MsgTimeoutResponse defines the Msg/Timeout response type. + +### GenesisState +GenesisState defines the ibc-transfer genesis state +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `port_id` | [string](#string) | | | +| `denom_traces` | [DenomTrace](#ibc.applications.transfer.v1.DenomTrace) | repeated | | +| `params` | [Params](#ibc.applications.transfer.v1.Params) | | | - - - - + -### Msg -Msg defines the ibc/channel Msg service. + -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `ChannelOpenInit` | [MsgChannelOpenInit](#ibc.core.channel.v1.MsgChannelOpenInit) | [MsgChannelOpenInitResponse](#ibc.core.channel.v1.MsgChannelOpenInitResponse) | ChannelOpenInit defines a rpc handler method for MsgChannelOpenInit. | | -| `ChannelOpenTry` | [MsgChannelOpenTry](#ibc.core.channel.v1.MsgChannelOpenTry) | [MsgChannelOpenTryResponse](#ibc.core.channel.v1.MsgChannelOpenTryResponse) | ChannelOpenTry defines a rpc handler method for MsgChannelOpenTry. | | -| `ChannelOpenAck` | [MsgChannelOpenAck](#ibc.core.channel.v1.MsgChannelOpenAck) | [MsgChannelOpenAckResponse](#ibc.core.channel.v1.MsgChannelOpenAckResponse) | ChannelOpenAck defines a rpc handler method for MsgChannelOpenAck. | | -| `ChannelOpenConfirm` | [MsgChannelOpenConfirm](#ibc.core.channel.v1.MsgChannelOpenConfirm) | [MsgChannelOpenConfirmResponse](#ibc.core.channel.v1.MsgChannelOpenConfirmResponse) | ChannelOpenConfirm defines a rpc handler method for MsgChannelOpenConfirm. | | -| `ChannelCloseInit` | [MsgChannelCloseInit](#ibc.core.channel.v1.MsgChannelCloseInit) | [MsgChannelCloseInitResponse](#ibc.core.channel.v1.MsgChannelCloseInitResponse) | ChannelCloseInit defines a rpc handler method for MsgChannelCloseInit. | | -| `ChannelCloseConfirm` | [MsgChannelCloseConfirm](#ibc.core.channel.v1.MsgChannelCloseConfirm) | [MsgChannelCloseConfirmResponse](#ibc.core.channel.v1.MsgChannelCloseConfirmResponse) | ChannelCloseConfirm defines a rpc handler method for MsgChannelCloseConfirm. | | -| `RecvPacket` | [MsgRecvPacket](#ibc.core.channel.v1.MsgRecvPacket) | [MsgRecvPacketResponse](#ibc.core.channel.v1.MsgRecvPacketResponse) | RecvPacket defines a rpc handler method for MsgRecvPacket. | | -| `Timeout` | [MsgTimeout](#ibc.core.channel.v1.MsgTimeout) | [MsgTimeoutResponse](#ibc.core.channel.v1.MsgTimeoutResponse) | Timeout defines a rpc handler method for MsgTimeout. | | -| `TimeoutOnClose` | [MsgTimeoutOnClose](#ibc.core.channel.v1.MsgTimeoutOnClose) | [MsgTimeoutOnCloseResponse](#ibc.core.channel.v1.MsgTimeoutOnCloseResponse) | TimeoutOnClose defines a rpc handler method for MsgTimeoutOnClose. | | -| `Acknowledgement` | [MsgAcknowledgement](#ibc.core.channel.v1.MsgAcknowledgement) | [MsgAcknowledgementResponse](#ibc.core.channel.v1.MsgAcknowledgementResponse) | Acknowledgement defines a rpc handler method for MsgAcknowledgement. | | + - +

Top

-## ibc/core/client/v1/genesis.proto +## ibc/applications/transfer/v1/query.proto - + -### GenesisMetadata -GenesisMetadata defines the genesis type for metadata that clients may return -with ExportMetadata +### QueryDenomTraceRequest +QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC +method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `key` | [bytes](#bytes) | | store key of metadata without clientID-prefix | -| `value` | [bytes](#bytes) | | metadata value | +| `hash` | [string](#string) | | hash (in hex format) of the denomination trace information. | - + -### GenesisState -GenesisState defines the ibc client submodule's genesis state. +### QueryDenomTraceResponse +QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC +method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `clients` | [IdentifiedClientState](#ibc.core.client.v1.IdentifiedClientState) | repeated | client states with their corresponding identifiers | -| `clients_consensus` | [ClientConsensusStates](#ibc.core.client.v1.ClientConsensusStates) | repeated | consensus states from each client | -| `clients_metadata` | [IdentifiedGenesisMetadata](#ibc.core.client.v1.IdentifiedGenesisMetadata) | repeated | metadata from each client | -| `params` | [Params](#ibc.core.client.v1.Params) | | | -| `create_localhost` | [bool](#bool) | | create localhost on initialization | -| `next_client_sequence` | [uint64](#uint64) | | the sequence for the next generated client identifier | +| `denom_trace` | [DenomTrace](#ibc.applications.transfer.v1.DenomTrace) | | denom_trace returns the requested denomination trace information. | - + -### IdentifiedGenesisMetadata -IdentifiedGenesisMetadata has the client metadata with the corresponding client id. +### QueryDenomTracesRequest +QueryConnectionsRequest is the request type for the Query/DenomTraces RPC +method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `client_id` | [string](#string) | | | -| `client_metadata` | [GenesisMetadata](#ibc.core.client.v1.GenesisMetadata) | repeated | | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | - - + - +### QueryDenomTracesResponse +QueryConnectionsResponse is the response type for the Query/DenomTraces RPC +method. - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `denom_traces` | [DenomTrace](#ibc.applications.transfer.v1.DenomTrace) | repeated | denom_traces returns all denominations trace information. | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | - -

Top

-## ibc/core/client/v1/query.proto - + -### QueryClientParamsRequest -QueryClientParamsRequest is the request type for the Query/ClientParams RPC method. +### QueryParamsRequest +QueryParamsRequest is the request type for the Query/Params RPC method. - + -### QueryClientParamsResponse -QueryClientParamsResponse is the response type for the Query/ClientParams RPC method. +### QueryParamsResponse +QueryParamsResponse is the response type for the Query/Params RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `params` | [Params](#ibc.core.client.v1.Params) | | params defines the parameters of the module. | +| `params` | [Params](#ibc.applications.transfer.v1.Params) | | params defines the parameters of the module. | + - + -### QueryClientStateRequest -QueryClientStateRequest is the request type for the Query/ClientState RPC -method + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `client_id` | [string](#string) | | client state unique identifier | + +### Query +Query provides defines the gRPC querier service. +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `DenomTrace` | [QueryDenomTraceRequest](#ibc.applications.transfer.v1.QueryDenomTraceRequest) | [QueryDenomTraceResponse](#ibc.applications.transfer.v1.QueryDenomTraceResponse) | DenomTrace queries a denomination trace information. | GET|/ibc/apps/transfer/v1/denom_traces/{hash}| +| `DenomTraces` | [QueryDenomTracesRequest](#ibc.applications.transfer.v1.QueryDenomTracesRequest) | [QueryDenomTracesResponse](#ibc.applications.transfer.v1.QueryDenomTracesResponse) | DenomTraces queries all denomination traces. | GET|/ibc/apps/transfer/v1/denom_traces| +| `Params` | [QueryParamsRequest](#ibc.applications.transfer.v1.QueryParamsRequest) | [QueryParamsResponse](#ibc.applications.transfer.v1.QueryParamsResponse) | Params queries all parameters of the ibc-transfer module. | GET|/ibc/apps/transfer/v1/params| + - + +

Top

+ +## ibc/core/client/v1/client.proto + -### QueryClientStateResponse -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. + + + +### ClientConsensusStates +ClientConsensusStates defines all the stored consensus states for a given +client. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `client_state` | [google.protobuf.Any](#google.protobuf.Any) | | client state associated with the request identifier | -| `proof` | [bytes](#bytes) | | merkle proof of existence | -| `proof_height` | [Height](#ibc.core.client.v1.Height) | | height at which the proof was retrieved | +| `client_id` | [string](#string) | | client identifier | +| `consensus_states` | [ConsensusStateWithHeight](#ibc.core.client.v1.ConsensusStateWithHeight) | repeated | consensus states and their heights associated with the client | - + -### QueryClientStatesRequest -QueryClientStatesRequest is the request type for the Query/ClientStates RPC -method +### ClientUpdateProposal +ClientUpdateProposal is a governance proposal. If it passes, the substitute +client's consensus states starting from the 'initial height' are copied over +to the subjects client state. 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). The updated client +must also be valid (cannot be expired). | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination request | +| `title` | [string](#string) | | the title of the update proposal | +| `description` | [string](#string) | | the description of the proposal | +| `subject_client_id` | [string](#string) | | the client identifier for the client to be updated if the proposal passes | +| `substitute_client_id` | [string](#string) | | the substitute client identifier for the client standing in for the subject client | +| `initial_height` | [Height](#ibc.core.client.v1.Height) | | the intital height to copy consensus states from the substitute to the subject | - + -### QueryClientStatesResponse -QueryClientStatesResponse is the response type for the Query/ClientStates RPC -method. +### ConsensusStateWithHeight +ConsensusStateWithHeight defines a consensus state with an additional height +field. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `client_states` | [IdentifiedClientState](#ibc.core.client.v1.IdentifiedClientState) | repeated | list of stored ClientStates of the chain. | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination response | +| `height` | [Height](#ibc.core.client.v1.Height) | | consensus state height | +| `consensus_state` | [google.protobuf.Any](#google.protobuf.Any) | | consensus state | - + -### QueryConsensusStateRequest -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. +### Height +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 | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `client_id` | [string](#string) | | client identifier | -| `revision_number` | [uint64](#uint64) | | consensus state revision number | -| `revision_height` | [uint64](#uint64) | | consensus state revision height | -| `latest_height` | [bool](#bool) | | latest_height overrrides the height field and queries the latest stored ConsensusState | +| `revision_number` | [uint64](#uint64) | | the revision that the client is currently on | +| `revision_height` | [uint64](#uint64) | | the height within the given revision | - + -### QueryConsensusStateResponse -QueryConsensusStateResponse is the response type for the Query/ConsensusState -RPC method +### IdentifiedClientState +IdentifiedClientState defines a client state with an additional client +identifier field. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `consensus_state` | [google.protobuf.Any](#google.protobuf.Any) | | consensus state associated with the client identifier at the given height | -| `proof` | [bytes](#bytes) | | merkle proof of existence | -| `proof_height` | [Height](#ibc.core.client.v1.Height) | | height at which the proof was retrieved | +| `client_id` | [string](#string) | | client identifier | +| `client_state` | [google.protobuf.Any](#google.protobuf.Any) | | client state | - + -### QueryConsensusStatesRequest -QueryConsensusStatesRequest is the request type for the Query/ConsensusStates -RPC method. +### Params +Params defines the set of IBC light client parameters. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `client_id` | [string](#string) | | client identifier | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination request | +| `allowed_clients` | [string](#string) | repeated | allowed_clients defines the list of allowed client state types. | - + -### QueryConsensusStatesResponse -QueryConsensusStatesResponse is the response type for the -Query/ConsensusStates RPC method +### UpgradeProposal +UpgradeProposal is a gov Content type for initiating an IBC breaking +upgrade. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `consensus_states` | [ConsensusStateWithHeight](#ibc.core.client.v1.ConsensusStateWithHeight) | repeated | consensus states associated with the identifier | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination response | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `plan` | [cosmos.upgrade.v1beta1.Plan](#cosmos.upgrade.v1beta1.Plan) | | | +| `upgraded_client_state` | [google.protobuf.Any](#google.protobuf.Any) | | 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 | @@ -8762,236 +8793,279 @@ Query/ConsensusStates RPC method - - - -### Query -Query provides defines the gRPC querier service - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `ClientState` | [QueryClientStateRequest](#ibc.core.client.v1.QueryClientStateRequest) | [QueryClientStateResponse](#ibc.core.client.v1.QueryClientStateResponse) | ClientState queries an IBC light client. | GET|/ibc/core/client/v1beta1/client_states/{client_id}| -| `ClientStates` | [QueryClientStatesRequest](#ibc.core.client.v1.QueryClientStatesRequest) | [QueryClientStatesResponse](#ibc.core.client.v1.QueryClientStatesResponse) | ClientStates queries all the IBC light clients of a chain. | GET|/ibc/core/client/v1beta1/client_states| -| `ConsensusState` | [QueryConsensusStateRequest](#ibc.core.client.v1.QueryConsensusStateRequest) | [QueryConsensusStateResponse](#ibc.core.client.v1.QueryConsensusStateResponse) | ConsensusState queries a consensus state associated with a client state at a given height. | GET|/ibc/core/client/v1beta1/consensus_states/{client_id}/revision/{revision_number}/height/{revision_height}| -| `ConsensusStates` | [QueryConsensusStatesRequest](#ibc.core.client.v1.QueryConsensusStatesRequest) | [QueryConsensusStatesResponse](#ibc.core.client.v1.QueryConsensusStatesResponse) | ConsensusStates queries all the consensus state associated with a given client. | GET|/ibc/core/client/v1beta1/consensus_states/{client_id}| -| `ClientParams` | [QueryClientParamsRequest](#ibc.core.client.v1.QueryClientParamsRequest) | [QueryClientParamsResponse](#ibc.core.client.v1.QueryClientParamsResponse) | ClientParams queries all parameters of the ibc client. | GET|/ibc/client/v1beta1/params| - - +

Top

-## ibc/core/client/v1/tx.proto +## ibc/applications/transfer/v1/tx.proto - + -### MsgCreateClient -MsgCreateClient defines a message to create an IBC client +### MsgTransfer +MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between +ICS20 enabled chains. See ICS Spec here: +https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer#data-structures | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `client_state` | [google.protobuf.Any](#google.protobuf.Any) | | light client state | -| `consensus_state` | [google.protobuf.Any](#google.protobuf.Any) | | consensus state associated with the client that corresponds to a given height. | -| `signer` | [string](#string) | | signer address | +| `source_port` | [string](#string) | | the port on which the packet will be sent | +| `source_channel` | [string](#string) | | the channel by which the packet will be sent | +| `token` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | the tokens to be transferred | +| `sender` | [string](#string) | | the sender address | +| `receiver` | [string](#string) | | the recipient address on the destination chain | +| `timeout_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | Timeout height relative to the current block height. The timeout is disabled when set to 0. | +| `timeout_timestamp` | [uint64](#uint64) | | Timeout timestamp (in nanoseconds) relative to the current block timestamp. The timeout is disabled when set to 0. | - + -### MsgCreateClientResponse -MsgCreateClientResponse defines the Msg/CreateClient response type. +### MsgTransferResponse +MsgTransferResponse defines the Msg/Transfer response type. + - + -### MsgSubmitMisbehaviour -MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for -light client misbehaviour. + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `client_id` | [string](#string) | | client unique identifier | -| `misbehaviour` | [google.protobuf.Any](#google.protobuf.Any) | | misbehaviour used for freezing the light client | -| `signer` | [string](#string) | | signer address | + +### Msg +Msg defines the ibc/transfer Msg service. +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `Transfer` | [MsgTransfer](#ibc.applications.transfer.v1.MsgTransfer) | [MsgTransferResponse](#ibc.applications.transfer.v1.MsgTransferResponse) | Transfer defines a rpc handler method for MsgTransfer. | | + - + +

Top

-### MsgSubmitMisbehaviourResponse -MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response type. +## ibc/core/channel/v1/channel.proto + + + + +### Acknowledgement +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: +https://github.com/cosmos/ics/tree/master/spec/ics-004-channel-and-packet-semantics#acknowledgement-envelope +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `result` | [bytes](#bytes) | | | +| `error` | [string](#string) | | | - -### MsgUpdateClient -MsgUpdateClient defines an sdk.Msg to update a IBC client state using -the given header. + + + + +### Channel +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. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `client_id` | [string](#string) | | client unique identifier | -| `header` | [google.protobuf.Any](#google.protobuf.Any) | | header to update the light client | -| `signer` | [string](#string) | | signer address | +| `state` | [State](#ibc.core.channel.v1.State) | | current state of the channel end | +| `ordering` | [Order](#ibc.core.channel.v1.Order) | | whether the channel is ordered or unordered | +| `counterparty` | [Counterparty](#ibc.core.channel.v1.Counterparty) | | counterparty channel end | +| `connection_hops` | [string](#string) | repeated | list of connection identifiers, in order, along which packets sent on this channel will travel | +| `version` | [string](#string) | | opaque channel version, which is agreed upon during the handshake | - + -### MsgUpdateClientResponse -MsgUpdateClientResponse defines the Msg/UpdateClient response type. +### Counterparty +Counterparty defines a channel end counterparty + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `port_id` | [string](#string) | | port on the counterparty chain which owns the other end of the channel. | +| `channel_id` | [string](#string) | | channel end on the counterparty chain | - + -### MsgUpgradeClient -MsgUpgradeClient defines an sdk.Msg to upgrade an IBC client to a new client state +### IdentifiedChannel +IdentifiedChannel defines a channel with additional port and channel +identifier fields. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `client_id` | [string](#string) | | client unique identifier | -| `client_state` | [google.protobuf.Any](#google.protobuf.Any) | | upgraded client state | -| `consensus_state` | [google.protobuf.Any](#google.protobuf.Any) | | upgraded consensus state, only contains enough information to serve as a basis of trust in update logic | -| `proof_upgrade_client` | [bytes](#bytes) | | proof that old chain committed to new client | -| `proof_upgrade_consensus_state` | [bytes](#bytes) | | proof that old chain committed to new consensus state | -| `signer` | [string](#string) | | signer address | - +| `state` | [State](#ibc.core.channel.v1.State) | | current state of the channel end | +| `ordering` | [Order](#ibc.core.channel.v1.Order) | | whether the channel is ordered or unordered | +| `counterparty` | [Counterparty](#ibc.core.channel.v1.Counterparty) | | counterparty channel end | +| `connection_hops` | [string](#string) | repeated | list of connection identifiers, in order, along which packets sent on this channel will travel | +| `version` | [string](#string) | | opaque channel version, which is agreed upon during the handshake | +| `port_id` | [string](#string) | | port identifier | +| `channel_id` | [string](#string) | | channel identifier | - -### MsgUpgradeClientResponse -MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. + +### Packet +Packet defines a type that carries data across different chains through IBC +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `sequence` | [uint64](#uint64) | | 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. | +| `source_port` | [string](#string) | | identifies the port on the sending chain. | +| `source_channel` | [string](#string) | | identifies the channel end on the sending chain. | +| `destination_port` | [string](#string) | | identifies the port on the receiving chain. | +| `destination_channel` | [string](#string) | | identifies the channel end on the receiving chain. | +| `data` | [bytes](#bytes) | | actual opaque bytes transferred directly to the application module | +| `timeout_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | block height after which the packet times out | +| `timeout_timestamp` | [uint64](#uint64) | | block timestamp (in nanoseconds) after which the packet times out | - - - - + -### Msg -Msg defines the ibc/client Msg service. +### PacketState +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. -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `CreateClient` | [MsgCreateClient](#ibc.core.client.v1.MsgCreateClient) | [MsgCreateClientResponse](#ibc.core.client.v1.MsgCreateClientResponse) | CreateClient defines a rpc handler method for MsgCreateClient. | | -| `UpdateClient` | [MsgUpdateClient](#ibc.core.client.v1.MsgUpdateClient) | [MsgUpdateClientResponse](#ibc.core.client.v1.MsgUpdateClientResponse) | UpdateClient defines a rpc handler method for MsgUpdateClient. | | -| `UpgradeClient` | [MsgUpgradeClient](#ibc.core.client.v1.MsgUpgradeClient) | [MsgUpgradeClientResponse](#ibc.core.client.v1.MsgUpgradeClientResponse) | UpgradeClient defines a rpc handler method for MsgUpgradeClient. | | -| `SubmitMisbehaviour` | [MsgSubmitMisbehaviour](#ibc.core.client.v1.MsgSubmitMisbehaviour) | [MsgSubmitMisbehaviourResponse](#ibc.core.client.v1.MsgSubmitMisbehaviourResponse) | SubmitMisbehaviour defines a rpc handler method for MsgSubmitMisbehaviour. | | - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `port_id` | [string](#string) | | channel port identifier. | +| `channel_id` | [string](#string) | | channel unique identifier. | +| `sequence` | [uint64](#uint64) | | packet sequence. | +| `data` | [bytes](#bytes) | | embedded data that represents packet state. | - -

Top

-## ibc/core/commitment/v1/commitment.proto + - + -### MerklePath -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 +### Order +Order defines if a channel is ORDERED or UNORDERED +| Name | Number | Description | +| ---- | ------ | ----------- | +| ORDER_NONE_UNSPECIFIED | 0 | zero-value for channel ordering | +| ORDER_UNORDERED | 1 | packets can be delivered in any order, which may differ from the order in which they were sent. | +| ORDER_ORDERED | 2 | packets are delivered exactly in the order which they were sent | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `key_path` | [string](#string) | repeated | | + +### State +State defines if a channel is in one of the following states: +CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. +| Name | Number | Description | +| ---- | ------ | ----------- | +| STATE_UNINITIALIZED_UNSPECIFIED | 0 | Default State | +| STATE_INIT | 1 | A channel has just started the opening handshake. | +| STATE_TRYOPEN | 2 | A channel has acknowledged the handshake step on the counterparty chain. | +| STATE_OPEN | 3 | A channel has completed the handshake. Open channels are ready to send and receive packets. | +| STATE_CLOSED | 4 | A channel has been closed and can no longer be used to send or receive packets. | - + -### MerklePrefix -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...)) + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `key_prefix` | [bytes](#bytes) | | | + +

Top

+## ibc/core/channel/v1/genesis.proto - + -### MerkleProof -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 +### GenesisState +GenesisState defines the ibc channel submodule's genesis state. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `proofs` | [ics23.CommitmentProof](#ics23.CommitmentProof) | repeated | | +| `channels` | [IdentifiedChannel](#ibc.core.channel.v1.IdentifiedChannel) | repeated | | +| `acknowledgements` | [PacketState](#ibc.core.channel.v1.PacketState) | repeated | | +| `commitments` | [PacketState](#ibc.core.channel.v1.PacketState) | repeated | | +| `receipts` | [PacketState](#ibc.core.channel.v1.PacketState) | repeated | | +| `send_sequences` | [PacketSequence](#ibc.core.channel.v1.PacketSequence) | repeated | | +| `recv_sequences` | [PacketSequence](#ibc.core.channel.v1.PacketSequence) | repeated | | +| `ack_sequences` | [PacketSequence](#ibc.core.channel.v1.PacketSequence) | repeated | | +| `next_channel_sequence` | [uint64](#uint64) | | the sequence for the next generated channel identifier | - + -### MerkleRoot -MerkleRoot defines a merkle root hash. -In the Cosmos SDK, the AppHash of a block header becomes the root. +### PacketSequence +PacketSequence defines the genesis type necessary to retrieve and store +next send and receive sequences. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `hash` | [bytes](#bytes) | | | +| `port_id` | [string](#string) | | | +| `channel_id` | [string](#string) | | | +| `sequence` | [uint64](#uint64) | | | @@ -9007,245 +9081,252 @@ In the Cosmos SDK, the AppHash of a block header becomes the root. - +

Top

-## ibc/core/connection/v1/connection.proto +## ibc/core/channel/v1/query.proto - + -### ClientPaths -ClientPaths define all the connection paths for a client state. +### QueryChannelClientStateRequest +QueryChannelClientStateRequest is the request type for the Query/ClientState +RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `paths` | [string](#string) | repeated | list of connection paths | +| `port_id` | [string](#string) | | port unique identifier | +| `channel_id` | [string](#string) | | channel unique identifier | - + -### ConnectionEnd -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. +### QueryChannelClientStateResponse +QueryChannelClientStateResponse is the Response type for the +Query/QueryChannelClientState RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `client_id` | [string](#string) | | client associated with this connection. | -| `versions` | [Version](#ibc.core.connection.v1.Version) | repeated | IBC version which can be utilised to determine encodings or protocols for channels or packets utilising this connection. | -| `state` | [State](#ibc.core.connection.v1.State) | | current state of the connection end. | -| `counterparty` | [Counterparty](#ibc.core.connection.v1.Counterparty) | | counterparty chain associated with this connection. | -| `delay_period` | [uint64](#uint64) | | 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. | +| `identified_client_state` | [ibc.core.client.v1.IdentifiedClientState](#ibc.core.client.v1.IdentifiedClientState) | | client state associated with the channel | +| `proof` | [bytes](#bytes) | | merkle proof of existence | +| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | height at which the proof was retrieved | - + -### ConnectionPaths -ConnectionPaths define all the connection paths for a given client state. +### QueryChannelConsensusStateRequest +QueryChannelConsensusStateRequest is the request type for the +Query/ConsensusState RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `client_id` | [string](#string) | | client state unique identifier | -| `paths` | [string](#string) | repeated | list of connection paths | +| `port_id` | [string](#string) | | port unique identifier | +| `channel_id` | [string](#string) | | channel unique identifier | +| `revision_number` | [uint64](#uint64) | | revision number of the consensus state | +| `revision_height` | [uint64](#uint64) | | revision height of the consensus state | - + -### Counterparty -Counterparty defines the counterparty chain associated with a connection end. +### QueryChannelConsensusStateResponse +QueryChannelClientStateResponse is the Response type for the +Query/QueryChannelClientState RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `client_id` | [string](#string) | | identifies the client on the counterparty chain associated with a given connection. | -| `connection_id` | [string](#string) | | identifies the connection end on the counterparty chain associated with a given connection. | -| `prefix` | [ibc.core.commitment.v1.MerklePrefix](#ibc.core.commitment.v1.MerklePrefix) | | commitment merkle prefix of the counterparty chain. | +| `consensus_state` | [google.protobuf.Any](#google.protobuf.Any) | | consensus state associated with the channel | +| `client_id` | [string](#string) | | client ID associated with the consensus state | +| `proof` | [bytes](#bytes) | | merkle proof of existence | +| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | height at which the proof was retrieved | - + -### IdentifiedConnection -IdentifiedConnection defines a connection with additional connection -identifier field. +### QueryChannelRequest +QueryChannelRequest is the request type for the Query/Channel RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `id` | [string](#string) | | connection identifier. | -| `client_id` | [string](#string) | | client associated with this connection. | -| `versions` | [Version](#ibc.core.connection.v1.Version) | repeated | IBC version which can be utilised to determine encodings or protocols for channels or packets utilising this connection | -| `state` | [State](#ibc.core.connection.v1.State) | | current state of the connection end. | -| `counterparty` | [Counterparty](#ibc.core.connection.v1.Counterparty) | | counterparty chain associated with this connection. | -| `delay_period` | [uint64](#uint64) | | delay period associated with this connection. | +| `port_id` | [string](#string) | | port unique identifier | +| `channel_id` | [string](#string) | | channel unique identifier | - + -### Version -Version defines the versioning scheme used to negotiate the IBC verison in -the connection handshake. +### QueryChannelResponse +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. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `identifier` | [string](#string) | | unique version identifier | -| `features` | [string](#string) | repeated | list of features compatible with the specified identifier | +| `channel` | [Channel](#ibc.core.channel.v1.Channel) | | channel associated with the request identifiers | +| `proof` | [bytes](#bytes) | | merkle proof of existence | +| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | height at which the proof was retrieved | - + - +### QueryChannelsRequest +QueryChannelsRequest is the request type for the Query/Channels RPC method -### State -State defines if a connection is in one of the following states: -INIT, TRYOPEN, OPEN or UNINITIALIZED. -| Name | Number | Description | -| ---- | ------ | ----------- | -| STATE_UNINITIALIZED_UNSPECIFIED | 0 | Default State | -| STATE_INIT | 1 | A connection end has just started the opening handshake. | -| STATE_TRYOPEN | 2 | A connection end has acknowledged the handshake step on the counterparty chain. | -| STATE_OPEN | 3 | A connection end has completed the handshake. | +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination request | - - - + - -

Top

+### QueryChannelsResponse +QueryChannelsResponse is the response type for the Query/Channels RPC method. -## ibc/core/connection/v1/genesis.proto + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `channels` | [IdentifiedChannel](#ibc.core.channel.v1.IdentifiedChannel) | repeated | list of stored channels of the chain. | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination response | +| `height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | query block height | - -### GenesisState -GenesisState defines the ibc connection submodule's genesis state. + + + + +### QueryConnectionChannelsRequest +QueryConnectionChannelsRequest is the request type for the +Query/QueryConnectionChannels RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `connections` | [IdentifiedConnection](#ibc.core.connection.v1.IdentifiedConnection) | repeated | | -| `client_connection_paths` | [ConnectionPaths](#ibc.core.connection.v1.ConnectionPaths) | repeated | | -| `next_connection_sequence` | [uint64](#uint64) | | the sequence for the next generated connection identifier | +| `connection` | [string](#string) | | connection unique identifier | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination request | - - + - +### QueryConnectionChannelsResponse +QueryConnectionChannelsResponse is the Response type for the +Query/QueryConnectionChannels RPC method - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `channels` | [IdentifiedChannel](#ibc.core.channel.v1.IdentifiedChannel) | repeated | list of channels associated with a connection. | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination response | +| `height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | query block height | - -

Top

-## ibc/core/connection/v1/query.proto - + -### QueryClientConnectionsRequest -QueryClientConnectionsRequest is the request type for the -Query/ClientConnections RPC method +### QueryNextSequenceReceiveRequest +QueryNextSequenceReceiveRequest is the request type for the +Query/QueryNextSequenceReceiveRequest RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `client_id` | [string](#string) | | client identifier associated with a connection | +| `port_id` | [string](#string) | | port unique identifier | +| `channel_id` | [string](#string) | | channel unique identifier | - + -### QueryClientConnectionsResponse -QueryClientConnectionsResponse is the response type for the -Query/ClientConnections RPC method +### QueryNextSequenceReceiveResponse +QuerySequenceResponse is the request type for the +Query/QueryNextSequenceReceiveResponse RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `connection_paths` | [string](#string) | repeated | slice of all the connection paths associated with a client. | +| `next_sequence_receive` | [uint64](#uint64) | | next sequence receive number | | `proof` | [bytes](#bytes) | | merkle proof of existence | -| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | height at which the proof was generated | +| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | height at which the proof was retrieved | - + -### QueryConnectionClientStateRequest -QueryConnectionClientStateRequest is the request type for the -Query/ConnectionClientState RPC method +### QueryPacketAcknowledgementRequest +QueryPacketAcknowledgementRequest is the request type for the +Query/PacketAcknowledgement RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `connection_id` | [string](#string) | | connection identifier | +| `port_id` | [string](#string) | | port unique identifier | +| `channel_id` | [string](#string) | | channel unique identifier | +| `sequence` | [uint64](#uint64) | | packet sequence | - + -### QueryConnectionClientStateResponse -QueryConnectionClientStateResponse is the response type for the -Query/ConnectionClientState RPC method +### QueryPacketAcknowledgementResponse +QueryPacketAcknowledgementResponse defines the client query response for a +packet which also includes a proof and the height from which the +proof was retrieved | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `identified_client_state` | [ibc.core.client.v1.IdentifiedClientState](#ibc.core.client.v1.IdentifiedClientState) | | client state associated with the channel | +| `acknowledgement` | [bytes](#bytes) | | packet associated with the request fields | | `proof` | [bytes](#bytes) | | merkle proof of existence | | `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | height at which the proof was retrieved | @@ -9254,70 +9335,71 @@ Query/ConnectionClientState RPC method - + -### QueryConnectionConsensusStateRequest -QueryConnectionConsensusStateRequest is the request type for the -Query/ConnectionConsensusState RPC method +### QueryPacketAcknowledgementsRequest +QueryPacketAcknowledgementsRequest is the request type for the +Query/QueryPacketCommitments RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `connection_id` | [string](#string) | | connection identifier | -| `revision_number` | [uint64](#uint64) | | | -| `revision_height` | [uint64](#uint64) | | | +| `port_id` | [string](#string) | | port unique identifier | +| `channel_id` | [string](#string) | | channel unique identifier | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination request | - + -### QueryConnectionConsensusStateResponse -QueryConnectionConsensusStateResponse is the response type for the -Query/ConnectionConsensusState RPC method +### QueryPacketAcknowledgementsResponse +QueryPacketAcknowledgemetsResponse is the request type for the +Query/QueryPacketAcknowledgements RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `consensus_state` | [google.protobuf.Any](#google.protobuf.Any) | | consensus state associated with the channel | -| `client_id` | [string](#string) | | client ID associated with the consensus state | -| `proof` | [bytes](#bytes) | | merkle proof of existence | -| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | height at which the proof was retrieved | +| `acknowledgements` | [PacketState](#ibc.core.channel.v1.PacketState) | repeated | | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination response | +| `height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | query block height | - + -### QueryConnectionRequest -QueryConnectionRequest is the request type for the Query/Connection RPC -method +### QueryPacketCommitmentRequest +QueryPacketCommitmentRequest is the request type for the +Query/PacketCommitment RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `connection_id` | [string](#string) | | connection unique identifier | +| `port_id` | [string](#string) | | port unique identifier | +| `channel_id` | [string](#string) | | channel unique identifier | +| `sequence` | [uint64](#uint64) | | packet sequence | - + -### QueryConnectionResponse -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. +### QueryPacketCommitmentResponse +QueryPacketCommitmentResponse defines the client query response for a packet +which also includes a proof and the height from which the proof was +retrieved | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `connection` | [ConnectionEnd](#ibc.core.connection.v1.ConnectionEnd) | | connection associated with the request identifier | +| `commitment` | [bytes](#bytes) | | packet associated with the request fields | | `proof` | [bytes](#bytes) | | merkle proof of existence | | `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | height at which the proof was retrieved | @@ -9326,32 +9408,34 @@ which the proof was retrieved. - + -### QueryConnectionsRequest -QueryConnectionsRequest is the request type for the Query/Connections RPC -method +### QueryPacketCommitmentsRequest +QueryPacketCommitmentsRequest is the request type for the +Query/QueryPacketCommitments RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | +| `port_id` | [string](#string) | | port unique identifier | +| `channel_id` | [string](#string) | | channel unique identifier | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination request | - + -### QueryConnectionsResponse -QueryConnectionsResponse is the response type for the Query/Connections RPC -method. +### QueryPacketCommitmentsResponse +QueryPacketCommitmentsResponse is the request type for the +Query/QueryPacketCommitments RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `connections` | [IdentifiedConnection](#ibc.core.connection.v1.IdentifiedConnection) | repeated | list of stored connections of the chain. | +| `commitments` | [PacketState](#ibc.core.channel.v1.PacketState) | repeated | | | `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination response | | `height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | query block height | @@ -9359,151 +9443,164 @@ method. - - + - +### QueryPacketReceiptRequest +QueryPacketReceiptRequest is the request type for the +Query/PacketReceipt RPC method - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `port_id` | [string](#string) | | port unique identifier | +| `channel_id` | [string](#string) | | channel unique identifier | +| `sequence` | [uint64](#uint64) | | packet sequence | -### Query -Query provides defines the gRPC querier service -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Connection` | [QueryConnectionRequest](#ibc.core.connection.v1.QueryConnectionRequest) | [QueryConnectionResponse](#ibc.core.connection.v1.QueryConnectionResponse) | Connection queries an IBC connection end. | GET|/ibc/core/connection/v1beta1/connections/{connection_id}| -| `Connections` | [QueryConnectionsRequest](#ibc.core.connection.v1.QueryConnectionsRequest) | [QueryConnectionsResponse](#ibc.core.connection.v1.QueryConnectionsResponse) | Connections queries all the IBC connections of a chain. | GET|/ibc/core/connection/v1beta1/connections| -| `ClientConnections` | [QueryClientConnectionsRequest](#ibc.core.connection.v1.QueryClientConnectionsRequest) | [QueryClientConnectionsResponse](#ibc.core.connection.v1.QueryClientConnectionsResponse) | ClientConnections queries the connection paths associated with a client state. | GET|/ibc/core/connection/v1beta1/client_connections/{client_id}| -| `ConnectionClientState` | [QueryConnectionClientStateRequest](#ibc.core.connection.v1.QueryConnectionClientStateRequest) | [QueryConnectionClientStateResponse](#ibc.core.connection.v1.QueryConnectionClientStateResponse) | ConnectionClientState queries the client state associated with the connection. | GET|/ibc/core/connection/v1beta1/connections/{connection_id}/client_state| -| `ConnectionConsensusState` | [QueryConnectionConsensusStateRequest](#ibc.core.connection.v1.QueryConnectionConsensusStateRequest) | [QueryConnectionConsensusStateResponse](#ibc.core.connection.v1.QueryConnectionConsensusStateResponse) | ConnectionConsensusState queries the consensus state associated with the connection. | GET|/ibc/core/connection/v1beta1/connections/{connection_id}/consensus_state/revision/{revision_number}/height/{revision_height}| - - -

Top

+ -## ibc/core/connection/v1/tx.proto +### QueryPacketReceiptResponse +QueryPacketReceiptResponse defines the client query response for a packet +receipt which also includes a proof, and the height from which the proof was +retrieved + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `received` | [bool](#bool) | | success flag for if receipt exists | +| `proof` | [bytes](#bytes) | | merkle proof of existence | +| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | height at which the proof was retrieved | - -### MsgConnectionOpenAck -MsgConnectionOpenAck defines a msg sent by a Relayer to Chain A to -acknowledge the change of connection state to TRYOPEN on Chain B. + + + + +### QueryUnreceivedAcksRequest +QueryUnreceivedAcks is the request type for the +Query/UnreceivedAcks RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `connection_id` | [string](#string) | | | -| `counterparty_connection_id` | [string](#string) | | | -| `version` | [Version](#ibc.core.connection.v1.Version) | | | -| `client_state` | [google.protobuf.Any](#google.protobuf.Any) | | | -| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | | -| `proof_try` | [bytes](#bytes) | | proof of the initialization the connection on Chain B: `UNITIALIZED -> TRYOPEN` | -| `proof_client` | [bytes](#bytes) | | proof of client state included in message | -| `proof_consensus` | [bytes](#bytes) | | proof of client consensus state | -| `consensus_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | | -| `signer` | [string](#string) | | | +| `port_id` | [string](#string) | | port unique identifier | +| `channel_id` | [string](#string) | | channel unique identifier | +| `packet_ack_sequences` | [uint64](#uint64) | repeated | list of acknowledgement sequences | - + -### MsgConnectionOpenAckResponse -MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response type. +### QueryUnreceivedAcksResponse +QueryUnreceivedAcksResponse is the response type for the +Query/UnreceivedAcks RPC method +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `sequences` | [uint64](#uint64) | repeated | list of unreceived acknowledgement sequences | +| `height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | query block height | - -### MsgConnectionOpenConfirm -MsgConnectionOpenConfirm defines a msg sent by a Relayer to Chain B to -acknowledge the change of connection state to OPEN on Chain A. + + + +### QueryUnreceivedPacketsRequest +QueryUnreceivedPacketsRequest is the request type for the +Query/UnreceivedPackets RPC method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `connection_id` | [string](#string) | | | -| `proof_ack` | [bytes](#bytes) | | proof for the change of the connection state on Chain A: `INIT -> OPEN` | -| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | | -| `signer` | [string](#string) | | | - +| `port_id` | [string](#string) | | port unique identifier | +| `channel_id` | [string](#string) | | channel unique identifier | +| `packet_commitment_sequences` | [uint64](#uint64) | repeated | list of packet sequences | - -### MsgConnectionOpenConfirmResponse -MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm response type. + +### QueryUnreceivedPacketsResponse +QueryUnreceivedPacketsResponse is the response type for the +Query/UnreceivedPacketCommitments RPC method +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `sequences` | [uint64](#uint64) | repeated | list of unreceived packet sequences | +| `height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | query block height | - -### MsgConnectionOpenInit -MsgConnectionOpenInit defines the msg sent by an account on Chain A to -initialize a connection with Chain B. + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `client_id` | [string](#string) | | | -| `counterparty` | [Counterparty](#ibc.core.connection.v1.Counterparty) | | | -| `version` | [Version](#ibc.core.connection.v1.Version) | | | -| `delay_period` | [uint64](#uint64) | | | -| `signer` | [string](#string) | | | + + + +### Query +Query provides defines the gRPC querier service +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `Channel` | [QueryChannelRequest](#ibc.core.channel.v1.QueryChannelRequest) | [QueryChannelResponse](#ibc.core.channel.v1.QueryChannelResponse) | Channel queries an IBC Channel. | GET|/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}| +| `Channels` | [QueryChannelsRequest](#ibc.core.channel.v1.QueryChannelsRequest) | [QueryChannelsResponse](#ibc.core.channel.v1.QueryChannelsResponse) | Channels queries all the IBC channels of a chain. | GET|/ibc/core/channel/v1/channels| +| `ConnectionChannels` | [QueryConnectionChannelsRequest](#ibc.core.channel.v1.QueryConnectionChannelsRequest) | [QueryConnectionChannelsResponse](#ibc.core.channel.v1.QueryConnectionChannelsResponse) | ConnectionChannels queries all the channels associated with a connection end. | GET|/ibc/core/channel/v1/connections/{connection}/channels| +| `ChannelClientState` | [QueryChannelClientStateRequest](#ibc.core.channel.v1.QueryChannelClientStateRequest) | [QueryChannelClientStateResponse](#ibc.core.channel.v1.QueryChannelClientStateResponse) | ChannelClientState queries for the client state for the channel associated with the provided channel identifiers. | GET|/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/client_state| +| `ChannelConsensusState` | [QueryChannelConsensusStateRequest](#ibc.core.channel.v1.QueryChannelConsensusStateRequest) | [QueryChannelConsensusStateResponse](#ibc.core.channel.v1.QueryChannelConsensusStateResponse) | ChannelConsensusState queries for the consensus state for the channel associated with the provided channel identifiers. | GET|/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/consensus_state/revision/{revision_number}/height/{revision_height}| +| `PacketCommitment` | [QueryPacketCommitmentRequest](#ibc.core.channel.v1.QueryPacketCommitmentRequest) | [QueryPacketCommitmentResponse](#ibc.core.channel.v1.QueryPacketCommitmentResponse) | PacketCommitment queries a stored packet commitment hash. | GET|/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence}| +| `PacketCommitments` | [QueryPacketCommitmentsRequest](#ibc.core.channel.v1.QueryPacketCommitmentsRequest) | [QueryPacketCommitmentsResponse](#ibc.core.channel.v1.QueryPacketCommitmentsResponse) | PacketCommitments returns all the packet commitments hashes associated with a channel. | GET|/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments| +| `PacketReceipt` | [QueryPacketReceiptRequest](#ibc.core.channel.v1.QueryPacketReceiptRequest) | [QueryPacketReceiptResponse](#ibc.core.channel.v1.QueryPacketReceiptResponse) | PacketReceipt queries if a given packet sequence has been received on the queried chain | GET|/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_receipts/{sequence}| +| `PacketAcknowledgement` | [QueryPacketAcknowledgementRequest](#ibc.core.channel.v1.QueryPacketAcknowledgementRequest) | [QueryPacketAcknowledgementResponse](#ibc.core.channel.v1.QueryPacketAcknowledgementResponse) | PacketAcknowledgement queries a stored packet acknowledgement hash. | GET|/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence}| +| `PacketAcknowledgements` | [QueryPacketAcknowledgementsRequest](#ibc.core.channel.v1.QueryPacketAcknowledgementsRequest) | [QueryPacketAcknowledgementsResponse](#ibc.core.channel.v1.QueryPacketAcknowledgementsResponse) | PacketAcknowledgements returns all the packet acknowledgements associated with a channel. | GET|/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_acknowledgements| +| `UnreceivedPackets` | [QueryUnreceivedPacketsRequest](#ibc.core.channel.v1.QueryUnreceivedPacketsRequest) | [QueryUnreceivedPacketsResponse](#ibc.core.channel.v1.QueryUnreceivedPacketsResponse) | UnreceivedPackets returns all the unreceived IBC packets associated with a channel and sequences. | GET|/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_commitment_sequences}/unreceived_packets| +| `UnreceivedAcks` | [QueryUnreceivedAcksRequest](#ibc.core.channel.v1.QueryUnreceivedAcksRequest) | [QueryUnreceivedAcksResponse](#ibc.core.channel.v1.QueryUnreceivedAcksResponse) | UnreceivedAcks returns all the unreceived IBC acknowledgements associated with a channel and sequences. | GET|/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_ack_sequences}/unreceived_acks| +| `NextSequenceReceive` | [QueryNextSequenceReceiveRequest](#ibc.core.channel.v1.QueryNextSequenceReceiveRequest) | [QueryNextSequenceReceiveResponse](#ibc.core.channel.v1.QueryNextSequenceReceiveResponse) | NextSequenceReceive returns the next receive sequence for a given channel. | GET|/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/next_sequence| - + -### MsgConnectionOpenInitResponse -MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response type. + +

Top

+## ibc/core/channel/v1/tx.proto - + -### MsgConnectionOpenTry -MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a -connection on Chain B. +### MsgAcknowledgement +MsgAcknowledgement receives incoming IBC acknowledgement | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `client_id` | [string](#string) | | | -| `previous_connection_id` | [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 | -| `client_state` | [google.protobuf.Any](#google.protobuf.Any) | | | -| `counterparty` | [Counterparty](#ibc.core.connection.v1.Counterparty) | | | -| `delay_period` | [uint64](#uint64) | | | -| `counterparty_versions` | [Version](#ibc.core.connection.v1.Version) | repeated | | +| `packet` | [Packet](#ibc.core.channel.v1.Packet) | | | +| `acknowledgement` | [bytes](#bytes) | | | +| `proof_acked` | [bytes](#bytes) | | | | `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | | -| `proof_init` | [bytes](#bytes) | | proof of the initialization the connection on Chain A: `UNITIALIZED -> INIT` | -| `proof_client` | [bytes](#bytes) | | proof of client state included in message | -| `proof_consensus` | [bytes](#bytes) | | proof of client consensus state | -| `consensus_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | | | `signer` | [string](#string) | | | @@ -9511,412 +9608,1460 @@ connection on Chain B. - + -### MsgConnectionOpenTryResponse -MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response type. +### MsgAcknowledgementResponse +MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. - - + - +### MsgChannelCloseConfirm +MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B +to acknowledge the change of channel state to CLOSED on Chain A. - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `port_id` | [string](#string) | | | +| `channel_id` | [string](#string) | | | +| `proof_init` | [bytes](#bytes) | | | +| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | | +| `signer` | [string](#string) | | | -### Msg -Msg defines the ibc/connection Msg service. -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `ConnectionOpenInit` | [MsgConnectionOpenInit](#ibc.core.connection.v1.MsgConnectionOpenInit) | [MsgConnectionOpenInitResponse](#ibc.core.connection.v1.MsgConnectionOpenInitResponse) | ConnectionOpenInit defines a rpc handler method for MsgConnectionOpenInit. | | -| `ConnectionOpenTry` | [MsgConnectionOpenTry](#ibc.core.connection.v1.MsgConnectionOpenTry) | [MsgConnectionOpenTryResponse](#ibc.core.connection.v1.MsgConnectionOpenTryResponse) | ConnectionOpenTry defines a rpc handler method for MsgConnectionOpenTry. | | -| `ConnectionOpenAck` | [MsgConnectionOpenAck](#ibc.core.connection.v1.MsgConnectionOpenAck) | [MsgConnectionOpenAckResponse](#ibc.core.connection.v1.MsgConnectionOpenAckResponse) | ConnectionOpenAck defines a rpc handler method for MsgConnectionOpenAck. | | -| `ConnectionOpenConfirm` | [MsgConnectionOpenConfirm](#ibc.core.connection.v1.MsgConnectionOpenConfirm) | [MsgConnectionOpenConfirmResponse](#ibc.core.connection.v1.MsgConnectionOpenConfirmResponse) | ConnectionOpenConfirm defines a rpc handler method for MsgConnectionOpenConfirm. | | - - -

Top

+ -## ibc/core/types/v1/genesis.proto +### MsgChannelCloseConfirmResponse +MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm response +type. - -### GenesisState -GenesisState defines the ibc module's genesis state. -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `client_genesis` | [ibc.core.client.v1.GenesisState](#ibc.core.client.v1.GenesisState) | | ICS002 - Clients genesis state | -| `connection_genesis` | [ibc.core.connection.v1.GenesisState](#ibc.core.connection.v1.GenesisState) | | ICS003 - Connections genesis state | -| `channel_genesis` | [ibc.core.channel.v1.GenesisState](#ibc.core.channel.v1.GenesisState) | | ICS004 - Channel genesis state | + +### MsgChannelCloseInit +MsgChannelCloseInit defines a msg sent by a Relayer to Chain A +to close a channel with Chain B. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `port_id` | [string](#string) | | | +| `channel_id` | [string](#string) | | | +| `signer` | [string](#string) | | | - - - - + +### MsgChannelCloseInitResponse +MsgChannelCloseInitResponse defines the Msg/ChannelCloseInit response type. - -

Top

-## ibc/lightclients/localhost/v1/localhost.proto - -### ClientState -ClientState defines a loopback (localhost) client. It requires (read-only) -access to keys outside the client prefix. + + +### MsgChannelOpenAck +MsgChannelOpenAck defines a msg sent by a Relayer to Chain A to acknowledge +the change of channel state to TRYOPEN on Chain B. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `chain_id` | [string](#string) | | self chain ID | -| `height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | self latest block height | - - +| `port_id` | [string](#string) | | | +| `channel_id` | [string](#string) | | | +| `counterparty_channel_id` | [string](#string) | | | +| `counterparty_version` | [string](#string) | | | +| `proof_try` | [bytes](#bytes) | | | +| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | | +| `signer` | [string](#string) | | | - - - - + +### MsgChannelOpenAckResponse +MsgChannelOpenAckResponse defines the Msg/ChannelOpenAck response type. - -

Top

-## ibc/lightclients/solomachine/v1/solomachine.proto - + -### ChannelStateData -ChannelStateData returns the SignBytes data for channel state -verification. +### MsgChannelOpenConfirm +MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain B to +acknowledge the change of channel state to OPEN on Chain A. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `path` | [bytes](#bytes) | | | -| `channel` | [ibc.core.channel.v1.Channel](#ibc.core.channel.v1.Channel) | | | - - +| `port_id` | [string](#string) | | | +| `channel_id` | [string](#string) | | | +| `proof_ack` | [bytes](#bytes) | | | +| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | | +| `signer` | [string](#string) | | | - -### ClientState -ClientState defines a solo machine client that tracks the current consensus -state and if the client is frozen. + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `sequence` | [uint64](#uint64) | | latest sequence of the client state | -| `frozen_sequence` | [uint64](#uint64) | | frozen sequence of the solo machine | -| `consensus_state` | [ConsensusState](#ibc.lightclients.solomachine.v1.ConsensusState) | | | -| `allow_update_after_proposal` | [bool](#bool) | | when set to true, will allow governance to update a solo machine client. The client will be unfrozen if it is frozen. | +### MsgChannelOpenConfirmResponse +MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response +type. - + -### ClientStateData -ClientStateData returns the SignBytes data for client state verification. +### MsgChannelOpenInit +MsgChannelOpenInit defines an sdk.Msg to initialize a channel handshake. It +is called by a relayer on Chain A. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `path` | [bytes](#bytes) | | | -| `client_state` | [google.protobuf.Any](#google.protobuf.Any) | | | - - +| `port_id` | [string](#string) | | | +| `channel` | [Channel](#ibc.core.channel.v1.Channel) | | | +| `signer` | [string](#string) | | | - -### ConnectionStateData -ConnectionStateData returns the SignBytes data for connection state -verification. + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `path` | [bytes](#bytes) | | | -| `connection` | [ibc.core.connection.v1.ConnectionEnd](#ibc.core.connection.v1.ConnectionEnd) | | | +### MsgChannelOpenInitResponse +MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. - + -### ConsensusState -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. +### MsgChannelOpenTry +MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel +on Chain B. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `public_key` | [google.protobuf.Any](#google.protobuf.Any) | | public key of the solo machine | -| `diversifier` | [string](#string) | | diversifier allows the same public key to be re-used across different solo machine clients (potentially on different chains) without being considered misbehaviour. | -| `timestamp` | [uint64](#uint64) | | | - - - - - +| `port_id` | [string](#string) | | | +| `previous_channel_id` | [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 | +| `channel` | [Channel](#ibc.core.channel.v1.Channel) | | | +| `counterparty_version` | [string](#string) | | | +| `proof_init` | [bytes](#bytes) | | | +| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | | +| `signer` | [string](#string) | | | + + + + + + + + +### MsgChannelOpenTryResponse +MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. + + + + + + + + +### MsgRecvPacket +MsgRecvPacket receives incoming IBC packet + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `packet` | [Packet](#ibc.core.channel.v1.Packet) | | | +| `proof_commitment` | [bytes](#bytes) | | | +| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | | +| `signer` | [string](#string) | | | + + + + + + + + +### MsgRecvPacketResponse +MsgRecvPacketResponse defines the Msg/RecvPacket response type. + + + + + + + + +### MsgTimeout +MsgTimeout receives timed-out packet + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `packet` | [Packet](#ibc.core.channel.v1.Packet) | | | +| `proof_unreceived` | [bytes](#bytes) | | | +| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | | +| `next_sequence_recv` | [uint64](#uint64) | | | +| `signer` | [string](#string) | | | + + + + + + + + +### MsgTimeoutOnClose +MsgTimeoutOnClose timed-out packet upon counterparty channel closure. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `packet` | [Packet](#ibc.core.channel.v1.Packet) | | | +| `proof_unreceived` | [bytes](#bytes) | | | +| `proof_close` | [bytes](#bytes) | | | +| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | | +| `next_sequence_recv` | [uint64](#uint64) | | | +| `signer` | [string](#string) | | | + + + + + + + + +### MsgTimeoutOnCloseResponse +MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. + + + + + + + + +### MsgTimeoutResponse +MsgTimeoutResponse defines the Msg/Timeout response type. + + + + + + + + + + + + + + +### Msg +Msg defines the ibc/channel Msg service. + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `ChannelOpenInit` | [MsgChannelOpenInit](#ibc.core.channel.v1.MsgChannelOpenInit) | [MsgChannelOpenInitResponse](#ibc.core.channel.v1.MsgChannelOpenInitResponse) | ChannelOpenInit defines a rpc handler method for MsgChannelOpenInit. | | +| `ChannelOpenTry` | [MsgChannelOpenTry](#ibc.core.channel.v1.MsgChannelOpenTry) | [MsgChannelOpenTryResponse](#ibc.core.channel.v1.MsgChannelOpenTryResponse) | ChannelOpenTry defines a rpc handler method for MsgChannelOpenTry. | | +| `ChannelOpenAck` | [MsgChannelOpenAck](#ibc.core.channel.v1.MsgChannelOpenAck) | [MsgChannelOpenAckResponse](#ibc.core.channel.v1.MsgChannelOpenAckResponse) | ChannelOpenAck defines a rpc handler method for MsgChannelOpenAck. | | +| `ChannelOpenConfirm` | [MsgChannelOpenConfirm](#ibc.core.channel.v1.MsgChannelOpenConfirm) | [MsgChannelOpenConfirmResponse](#ibc.core.channel.v1.MsgChannelOpenConfirmResponse) | ChannelOpenConfirm defines a rpc handler method for MsgChannelOpenConfirm. | | +| `ChannelCloseInit` | [MsgChannelCloseInit](#ibc.core.channel.v1.MsgChannelCloseInit) | [MsgChannelCloseInitResponse](#ibc.core.channel.v1.MsgChannelCloseInitResponse) | ChannelCloseInit defines a rpc handler method for MsgChannelCloseInit. | | +| `ChannelCloseConfirm` | [MsgChannelCloseConfirm](#ibc.core.channel.v1.MsgChannelCloseConfirm) | [MsgChannelCloseConfirmResponse](#ibc.core.channel.v1.MsgChannelCloseConfirmResponse) | ChannelCloseConfirm defines a rpc handler method for MsgChannelCloseConfirm. | | +| `RecvPacket` | [MsgRecvPacket](#ibc.core.channel.v1.MsgRecvPacket) | [MsgRecvPacketResponse](#ibc.core.channel.v1.MsgRecvPacketResponse) | RecvPacket defines a rpc handler method for MsgRecvPacket. | | +| `Timeout` | [MsgTimeout](#ibc.core.channel.v1.MsgTimeout) | [MsgTimeoutResponse](#ibc.core.channel.v1.MsgTimeoutResponse) | Timeout defines a rpc handler method for MsgTimeout. | | +| `TimeoutOnClose` | [MsgTimeoutOnClose](#ibc.core.channel.v1.MsgTimeoutOnClose) | [MsgTimeoutOnCloseResponse](#ibc.core.channel.v1.MsgTimeoutOnCloseResponse) | TimeoutOnClose defines a rpc handler method for MsgTimeoutOnClose. | | +| `Acknowledgement` | [MsgAcknowledgement](#ibc.core.channel.v1.MsgAcknowledgement) | [MsgAcknowledgementResponse](#ibc.core.channel.v1.MsgAcknowledgementResponse) | Acknowledgement defines a rpc handler method for MsgAcknowledgement. | | + + + + + + +

Top

+ +## ibc/core/client/v1/genesis.proto + + + + + +### GenesisMetadata +GenesisMetadata defines the genesis type for metadata that clients may return +with ExportMetadata + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `key` | [bytes](#bytes) | | store key of metadata without clientID-prefix | +| `value` | [bytes](#bytes) | | metadata value | + + + + + + + + +### GenesisState +GenesisState defines the ibc client submodule's genesis state. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `clients` | [IdentifiedClientState](#ibc.core.client.v1.IdentifiedClientState) | repeated | client states with their corresponding identifiers | +| `clients_consensus` | [ClientConsensusStates](#ibc.core.client.v1.ClientConsensusStates) | repeated | consensus states from each client | +| `clients_metadata` | [IdentifiedGenesisMetadata](#ibc.core.client.v1.IdentifiedGenesisMetadata) | repeated | metadata from each client | +| `params` | [Params](#ibc.core.client.v1.Params) | | | +| `create_localhost` | [bool](#bool) | | create localhost on initialization | +| `next_client_sequence` | [uint64](#uint64) | | the sequence for the next generated client identifier | + + + + + + + + +### IdentifiedGenesisMetadata +IdentifiedGenesisMetadata has the client metadata with the corresponding +client id. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `client_id` | [string](#string) | | | +| `client_metadata` | [GenesisMetadata](#ibc.core.client.v1.GenesisMetadata) | repeated | | + + + + + + + + + + + + + + + + +

Top

+ +## ibc/core/client/v1/query.proto + + + + + +### QueryClientParamsRequest +QueryClientParamsRequest is the request type for the Query/ClientParams RPC +method. + + + + + + + + +### QueryClientParamsResponse +QueryClientParamsResponse is the response type for the Query/ClientParams RPC +method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `params` | [Params](#ibc.core.client.v1.Params) | | params defines the parameters of the module. | + + + + + + + + +### QueryClientStateRequest +QueryClientStateRequest is the request type for the Query/ClientState RPC +method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `client_id` | [string](#string) | | client state unique identifier | + + + + + + + + +### QueryClientStateResponse +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. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `client_state` | [google.protobuf.Any](#google.protobuf.Any) | | client state associated with the request identifier | +| `proof` | [bytes](#bytes) | | merkle proof of existence | +| `proof_height` | [Height](#ibc.core.client.v1.Height) | | height at which the proof was retrieved | + + + + + + + + +### QueryClientStatesRequest +QueryClientStatesRequest is the request type for the Query/ClientStates RPC +method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination request | + + + + + + + + +### QueryClientStatesResponse +QueryClientStatesResponse is the response type for the Query/ClientStates RPC +method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `client_states` | [IdentifiedClientState](#ibc.core.client.v1.IdentifiedClientState) | repeated | list of stored ClientStates of the chain. | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination response | + + + + + + + + +### QueryClientStatusRequest +QueryClientStatusRequest is the request type for the Query/ClientStatus RPC +method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `client_id` | [string](#string) | | client unique identifier | + + + + + + + + +### QueryClientStatusResponse +QueryClientStatusResponse is the response type for the Query/ClientStatus RPC +method. It returns the current status of the IBC client. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `status` | [string](#string) | | | + + + + + + + + +### QueryConsensusStateRequest +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. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `client_id` | [string](#string) | | client identifier | +| `revision_number` | [uint64](#uint64) | | consensus state revision number | +| `revision_height` | [uint64](#uint64) | | consensus state revision height | +| `latest_height` | [bool](#bool) | | latest_height overrrides the height field and queries the latest stored ConsensusState | + + + + + + + + +### QueryConsensusStateResponse +QueryConsensusStateResponse is the response type for the Query/ConsensusState +RPC method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `consensus_state` | [google.protobuf.Any](#google.protobuf.Any) | | consensus state associated with the client identifier at the given height | +| `proof` | [bytes](#bytes) | | merkle proof of existence | +| `proof_height` | [Height](#ibc.core.client.v1.Height) | | height at which the proof was retrieved | + + + + + + + + +### QueryConsensusStatesRequest +QueryConsensusStatesRequest is the request type for the Query/ConsensusStates +RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `client_id` | [string](#string) | | client identifier | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination request | + + + + + + + + +### QueryConsensusStatesResponse +QueryConsensusStatesResponse is the response type for the +Query/ConsensusStates RPC method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `consensus_states` | [ConsensusStateWithHeight](#ibc.core.client.v1.ConsensusStateWithHeight) | repeated | consensus states associated with the identifier | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination response | + + + + + + + + +### QueryUpgradedClientStateRequest +QueryUpgradedClientStateRequest is the request type for the +Query/UpgradedClientState RPC method + + + + + + + + +### QueryUpgradedClientStateResponse +QueryUpgradedClientStateResponse is the response type for the +Query/UpgradedClientState RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `upgraded_client_state` | [google.protobuf.Any](#google.protobuf.Any) | | client state associated with the request identifier | + + + + + + + + +### QueryUpgradedConsensusStateRequest +QueryUpgradedConsensusStateRequest is the request type for the +Query/UpgradedConsensusState RPC method + + + + + + + + +### QueryUpgradedConsensusStateResponse +QueryUpgradedConsensusStateResponse is the response type for the +Query/UpgradedConsensusState RPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `upgraded_consensus_state` | [google.protobuf.Any](#google.protobuf.Any) | | Consensus state associated with the request identifier | + + + + + + + + + + + + + + +### Query +Query provides defines the gRPC querier service + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `ClientState` | [QueryClientStateRequest](#ibc.core.client.v1.QueryClientStateRequest) | [QueryClientStateResponse](#ibc.core.client.v1.QueryClientStateResponse) | ClientState queries an IBC light client. | GET|/ibc/core/client/v1/client_states/{client_id}| +| `ClientStates` | [QueryClientStatesRequest](#ibc.core.client.v1.QueryClientStatesRequest) | [QueryClientStatesResponse](#ibc.core.client.v1.QueryClientStatesResponse) | ClientStates queries all the IBC light clients of a chain. | GET|/ibc/core/client/v1/client_states| +| `ConsensusState` | [QueryConsensusStateRequest](#ibc.core.client.v1.QueryConsensusStateRequest) | [QueryConsensusStateResponse](#ibc.core.client.v1.QueryConsensusStateResponse) | ConsensusState queries a consensus state associated with a client state at a given height. | GET|/ibc/core/client/v1/consensus_states/{client_id}/revision/{revision_number}/height/{revision_height}| +| `ConsensusStates` | [QueryConsensusStatesRequest](#ibc.core.client.v1.QueryConsensusStatesRequest) | [QueryConsensusStatesResponse](#ibc.core.client.v1.QueryConsensusStatesResponse) | ConsensusStates queries all the consensus state associated with a given client. | GET|/ibc/core/client/v1/consensus_states/{client_id}| +| `ClientStatus` | [QueryClientStatusRequest](#ibc.core.client.v1.QueryClientStatusRequest) | [QueryClientStatusResponse](#ibc.core.client.v1.QueryClientStatusResponse) | Status queries the status of an IBC client. | GET|/ibc/core/client/v1/client_status/{client_id}| +| `ClientParams` | [QueryClientParamsRequest](#ibc.core.client.v1.QueryClientParamsRequest) | [QueryClientParamsResponse](#ibc.core.client.v1.QueryClientParamsResponse) | ClientParams queries all parameters of the ibc client. | GET|/ibc/client/v1/params| +| `UpgradedClientState` | [QueryUpgradedClientStateRequest](#ibc.core.client.v1.QueryUpgradedClientStateRequest) | [QueryUpgradedClientStateResponse](#ibc.core.client.v1.QueryUpgradedClientStateResponse) | UpgradedClientState queries an Upgraded IBC light client. | GET|/ibc/core/client/v1/upgraded_client_states| +| `UpgradedConsensusState` | [QueryUpgradedConsensusStateRequest](#ibc.core.client.v1.QueryUpgradedConsensusStateRequest) | [QueryUpgradedConsensusStateResponse](#ibc.core.client.v1.QueryUpgradedConsensusStateResponse) | UpgradedConsensusState queries an Upgraded IBC consensus state. | GET|/ibc/core/client/v1/upgraded_consensus_states| + + + + + + +

Top

+ +## ibc/core/client/v1/tx.proto + + + + + +### MsgCreateClient +MsgCreateClient defines a message to create an IBC client + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `client_state` | [google.protobuf.Any](#google.protobuf.Any) | | light client state | +| `consensus_state` | [google.protobuf.Any](#google.protobuf.Any) | | consensus state associated with the client that corresponds to a given height. | +| `signer` | [string](#string) | | signer address | + + + + + + + + +### MsgCreateClientResponse +MsgCreateClientResponse defines the Msg/CreateClient response type. + + + + + + + + +### MsgSubmitMisbehaviour +MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for +light client misbehaviour. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `client_id` | [string](#string) | | client unique identifier | +| `misbehaviour` | [google.protobuf.Any](#google.protobuf.Any) | | misbehaviour used for freezing the light client | +| `signer` | [string](#string) | | signer address | + + + + + + + + +### MsgSubmitMisbehaviourResponse +MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response +type. + + + + + + + + +### MsgUpdateClient +MsgUpdateClient defines an sdk.Msg to update a IBC client state using +the given header. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `client_id` | [string](#string) | | client unique identifier | +| `header` | [google.protobuf.Any](#google.protobuf.Any) | | header to update the light client | +| `signer` | [string](#string) | | signer address | + + + + + + + + +### MsgUpdateClientResponse +MsgUpdateClientResponse defines the Msg/UpdateClient response type. + + + + + + + + +### MsgUpgradeClient +MsgUpgradeClient defines an sdk.Msg to upgrade an IBC client to a new client +state + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `client_id` | [string](#string) | | client unique identifier | +| `client_state` | [google.protobuf.Any](#google.protobuf.Any) | | upgraded client state | +| `consensus_state` | [google.protobuf.Any](#google.protobuf.Any) | | upgraded consensus state, only contains enough information to serve as a basis of trust in update logic | +| `proof_upgrade_client` | [bytes](#bytes) | | proof that old chain committed to new client | +| `proof_upgrade_consensus_state` | [bytes](#bytes) | | proof that old chain committed to new consensus state | +| `signer` | [string](#string) | | signer address | + + + + + + + + +### MsgUpgradeClientResponse +MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. + + + + + + + + + + + + + + +### Msg +Msg defines the ibc/client Msg service. + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `CreateClient` | [MsgCreateClient](#ibc.core.client.v1.MsgCreateClient) | [MsgCreateClientResponse](#ibc.core.client.v1.MsgCreateClientResponse) | CreateClient defines a rpc handler method for MsgCreateClient. | | +| `UpdateClient` | [MsgUpdateClient](#ibc.core.client.v1.MsgUpdateClient) | [MsgUpdateClientResponse](#ibc.core.client.v1.MsgUpdateClientResponse) | UpdateClient defines a rpc handler method for MsgUpdateClient. | | +| `UpgradeClient` | [MsgUpgradeClient](#ibc.core.client.v1.MsgUpgradeClient) | [MsgUpgradeClientResponse](#ibc.core.client.v1.MsgUpgradeClientResponse) | UpgradeClient defines a rpc handler method for MsgUpgradeClient. | | +| `SubmitMisbehaviour` | [MsgSubmitMisbehaviour](#ibc.core.client.v1.MsgSubmitMisbehaviour) | [MsgSubmitMisbehaviourResponse](#ibc.core.client.v1.MsgSubmitMisbehaviourResponse) | SubmitMisbehaviour defines a rpc handler method for MsgSubmitMisbehaviour. | | + + + + + + +

Top

+ +## ibc/core/commitment/v1/commitment.proto + + + + + +### MerklePath +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 + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `key_path` | [string](#string) | repeated | | + + + + + + + + +### MerklePrefix +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...)) + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `key_prefix` | [bytes](#bytes) | | | + + + + + + + + +### MerkleProof +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 + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `proofs` | [ics23.CommitmentProof](#ics23.CommitmentProof) | repeated | | + + + + + + + + +### MerkleRoot +MerkleRoot defines a merkle root hash. +In the Cosmos SDK, the AppHash of a block header becomes the root. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `hash` | [bytes](#bytes) | | | + + + + + + + + + + + + + + + + +

Top

+ +## ibc/core/connection/v1/connection.proto + + + + + +### ClientPaths +ClientPaths define all the connection paths for a client state. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `paths` | [string](#string) | repeated | list of connection paths | + + + + + + + + +### ConnectionEnd +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. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `client_id` | [string](#string) | | client associated with this connection. | +| `versions` | [Version](#ibc.core.connection.v1.Version) | repeated | IBC version which can be utilised to determine encodings or protocols for channels or packets utilising this connection. | +| `state` | [State](#ibc.core.connection.v1.State) | | current state of the connection end. | +| `counterparty` | [Counterparty](#ibc.core.connection.v1.Counterparty) | | counterparty chain associated with this connection. | +| `delay_period` | [uint64](#uint64) | | 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. | + + + + + + + - +### ConnectionPaths +ConnectionPaths define all the connection paths for a given client state. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `client_id` | [string](#string) | | client state unique identifier | +| `paths` | [string](#string) | repeated | list of connection paths | + + + + + + + + +### Counterparty +Counterparty defines the counterparty chain associated with a connection end. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `client_id` | [string](#string) | | identifies the client on the counterparty chain associated with a given connection. | +| `connection_id` | [string](#string) | | identifies the connection end on the counterparty chain associated with a given connection. | +| `prefix` | [ibc.core.commitment.v1.MerklePrefix](#ibc.core.commitment.v1.MerklePrefix) | | commitment merkle prefix of the counterparty chain. | + + + + + + + + +### IdentifiedConnection +IdentifiedConnection defines a connection with additional connection +identifier field. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `id` | [string](#string) | | connection identifier. | +| `client_id` | [string](#string) | | client associated with this connection. | +| `versions` | [Version](#ibc.core.connection.v1.Version) | repeated | IBC version which can be utilised to determine encodings or protocols for channels or packets utilising this connection | +| `state` | [State](#ibc.core.connection.v1.State) | | current state of the connection end. | +| `counterparty` | [Counterparty](#ibc.core.connection.v1.Counterparty) | | counterparty chain associated with this connection. | +| `delay_period` | [uint64](#uint64) | | delay period associated with this connection. | + + + + + + + + +### Version +Version defines the versioning scheme used to negotiate the IBC verison in +the connection handshake. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `identifier` | [string](#string) | | unique version identifier | +| `features` | [string](#string) | repeated | list of features compatible with the specified identifier | + + + + + + + + + + +### State +State defines if a connection is in one of the following states: +INIT, TRYOPEN, OPEN or UNINITIALIZED. + +| Name | Number | Description | +| ---- | ------ | ----------- | +| STATE_UNINITIALIZED_UNSPECIFIED | 0 | Default State | +| STATE_INIT | 1 | A connection end has just started the opening handshake. | +| STATE_TRYOPEN | 2 | A connection end has acknowledged the handshake step on the counterparty chain. | +| STATE_OPEN | 3 | A connection end has completed the handshake. | + + + + + + + + + + + +

Top

+ +## ibc/core/connection/v1/genesis.proto + + + + + +### GenesisState +GenesisState defines the ibc connection submodule's genesis state. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `connections` | [IdentifiedConnection](#ibc.core.connection.v1.IdentifiedConnection) | repeated | | +| `client_connection_paths` | [ConnectionPaths](#ibc.core.connection.v1.ConnectionPaths) | repeated | | +| `next_connection_sequence` | [uint64](#uint64) | | the sequence for the next generated connection identifier | + + + + + + + + + + + + + + + + +

Top

+ +## ibc/core/connection/v1/query.proto + + + + + +### QueryClientConnectionsRequest +QueryClientConnectionsRequest is the request type for the +Query/ClientConnections RPC method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `client_id` | [string](#string) | | client identifier associated with a connection | + + + + + + + + +### QueryClientConnectionsResponse +QueryClientConnectionsResponse is the response type for the +Query/ClientConnections RPC method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `connection_paths` | [string](#string) | repeated | slice of all the connection paths associated with a client. | +| `proof` | [bytes](#bytes) | | merkle proof of existence | +| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | height at which the proof was generated | + + + + + + + + +### QueryConnectionClientStateRequest +QueryConnectionClientStateRequest is the request type for the +Query/ConnectionClientState RPC method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `connection_id` | [string](#string) | | connection identifier | + + + + + + + + +### QueryConnectionClientStateResponse +QueryConnectionClientStateResponse is the response type for the +Query/ConnectionClientState RPC method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `identified_client_state` | [ibc.core.client.v1.IdentifiedClientState](#ibc.core.client.v1.IdentifiedClientState) | | client state associated with the channel | +| `proof` | [bytes](#bytes) | | merkle proof of existence | +| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | height at which the proof was retrieved | + + + + + + + + +### QueryConnectionConsensusStateRequest +QueryConnectionConsensusStateRequest is the request type for the +Query/ConnectionConsensusState RPC method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `connection_id` | [string](#string) | | connection identifier | +| `revision_number` | [uint64](#uint64) | | | +| `revision_height` | [uint64](#uint64) | | | + + + + + + + + +### QueryConnectionConsensusStateResponse +QueryConnectionConsensusStateResponse is the response type for the +Query/ConnectionConsensusState RPC method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `consensus_state` | [google.protobuf.Any](#google.protobuf.Any) | | consensus state associated with the channel | +| `client_id` | [string](#string) | | client ID associated with the consensus state | +| `proof` | [bytes](#bytes) | | merkle proof of existence | +| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | height at which the proof was retrieved | + + + + + + + + +### QueryConnectionRequest +QueryConnectionRequest is the request type for the Query/Connection RPC +method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `connection_id` | [string](#string) | | connection unique identifier | + + + + + + + -### ConsensusStateData -ConsensusStateData returns the SignBytes data for consensus state -verification. +### QueryConnectionResponse +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. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `path` | [bytes](#bytes) | | | -| `consensus_state` | [google.protobuf.Any](#google.protobuf.Any) | | | +| `connection` | [ConnectionEnd](#ibc.core.connection.v1.ConnectionEnd) | | connection associated with the request identifier | +| `proof` | [bytes](#bytes) | | merkle proof of existence | +| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | height at which the proof was retrieved | - + -### Header -Header defines a solo machine consensus header +### QueryConnectionsRequest +QueryConnectionsRequest is the request type for the Query/Connections RPC +method | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `sequence` | [uint64](#uint64) | | sequence to update solo machine public key at | -| `timestamp` | [uint64](#uint64) | | | -| `signature` | [bytes](#bytes) | | | -| `new_public_key` | [google.protobuf.Any](#google.protobuf.Any) | | | -| `new_diversifier` | [string](#string) | | | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - + -### HeaderData -HeaderData returns the SignBytes data for update verification. +### QueryConnectionsResponse +QueryConnectionsResponse is the response type for the Query/Connections RPC +method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `new_pub_key` | [google.protobuf.Any](#google.protobuf.Any) | | header public key | -| `new_diversifier` | [string](#string) | | header diversifier | +| `connections` | [IdentifiedConnection](#ibc.core.connection.v1.IdentifiedConnection) | repeated | list of stored connections of the chain. | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination response | +| `height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | query block height | + - + -### Misbehaviour -Misbehaviour defines misbehaviour for a solo machine which consists -of a sequence and two signatures over different messages at that sequence. + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `client_id` | [string](#string) | | | -| `sequence` | [uint64](#uint64) | | | -| `signature_one` | [SignatureAndData](#ibc.lightclients.solomachine.v1.SignatureAndData) | | | -| `signature_two` | [SignatureAndData](#ibc.lightclients.solomachine.v1.SignatureAndData) | | | + +### Query +Query provides defines the gRPC querier service +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `Connection` | [QueryConnectionRequest](#ibc.core.connection.v1.QueryConnectionRequest) | [QueryConnectionResponse](#ibc.core.connection.v1.QueryConnectionResponse) | Connection queries an IBC connection end. | GET|/ibc/core/connection/v1/connections/{connection_id}| +| `Connections` | [QueryConnectionsRequest](#ibc.core.connection.v1.QueryConnectionsRequest) | [QueryConnectionsResponse](#ibc.core.connection.v1.QueryConnectionsResponse) | Connections queries all the IBC connections of a chain. | GET|/ibc/core/connection/v1/connections| +| `ClientConnections` | [QueryClientConnectionsRequest](#ibc.core.connection.v1.QueryClientConnectionsRequest) | [QueryClientConnectionsResponse](#ibc.core.connection.v1.QueryClientConnectionsResponse) | ClientConnections queries the connection paths associated with a client state. | GET|/ibc/core/connection/v1/client_connections/{client_id}| +| `ConnectionClientState` | [QueryConnectionClientStateRequest](#ibc.core.connection.v1.QueryConnectionClientStateRequest) | [QueryConnectionClientStateResponse](#ibc.core.connection.v1.QueryConnectionClientStateResponse) | ConnectionClientState queries the client state associated with the connection. | GET|/ibc/core/connection/v1/connections/{connection_id}/client_state| +| `ConnectionConsensusState` | [QueryConnectionConsensusStateRequest](#ibc.core.connection.v1.QueryConnectionConsensusStateRequest) | [QueryConnectionConsensusStateResponse](#ibc.core.connection.v1.QueryConnectionConsensusStateResponse) | ConnectionConsensusState queries the consensus state associated with the connection. | GET|/ibc/core/connection/v1/connections/{connection_id}/consensus_state/revision/{revision_number}/height/{revision_height}| + - + +

Top

-### NextSequenceRecvData -NextSequenceRecvData returns the SignBytes data for verification of the next -sequence to be received. +## ibc/core/connection/v1/tx.proto -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `path` | [bytes](#bytes) | | | -| `next_seq_recv` | [uint64](#uint64) | | | + +### MsgConnectionOpenAck +MsgConnectionOpenAck defines a msg sent by a Relayer to Chain A to +acknowledge the change of connection state to TRYOPEN on Chain B. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `connection_id` | [string](#string) | | | +| `counterparty_connection_id` | [string](#string) | | | +| `version` | [Version](#ibc.core.connection.v1.Version) | | | +| `client_state` | [google.protobuf.Any](#google.protobuf.Any) | | | +| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | | +| `proof_try` | [bytes](#bytes) | | proof of the initialization the connection on Chain B: `UNITIALIZED -> TRYOPEN` | +| `proof_client` | [bytes](#bytes) | | proof of client state included in message | +| `proof_consensus` | [bytes](#bytes) | | proof of client consensus state | +| `consensus_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | | +| `signer` | [string](#string) | | | - -### PacketAcknowledgementData -PacketAcknowledgementData returns the SignBytes data for acknowledgement -verification. -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `path` | [bytes](#bytes) | | | -| `acknowledgement` | [bytes](#bytes) | | | + +### MsgConnectionOpenAckResponse +MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response type. - -### PacketCommitmentData -PacketCommitmentData returns the SignBytes data for packet commitment -verification. + + + +### MsgConnectionOpenConfirm +MsgConnectionOpenConfirm defines a msg sent by a Relayer to Chain B to +acknowledge the change of connection state to OPEN on Chain A. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `path` | [bytes](#bytes) | | | -| `commitment` | [bytes](#bytes) | | | +| `connection_id` | [string](#string) | | | +| `proof_ack` | [bytes](#bytes) | | proof for the change of the connection state on Chain A: `INIT -> OPEN` | +| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | | +| `signer` | [string](#string) | | | - + + +### MsgConnectionOpenConfirmResponse +MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm +response type. + + + -### PacketReceiptAbsenceData -PacketReceiptAbsenceData returns the SignBytes data for -packet receipt absence verification. + + + + +### MsgConnectionOpenInit +MsgConnectionOpenInit defines the msg sent by an account on Chain A to +initialize a connection with Chain B. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `path` | [bytes](#bytes) | | | +| `client_id` | [string](#string) | | | +| `counterparty` | [Counterparty](#ibc.core.connection.v1.Counterparty) | | | +| `version` | [Version](#ibc.core.connection.v1.Version) | | | +| `delay_period` | [uint64](#uint64) | | | +| `signer` | [string](#string) | | | - + -### SignBytes -SignBytes defines the signed bytes used for signature verification. +### MsgConnectionOpenInitResponse +MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response +type. + + + + + + + + +### MsgConnectionOpenTry +MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a +connection on Chain B. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `sequence` | [uint64](#uint64) | | | -| `timestamp` | [uint64](#uint64) | | | -| `diversifier` | [string](#string) | | | -| `data_type` | [DataType](#ibc.lightclients.solomachine.v1.DataType) | | type of the data used | -| `data` | [bytes](#bytes) | | marshaled data | +| `client_id` | [string](#string) | | | +| `previous_connection_id` | [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 | +| `client_state` | [google.protobuf.Any](#google.protobuf.Any) | | | +| `counterparty` | [Counterparty](#ibc.core.connection.v1.Counterparty) | | | +| `delay_period` | [uint64](#uint64) | | | +| `counterparty_versions` | [Version](#ibc.core.connection.v1.Version) | repeated | | +| `proof_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | | +| `proof_init` | [bytes](#bytes) | | proof of the initialization the connection on Chain A: `UNITIALIZED -> INIT` | +| `proof_client` | [bytes](#bytes) | | proof of client state included in message | +| `proof_consensus` | [bytes](#bytes) | | proof of client consensus state | +| `consensus_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | | +| `signer` | [string](#string) | | | - + -### SignatureAndData -SignatureAndData contains a signature and the data signed over to create that -signature. +### MsgConnectionOpenTryResponse +MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response type. -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `signature` | [bytes](#bytes) | | | -| `data_type` | [DataType](#ibc.lightclients.solomachine.v1.DataType) | | | -| `data` | [bytes](#bytes) | | | -| `timestamp` | [uint64](#uint64) | | | + + + - -### TimestampedSignatureData -TimestampedSignatureData contains the signature data and the timestamp of the -signature. + +### Msg +Msg defines the ibc/connection Msg service. -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `signature_data` | [bytes](#bytes) | | | -| `timestamp` | [uint64](#uint64) | | | +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `ConnectionOpenInit` | [MsgConnectionOpenInit](#ibc.core.connection.v1.MsgConnectionOpenInit) | [MsgConnectionOpenInitResponse](#ibc.core.connection.v1.MsgConnectionOpenInitResponse) | ConnectionOpenInit defines a rpc handler method for MsgConnectionOpenInit. | | +| `ConnectionOpenTry` | [MsgConnectionOpenTry](#ibc.core.connection.v1.MsgConnectionOpenTry) | [MsgConnectionOpenTryResponse](#ibc.core.connection.v1.MsgConnectionOpenTryResponse) | ConnectionOpenTry defines a rpc handler method for MsgConnectionOpenTry. | | +| `ConnectionOpenAck` | [MsgConnectionOpenAck](#ibc.core.connection.v1.MsgConnectionOpenAck) | [MsgConnectionOpenAckResponse](#ibc.core.connection.v1.MsgConnectionOpenAckResponse) | ConnectionOpenAck defines a rpc handler method for MsgConnectionOpenAck. | | +| `ConnectionOpenConfirm` | [MsgConnectionOpenConfirm](#ibc.core.connection.v1.MsgConnectionOpenConfirm) | [MsgConnectionOpenConfirmResponse](#ibc.core.connection.v1.MsgConnectionOpenConfirmResponse) | ConnectionOpenConfirm defines a rpc handler method for MsgConnectionOpenConfirm. | | + + +

Top

- +## ibc/core/types/v1/genesis.proto + + + + + +### GenesisState +GenesisState defines the ibc module's genesis state. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `client_genesis` | [ibc.core.client.v1.GenesisState](#ibc.core.client.v1.GenesisState) | | ICS002 - Clients genesis state | +| `connection_genesis` | [ibc.core.connection.v1.GenesisState](#ibc.core.connection.v1.GenesisState) | | ICS003 - Connections genesis state | +| `channel_genesis` | [ibc.core.channel.v1.GenesisState](#ibc.core.channel.v1.GenesisState) | | ICS004 - Channel genesis state | - -### DataType -DataType defines the type of solo machine proof being created. This is done to preserve uniqueness of different -data sign byte encodings. -| Name | Number | Description | -| ---- | ------ | ----------- | -| DATA_TYPE_UNINITIALIZED_UNSPECIFIED | 0 | Default State | -| DATA_TYPE_CLIENT_STATE | 1 | Data type for client state verification | -| DATA_TYPE_CONSENSUS_STATE | 2 | Data type for consensus state verification | -| DATA_TYPE_CONNECTION_STATE | 3 | Data type for connection state verification | -| DATA_TYPE_CHANNEL_STATE | 4 | Data type for channel state verification | -| DATA_TYPE_PACKET_COMMITMENT | 5 | Data type for packet commitment verification | -| DATA_TYPE_PACKET_ACKNOWLEDGEMENT | 6 | Data type for packet acknowledgement verification | -| DATA_TYPE_PACKET_RECEIPT_ABSENCE | 7 | Data type for packet receipt absence verification | -| DATA_TYPE_NEXT_SEQUENCE_RECV | 8 | Data type for next sequence recv verification | -| DATA_TYPE_HEADER | 9 | Data type for header verification | + @@ -9926,302 +11071,321 @@ data sign byte encodings. - +

Top

-## ibc/lightclients/tendermint/v1/tendermint.proto +## ibc/lightclients/localhost/v1/localhost.proto - + ### ClientState -ClientState from Tendermint tracks the current validator set, latest height, -and a possible frozen height. +ClientState defines a loopback (localhost) client. It requires (read-only) +access to keys outside the client prefix. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `chain_id` | [string](#string) | | | -| `trust_level` | [Fraction](#ibc.lightclients.tendermint.v1.Fraction) | | | -| `trusting_period` | [google.protobuf.Duration](#google.protobuf.Duration) | | duration of the period since the LastestTimestamp during which the submitted headers are valid for upgrade | -| `unbonding_period` | [google.protobuf.Duration](#google.protobuf.Duration) | | duration of the staking unbonding period | -| `max_clock_drift` | [google.protobuf.Duration](#google.protobuf.Duration) | | defines how much new (untrusted) header's Time can drift into the future. | -| `frozen_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | Block height when the client was frozen due to a misbehaviour | -| `latest_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | Latest height the client was updated to | -| `proof_specs` | [ics23.ProofSpec](#ics23.ProofSpec) | repeated | Proof specifications used in verifying counterparty state | -| `upgrade_path` | [string](#string) | repeated | 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"}` | -| `allow_update_after_expiry` | [bool](#bool) | | This flag, when set to true, will allow governance to recover a client which has expired | -| `allow_update_after_misbehaviour` | [bool](#bool) | | This flag, when set to true, will allow governance to unfreeze a client whose chain has experienced a misbehaviour event | +| `chain_id` | [string](#string) | | self chain ID | +| `height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | self latest block height | + - + -### ConsensusState -ConsensusState defines the consensus state from Tendermint. + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `timestamp` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | timestamp that corresponds to the block height in which the ConsensusState was stored. | -| `root` | [ibc.core.commitment.v1.MerkleRoot](#ibc.core.commitment.v1.MerkleRoot) | | commitment root (i.e app hash) | -| `next_validators_hash` | [bytes](#bytes) | | | + +

Top

+## ibc/lightclients/solomachine/v1/solomachine.proto - + -### Fraction -Fraction defines the protobuf message type for tmmath.Fraction that only supports positive values. +### ChannelStateData +ChannelStateData returns the SignBytes data for channel state +verification. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `numerator` | [uint64](#uint64) | | | -| `denominator` | [uint64](#uint64) | | | +| `path` | [bytes](#bytes) | | | +| `channel` | [ibc.core.channel.v1.Channel](#ibc.core.channel.v1.Channel) | | | - + -### Header -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. +### ClientState +ClientState defines a solo machine client that tracks the current consensus +state and if the client is frozen. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `signed_header` | [tendermint.types.SignedHeader](#tendermint.types.SignedHeader) | | | -| `validator_set` | [tendermint.types.ValidatorSet](#tendermint.types.ValidatorSet) | | | -| `trusted_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | | -| `trusted_validators` | [tendermint.types.ValidatorSet](#tendermint.types.ValidatorSet) | | | +| `sequence` | [uint64](#uint64) | | latest sequence of the client state | +| `frozen_sequence` | [uint64](#uint64) | | frozen sequence of the solo machine | +| `consensus_state` | [ConsensusState](#ibc.lightclients.solomachine.v1.ConsensusState) | | | +| `allow_update_after_proposal` | [bool](#bool) | | when set to true, will allow governance to update a solo machine client. The client will be unfrozen if it is frozen. | - + -### Misbehaviour -Misbehaviour is a wrapper over two conflicting Headers -that implements Misbehaviour interface expected by ICS-02 +### ClientStateData +ClientStateData returns the SignBytes data for client state verification. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `client_id` | [string](#string) | | | -| `header_1` | [Header](#ibc.lightclients.tendermint.v1.Header) | | | -| `header_2` | [Header](#ibc.lightclients.tendermint.v1.Header) | | | +| `path` | [bytes](#bytes) | | | +| `client_state` | [google.protobuf.Any](#google.protobuf.Any) | | | - - + - +### ConnectionStateData +ConnectionStateData returns the SignBytes data for connection state +verification. - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `path` | [bytes](#bytes) | | | +| `connection` | [ibc.core.connection.v1.ConnectionEnd](#ibc.core.connection.v1.ConnectionEnd) | | | - -

Top

-## terra/market/v1beta1/market.proto - + -### Params -Params defines the parameters for the market module. +### ConsensusState +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. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `mint_base_pool` | [bytes](#bytes) | | | -| `burn_base_pool` | [bytes](#bytes) | | | -| `pool_recovery_period` | [uint64](#uint64) | | | -| `min_stability_spread` | [bytes](#bytes) | | | +| `public_key` | [google.protobuf.Any](#google.protobuf.Any) | | public key of the solo machine | +| `diversifier` | [string](#string) | | diversifier allows the same public key to be re-used across different solo machine clients (potentially on different chains) without being considered misbehaviour. | +| `timestamp` | [uint64](#uint64) | | | - - + - +### ConsensusStateData +ConsensusStateData returns the SignBytes data for consensus state +verification. - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `path` | [bytes](#bytes) | | | +| `consensus_state` | [google.protobuf.Any](#google.protobuf.Any) | | | - -

Top

-## terra/market/v1beta1/genesis.proto - + -### GenesisState -GenesisState defines the market module's genesis state. +### Header +Header defines a solo machine consensus header | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `params` | [Params](#terra.market.v1beta1.Params) | | params defines all the paramaters of the module. | -| `mint_pool_delta` | [bytes](#bytes) | | the gap between the MintPool and the MintBasePool | -| `burn_pool_delta` | [bytes](#bytes) | | the gap between the BurnPool and the BurnBasePool | +| `sequence` | [uint64](#uint64) | | sequence to update solo machine public key at | +| `timestamp` | [uint64](#uint64) | | | +| `signature` | [bytes](#bytes) | | | +| `new_public_key` | [google.protobuf.Any](#google.protobuf.Any) | | | +| `new_diversifier` | [string](#string) | | | - - + - +### HeaderData +HeaderData returns the SignBytes data for update verification. - + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `new_pub_key` | [google.protobuf.Any](#google.protobuf.Any) | | header public key | +| `new_diversifier` | [string](#string) | | header diversifier | - -

Top

-## terra/market/v1beta1/query.proto + - +### Misbehaviour +Misbehaviour defines misbehaviour for a solo machine which consists +of a sequence and two signatures over different messages at that sequence. -### QueryBurnPoolDeltaRequest -QueryBurnPoolDeltaRequest is the request type for the Query/BurnPoolDelta RPC method. + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `client_id` | [string](#string) | | | +| `sequence` | [uint64](#uint64) | | | +| `signature_one` | [SignatureAndData](#ibc.lightclients.solomachine.v1.SignatureAndData) | | | +| `signature_two` | [SignatureAndData](#ibc.lightclients.solomachine.v1.SignatureAndData) | | | - + -### QueryBurnPoolDeltaResponse -QueryBurnPoolDeltaResponse is the response type for the Query/BurnPoolDelta RPC method. +### NextSequenceRecvData +NextSequenceRecvData returns the SignBytes data for verification of the next +sequence to be received. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `burn_pool_delta` | [bytes](#bytes) | | burn_pool_delta defines the gap between the BurnPool and the BurnBasePool | +| `path` | [bytes](#bytes) | | | +| `next_seq_recv` | [uint64](#uint64) | | | - + -### QueryMintPoolDeltaRequest -QueryMintPoolDeltaRequest is the request type for the Query/MintPoolDelta RPC method. +### PacketAcknowledgementData +PacketAcknowledgementData returns the SignBytes data for acknowledgement +verification. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `path` | [bytes](#bytes) | | | +| `acknowledgement` | [bytes](#bytes) | | | - + -### QueryMintPoolDeltaResponse -QueryMintPoolDeltaResponse is the response type for the Query/MintPoolDelta RPC method. +### PacketCommitmentData +PacketCommitmentData returns the SignBytes data for packet commitment +verification. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `mint_pool_delta` | [bytes](#bytes) | | mint_pool_delta defines the gap between the MintPool and the MintBasePool | +| `path` | [bytes](#bytes) | | | +| `commitment` | [bytes](#bytes) | | | - + -### QueryParamsRequest -QueryParamsRequest is the request type for the Query/Params RPC method. +### PacketReceiptAbsenceData +PacketReceiptAbsenceData returns the SignBytes data for +packet receipt absence verification. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `path` | [bytes](#bytes) | | | - -### QueryParamsResponse -QueryParamsResponse is the response type for the Query/Params RPC method. + + + +### SignBytes +SignBytes defines the signed bytes used for signature verification. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `params` | [Params](#terra.market.v1beta1.Params) | | params defines the parameters of the module. | +| `sequence` | [uint64](#uint64) | | | +| `timestamp` | [uint64](#uint64) | | | +| `diversifier` | [string](#string) | | | +| `data_type` | [DataType](#ibc.lightclients.solomachine.v1.DataType) | | type of the data used | +| `data` | [bytes](#bytes) | | marshaled data | - + -### QuerySwapRequest -QuerySwapRequest is the request type for the Query/Swap RPC method. +### SignatureAndData +SignatureAndData contains a signature and the data signed over to create that +signature. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `offer_coin` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | offer_coin defines the coin being offered | -| `ask_denom` | [string](#string) | | ask_denom defines the denom of the coin to swap to | +| `signature` | [bytes](#bytes) | | | +| `data_type` | [DataType](#ibc.lightclients.solomachine.v1.DataType) | | | +| `data` | [bytes](#bytes) | | | +| `timestamp` | [uint64](#uint64) | | | - + -### QuerySwapResponse -QuerySwapResponse is the response type for the Query/Swap RPC method. +### TimestampedSignatureData +TimestampedSignatureData contains the signature data and the timestamp of the +signature. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `return_coin` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | return_coin defines the coin returned as a result of the swap simulation. | +| `signature_data` | [bytes](#bytes) | | | +| `timestamp` | [uint64](#uint64) | | | @@ -10229,204 +11393,210 @@ QuerySwapResponse is the response type for the Query/Swap RPC method. - - + +### DataType +DataType defines the type of solo machine proof being created. This is done +to preserve uniqueness of different data sign byte encodings. - +| Name | Number | Description | +| ---- | ------ | ----------- | +| DATA_TYPE_UNINITIALIZED_UNSPECIFIED | 0 | Default State | +| DATA_TYPE_CLIENT_STATE | 1 | Data type for client state verification | +| DATA_TYPE_CONSENSUS_STATE | 2 | Data type for consensus state verification | +| DATA_TYPE_CONNECTION_STATE | 3 | Data type for connection state verification | +| DATA_TYPE_CHANNEL_STATE | 4 | Data type for channel state verification | +| DATA_TYPE_PACKET_COMMITMENT | 5 | Data type for packet commitment verification | +| DATA_TYPE_PACKET_ACKNOWLEDGEMENT | 6 | Data type for packet acknowledgement verification | +| DATA_TYPE_PACKET_RECEIPT_ABSENCE | 7 | Data type for packet receipt absence verification | +| DATA_TYPE_NEXT_SEQUENCE_RECV | 8 | Data type for next sequence recv verification | +| DATA_TYPE_HEADER | 9 | Data type for header verification | -### Query -Query defines the gRPC querier service. -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Swap` | [QuerySwapRequest](#terra.market.v1beta1.QuerySwapRequest) | [QuerySwapResponse](#terra.market.v1beta1.QuerySwapResponse) | Swap returns simulated swap amount. | GET|/terra/market/v1beta1/swap| -| `MintPoolDelta` | [QueryMintPoolDeltaRequest](#terra.market.v1beta1.QueryMintPoolDeltaRequest) | [QueryMintPoolDeltaResponse](#terra.market.v1beta1.QueryMintPoolDeltaResponse) | MintPoolDelta returns mint_pool_delta amount. | GET|/terra/market/v1beta1/mint_pool_delta| -| `BurnPoolDelta` | [QueryBurnPoolDeltaRequest](#terra.market.v1beta1.QueryBurnPoolDeltaRequest) | [QueryBurnPoolDeltaResponse](#terra.market.v1beta1.QueryBurnPoolDeltaResponse) | BurnPoolDelta returns burn_pool_delta amount. | GET|/terra/market/v1beta1/burn_pool_delta| -| `Params` | [QueryParamsRequest](#terra.market.v1beta1.QueryParamsRequest) | [QueryParamsResponse](#terra.market.v1beta1.QueryParamsResponse) | Params queries all parameters. | GET|/terra/market/v1beta1/params| + + + - +

Top

-## terra/market/v1beta1/tx.proto +## ibc/lightclients/tendermint/v1/tendermint.proto - + -### MsgSwap -MsgSwap represents a message to swap coin to another denom. +### ClientState +ClientState from Tendermint tracks the current validator set, latest height, +and a possible frozen height. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `trader` | [string](#string) | | | -| `offer_coin` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `ask_denom` | [string](#string) | | | +| `chain_id` | [string](#string) | | | +| `trust_level` | [Fraction](#ibc.lightclients.tendermint.v1.Fraction) | | | +| `trusting_period` | [google.protobuf.Duration](#google.protobuf.Duration) | | duration of the period since the LastestTimestamp during which the submitted headers are valid for upgrade | +| `unbonding_period` | [google.protobuf.Duration](#google.protobuf.Duration) | | duration of the staking unbonding period | +| `max_clock_drift` | [google.protobuf.Duration](#google.protobuf.Duration) | | defines how much new (untrusted) header's Time can drift into the future. | +| `frozen_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | Block height when the client was frozen due to a misbehaviour | +| `latest_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | Latest height the client was updated to | +| `proof_specs` | [ics23.ProofSpec](#ics23.ProofSpec) | repeated | Proof specifications used in verifying counterparty state | +| `upgrade_path` | [string](#string) | repeated | 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"}` | +| `allow_update_after_expiry` | [bool](#bool) | | This flag, when set to true, will allow governance to recover a client which has expired | +| `allow_update_after_misbehaviour` | [bool](#bool) | | This flag, when set to true, will allow governance to unfreeze a client whose chain has experienced a misbehaviour event | - + -### MsgSwapResponse -MsgSwapResponse defines the Msg/Swap response type. +### ConsensusState +ConsensusState defines the consensus state from Tendermint. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `swap_coin` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `swap_fee` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `timestamp` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | timestamp that corresponds to the block height in which the ConsensusState was stored. | +| `root` | [ibc.core.commitment.v1.MerkleRoot](#ibc.core.commitment.v1.MerkleRoot) | | commitment root (i.e app hash) | +| `next_validators_hash` | [bytes](#bytes) | | | - + -### MsgSwapSend -MsgSwapSend represents a message to swap coin and send all result coin to recipient +### Fraction +Fraction defines the protobuf message type for tmmath.Fraction that only +supports positive values. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `from_address` | [string](#string) | | | -| `to_address` | [string](#string) | | | -| `offer_coin` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `ask_denom` | [string](#string) | | | +| `numerator` | [uint64](#uint64) | | | +| `denominator` | [uint64](#uint64) | | | - + -### MsgSwapSendResponse -MsgSwapSendResponse defines the Msg/SwapSend response type. +### Header +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. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `swap_coin` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `swap_fee` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - - - - - - - - - - - - - -### Msg -Msg defines the market Msg service. - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Swap` | [MsgSwap](#terra.market.v1beta1.MsgSwap) | [MsgSwapResponse](#terra.market.v1beta1.MsgSwapResponse) | Swap defines a method for swapping coin from one denom to another denom. | | -| `SwapSend` | [MsgSwapSend](#terra.market.v1beta1.MsgSwapSend) | [MsgSwapSendResponse](#terra.market.v1beta1.MsgSwapSendResponse) | SwapSend defines a method for swapping and sending coin from a account to other account. | | - - - +| `signed_header` | [tendermint.types.SignedHeader](#tendermint.types.SignedHeader) | | | +| `validator_set` | [tendermint.types.ValidatorSet](#tendermint.types.ValidatorSet) | | | +| `trusted_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | | +| `trusted_validators` | [tendermint.types.ValidatorSet](#tendermint.types.ValidatorSet) | | | - -

Top

-## terra/msgauth/v1beta1/msgauth.proto - + -### AuthorizationGrant -AuthorizationGrant represent the stored grant instance in the keeper store +### Misbehaviour +Misbehaviour is a wrapper over two conflicting Headers +that implements Misbehaviour interface expected by ICS-02 | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `authorization` | [google.protobuf.Any](#google.protobuf.Any) | | | -| `expiration` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `client_id` | [string](#string) | | | +| `header_1` | [Header](#ibc.lightclients.tendermint.v1.Header) | | | +| `header_2` | [Header](#ibc.lightclients.tendermint.v1.Header) | | | + - + -### GGMPair -GGMPair is struct that just has a granter-grantee-msgtype pair with no other data. -It is intended to be used as a marshalable pointer. For example, a GGPair can be used to construct the -key to getting an Grant from state. + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `granter_address` | [string](#string) | | | -| `grantee_address` | [string](#string) | | | -| `msg_type` | [string](#string) | | | + +

Top

+## terra/market/v1beta1/market.proto - + -### GGMPairs -GGMPairs is the array of GGMPair +### Params +Params defines the parameters for the market module. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `pairs` | [GGMPair](#terra.msgauth.v1beta1.GGMPair) | repeated | | +| `mint_base_pool` | [bytes](#bytes) | | | +| `burn_base_pool` | [bytes](#bytes) | | | +| `pool_recovery_period` | [uint64](#uint64) | | | +| `min_stability_spread` | [bytes](#bytes) | | | + - + -### GenericAuthorization -GenericAuthorization grants the permission to execute any transaction of the provided -msg type without restrictions + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `grant_msg_type` | [string](#string) | | GrantMsgType is the type of Msg this capability grant allows | + +

Top

+## terra/market/v1beta1/genesis.proto - + -### SendAuthorization -SendAuthorization grants the permission to execute send transaction of the provided -msg type with spend limit +### GenesisState +GenesisState defines the market module's genesis state. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `spend_limit` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | SpendLimit specifies the maximum amount of tokens that can be spent by this authorization and will be updated as tokens are spent. If it is empty, there is no spend limit and any amount of coins can be spent. | +| `params` | [Params](#terra.market.v1beta1.Params) | | params defines all the paramaters of the module. | +| `mint_pool_delta` | [bytes](#bytes) | | the gap between the MintPool and the MintBasePool | +| `burn_pool_delta` | [bytes](#bytes) | | the gap between the BurnPool and the BurnBasePool | @@ -10442,117 +11612,113 @@ msg type with spend limit - +

Top

-## terra/msgauth/v1beta1/genesis.proto - - +## terra/market/v1beta1/query.proto - -### AuthorizationEntry -AuthorizationEntry hold each authorization information + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `granter` | [string](#string) | | | -| `grantee` | [string](#string) | | | -| `authorization` | [google.protobuf.Any](#google.protobuf.Any) | | | -| `expiration` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +### QueryBurnPoolDeltaRequest +QueryBurnPoolDeltaRequest is the request type for the Query/BurnPoolDelta RPC method. - + -### GenesisState -GenesisState defines the msgauth module's genesis state. +### QueryBurnPoolDeltaResponse +QueryBurnPoolDeltaResponse is the response type for the Query/BurnPoolDelta RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `authorization_entries` | [AuthorizationEntry](#terra.msgauth.v1beta1.AuthorizationEntry) | repeated | | - - +| `burn_pool_delta` | [bytes](#bytes) | | burn_pool_delta defines the gap between the BurnPool and the BurnBasePool | - - - - + +### QueryMintPoolDeltaRequest +QueryMintPoolDeltaRequest is the request type for the Query/MintPoolDelta RPC method. - -

Top

-## terra/msgauth/v1beta1/query.proto - + -### QueryAllGrantsRequest -QueryAllGrantsRequest is the request type for the Query/AllGrants RPC method. +### QueryMintPoolDeltaResponse +QueryMintPoolDeltaResponse is the response type for the Query/MintPoolDelta RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `granter` | [string](#string) | | | +| `mint_pool_delta` | [bytes](#bytes) | | mint_pool_delta defines the gap between the MintPool and the MintBasePool | + + + + + + + +### QueryParamsRequest +QueryParamsRequest is the request type for the Query/Params RPC method. - -### QueryAllGrantsResponse -QueryAllGrantsResponse is the response type for the Query/AllGrants RPC method. + + +### QueryParamsResponse +QueryParamsResponse is the response type for the Query/Params RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `grants` | [AuthorizationGrant](#terra.msgauth.v1beta1.AuthorizationGrant) | repeated | | +| `params` | [Params](#terra.market.v1beta1.Params) | | params defines the parameters of the module. | - + -### QueryGrantsRequest -QueryGrantsRequest is the request type for the Query/Grants RPC method. +### QuerySwapRequest +QuerySwapRequest is the request type for the Query/Swap RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `granter` | [string](#string) | | | -| `grantee` | [string](#string) | | | +| `offer_coin` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | offer_coin defines the coin being offered | +| `ask_denom` | [string](#string) | | ask_denom defines the denom of the coin to swap to | - + -### QueryGrantsResponse -QueryGrantsResponse is the response type for the Query/Grants RPC method. +### QuerySwapResponse +QuerySwapResponse is the response type for the Query/Swap RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `grants` | [AuthorizationGrant](#terra.msgauth.v1beta1.AuthorizationGrant) | repeated | | +| `return_coin` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | return_coin defines the coin returned as a result of the swap simulation. | @@ -10565,102 +11731,90 @@ QueryGrantsResponse is the response type for the Query/Grants RPC method. - + ### Query Query defines the gRPC querier service. | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Grants` | [QueryGrantsRequest](#terra.msgauth.v1beta1.QueryGrantsRequest) | [QueryGrantsResponse](#terra.msgauth.v1beta1.QueryGrantsResponse) | Grants returns grants between a granter and a grantee | GET|/terra/msgauth/v1beta1/granters/{granter}/grantees/{grantee}/grants| -| `AllGrants` | [QueryAllGrantsRequest](#terra.msgauth.v1beta1.QueryAllGrantsRequest) | [QueryAllGrantsResponse](#terra.msgauth.v1beta1.QueryAllGrantsResponse) | AllGrants returns all grants of a granter | GET|/terra/market/v1beta1/granters/{granter}/grants| +| `Swap` | [QuerySwapRequest](#terra.market.v1beta1.QuerySwapRequest) | [QuerySwapResponse](#terra.market.v1beta1.QuerySwapResponse) | Swap returns simulated swap amount. | GET|/terra/market/v1beta1/swap| +| `MintPoolDelta` | [QueryMintPoolDeltaRequest](#terra.market.v1beta1.QueryMintPoolDeltaRequest) | [QueryMintPoolDeltaResponse](#terra.market.v1beta1.QueryMintPoolDeltaResponse) | MintPoolDelta returns mint_pool_delta amount. | GET|/terra/market/v1beta1/mint_pool_delta| +| `BurnPoolDelta` | [QueryBurnPoolDeltaRequest](#terra.market.v1beta1.QueryBurnPoolDeltaRequest) | [QueryBurnPoolDeltaResponse](#terra.market.v1beta1.QueryBurnPoolDeltaResponse) | BurnPoolDelta returns burn_pool_delta amount. | GET|/terra/market/v1beta1/burn_pool_delta| +| `Params` | [QueryParamsRequest](#terra.market.v1beta1.QueryParamsRequest) | [QueryParamsResponse](#terra.market.v1beta1.QueryParamsResponse) | Params queries all parameters. | GET|/terra/market/v1beta1/params| - +

Top

-## terra/msgauth/v1beta1/tx.proto +## terra/market/v1beta1/tx.proto - + -### MsgExecAuthorized -MsgExecAuthorized represents a message to execute granted msg +### MsgSwap +MsgSwap represents a message to swap coin to another denom. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `grantee` | [string](#string) | | | -| `msgs` | [google.protobuf.Any](#google.protobuf.Any) | repeated | | - - - - - - - - -### MsgExecAuthorizedResponse -MsgExecAuthorizedResponse defines the Msg/ExecAuthorized response type. +| `trader` | [string](#string) | | | +| `offer_coin` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `ask_denom` | [string](#string) | | | - + -### MsgGrantAuthorization -MsgGrantAuthorization represents a message to grant msg execute authorization +### MsgSwapResponse +MsgSwapResponse defines the Msg/Swap response type. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `granter` | [string](#string) | | | -| `grantee` | [string](#string) | | | -| `authorization` | [google.protobuf.Any](#google.protobuf.Any) | | | -| `period` | [google.protobuf.Duration](#google.protobuf.Duration) | | | - - - - - - - - -### MsgGrantAuthorizationResponse -MsgGrantAuthorizationResponse defines the Msg/GrantAuthorization response type. +| `swap_coin` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `swap_fee` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - + -### MsgRevokeAuthorization -MsgRevokeAuthorization represents a message to revoke a grant +### MsgSwapSend +MsgSwapSend represents a message to swap coin and send all result coin to recipient | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `granter` | [string](#string) | | | -| `grantee` | [string](#string) | | | -| `authorization_msg_type` | [string](#string) | | | +| `from_address` | [string](#string) | | | +| `to_address` | [string](#string) | | | +| `offer_coin` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `ask_denom` | [string](#string) | | | - + + +### MsgSwapSendResponse +MsgSwapSendResponse defines the Msg/SwapSend response type. + -### MsgRevokeAuthorizationResponse -MsgRevokeAuthorizationResponse defines the Msg/RevokeAuthorization response type. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `swap_coin` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `swap_fee` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | @@ -10673,16 +11827,15 @@ MsgRevokeAuthorizationResponse defines the Msg/RevokeAuthorization response type - + ### Msg Msg defines the market Msg service. | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `GrantAuthorization` | [MsgGrantAuthorization](#terra.msgauth.v1beta1.MsgGrantAuthorization) | [MsgGrantAuthorizationResponse](#terra.msgauth.v1beta1.MsgGrantAuthorizationResponse) | GrantAuthorization defines a method for granting the provided authorization to the grantee on the granter's account during the provided period time. | | -| `RevokeAuthorization` | [MsgRevokeAuthorization](#terra.msgauth.v1beta1.MsgRevokeAuthorization) | [MsgRevokeAuthorizationResponse](#terra.msgauth.v1beta1.MsgRevokeAuthorizationResponse) | RevokeAuthorization defines a method for revoking any authorization with the provided sdk.Msg type on the granter's account with that has been granted to the grantee. | | -| `ExecAuthorized` | [MsgExecAuthorized](#terra.msgauth.v1beta1.MsgExecAuthorized) | [MsgExecAuthorizedResponse](#terra.msgauth.v1beta1.MsgExecAuthorizedResponse) | ExecAuthorized defines a method for revoking any authorization with the provided sdk.Msg type on the granter's account with that has been granted to the grantee. | | +| `Swap` | [MsgSwap](#terra.market.v1beta1.MsgSwap) | [MsgSwapResponse](#terra.market.v1beta1.MsgSwapResponse) | Swap defines a method for swapping coin from one denom to another denom. | | +| `SwapSend` | [MsgSwapSend](#terra.market.v1beta1.MsgSwapSend) | [MsgSwapSendResponse](#terra.market.v1beta1.MsgSwapSendResponse) | SwapSend defines a method for swapping and sending coin from a account to other account. | | diff --git a/go.mod b/go.mod index 109686d72..b128416e7 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,11 @@ -go 1.15 +go 1.16 module github.com/terra-project/core require ( github.com/CosmWasm/wasmvm v0.14.0 - github.com/cosmos/cosmos-sdk v0.42.4 + github.com/cosmos/cosmos-sdk v0.43.0-beta1 + github.com/cosmos/ibc-go v1.0.0-alpha2 github.com/gogo/protobuf v1.3.3 github.com/golang/protobuf v1.5.2 github.com/gorilla/mux v1.8.0 @@ -13,15 +14,15 @@ require ( github.com/rakyll/statik v0.1.7 github.com/regen-network/cosmos-proto v0.3.1 github.com/spf13/cast v1.3.1 - github.com/spf13/cobra v1.1.1 + github.com/spf13/cobra v1.1.3 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.7.1 github.com/stretchr/testify v1.7.0 - github.com/tendermint/tendermint v0.34.9 + github.com/tendermint/tendermint v0.34.10 github.com/tendermint/tm-db v0.6.4 golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 // indirect google.golang.org/genproto v0.0.0-20210406143921-e86de6bf7a46 - google.golang.org/grpc v1.36.1 + google.golang.org/grpc v1.37.0 gopkg.in/yaml.v2 v2.4.0 ) diff --git a/go.sum b/go.sum index 1f3b89bd7..3dfe1643a 100644 --- a/go.sum +++ b/go.sum @@ -10,8 +10,23 @@ cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqCl cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +filippo.io/edwards25519 v1.0.0-beta.2 h1:/BZRNzm8N4K4eWfK28dL4yescorxtO7YG1yun8fy+pI= +filippo.io/edwards25519 v1.0.0-beta.2/go.mod h1:X+pm78QAUPtFLi1z9PYIlS/bdDnvbCOGKtZ+ACWEf7o= github.com/99designs/keyring v1.1.6 h1:kVDC2uCgVwecxCk+9zoCt2uEL6dt+dfVzMvGgnVcIuM= github.com/99designs/keyring v1.1.6/go.mod h1:16e0ds7LGQQcT59QqkTg72Hh5ShM51Byv5PEmW6uoRU= +github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= +github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= +github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= @@ -28,6 +43,8 @@ github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= +github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/Workiva/go-datastructures v1.0.52 h1:PLSK6pwn8mYdaoaCZEMsXBpBotr4HHn9abU0yMQt0NI= @@ -39,17 +56,20 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.3.6 h1:x/tmtOF9cDBoXH7XoAGOz2qqm1DknFD1590XmD/DUJ8= -github.com/armon/go-metrics v0.3.6/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-metrics v0.3.8 h1:oOxq3KPj0WhCuy50EhzwiyMyG2ovRQZpZLXQuOh2a/M= +github.com/armon/go-metrics v0.3.8/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -59,6 +79,7 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/btcsuite/btcd v0.0.0-20171128150713-2e60448ffcc6/go.mod h1:Dmm/EzmjnCiweXmzRIAiUWCInVmPgjkzgv5k4tVyXiQ= github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d h1:xG8Pj6Y6J760xwETNmMzmlt38QSwz0BLp1cZ09g27uw= github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d/go.mod h1:d3C0AkH6BRcvO8T0UEPu53cnw4IbV63x1bEjildYhO0= github.com/btcsuite/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw= @@ -81,6 +102,7 @@ github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46f github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= @@ -88,12 +110,18 @@ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= +github.com/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9/go.mod h1:1MxXX1Ux4x6mqPmjkUgTP1CdXIBXKX7T+Jk9Gxrmx+U= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/coinbase/rosetta-sdk-go v0.5.8/go.mod h1:xd4wYUhV3LkY78SPH8BUhc88rXfn2jYgN9BfiSjbcvM= +github.com/coinbase/rosetta-sdk-go v0.5.9 h1:CuGQE3HFmYwdEACJnuOtVI9cofqPsGvq6FdFIzaOPKI= +github.com/coinbase/rosetta-sdk-go v0.5.9/go.mod h1:xd4wYUhV3LkY78SPH8BUhc88rXfn2jYgN9BfiSjbcvM= github.com/confio/ics23/go v0.0.0-20200817220745-f173e6211efb/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= github.com/confio/ics23/go v0.6.3 h1:PuGK2V1NJWZ8sSkNDq91jgT/cahFEW9RGp4Y5jxulf0= github.com/confio/ics23/go v0.6.3/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= +github.com/confio/ics23/go v0.6.6 h1:pkOy18YxxJ/r0XFDCnrl4Bjv6h4LkBSpLS6F38mrKL8= +github.com/confio/ics23/go v0.6.6/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= @@ -104,8 +132,8 @@ github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7 github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cosmos/cosmos-sdk v0.42.4 h1:yaD4PyOx0LnyfiWasC5egg1U76lT83GRxjJjupPo7Gk= -github.com/cosmos/cosmos-sdk v0.42.4/go.mod h1:I1Zw1zmU4rA/NITaakTb71pXQnQrWyFBhqo3WSeg0vA= +github.com/cosmos/cosmos-sdk v0.43.0-beta1 h1:cfRZY+opamo+zF+MuEbvriZwoSzfCuEh1fqUM8fFHbg= +github.com/cosmos/cosmos-sdk v0.43.0-beta1/go.mod h1:rpCPaC3MnityU4Io4CDZqZB4GMtPqNeYXxPk8iRqmYM= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d h1:49RLWk1j44Xu4fjHb6JFYmeUnDORVwHNkDxaQ0ctCVU= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= @@ -114,6 +142,10 @@ github.com/cosmos/iavl v0.15.0-rc3.0.20201009144442-230e9bdf52cd/go.mod h1:3xOIa github.com/cosmos/iavl v0.15.0-rc5/go.mod h1:WqoPL9yPTQ85QBMT45OOUzPxG/U/JcJoN7uMjgxke/I= github.com/cosmos/iavl v0.15.3 h1:xE9r6HW8GeKeoYJN4zefpljZ1oukVScP/7M8oj6SUts= github.com/cosmos/iavl v0.15.3/go.mod h1:OLjQiAQ4fGD2KDZooyJG9yz+p2ao2IAYSbke8mVvSA4= +github.com/cosmos/iavl v0.16.0 h1:ICIOB8xysirTX27GmVAaoeSpeozzgSu9d49w36xkVJA= +github.com/cosmos/iavl v0.16.0/go.mod h1:2A8O/Jz9YwtjqXMO0CjnnbTYEEaovE8jWcwrakH3PoE= +github.com/cosmos/ibc-go v1.0.0-alpha2 h1:G7CQLTgH5CLXp6UajmBcM6GcWb63p+ZTmIYzZoC7rfg= +github.com/cosmos/ibc-go v1.0.0-alpha2/go.mod h1:NU4IARjXt3Hj5xcju207SWjDMpqMx3CHUXejGe0EXfY= github.com/cosmos/ledger-go v0.9.2 h1:Nnao/dLwaVTk1Q5U9THldpUMMXU94BOTWPddSmVB6pI= github.com/cosmos/ledger-go v0.9.2/go.mod h1:oZJ2hHAZROdlHiwTg4t7kP+GKIIkBT+o6c9QWFanOyI= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= @@ -126,7 +158,10 @@ github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= +github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= +github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= github.com/dgraph-io/badger/v2 v2.2007.1/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= github.com/dgraph-io/badger/v2 v2.2007.2 h1:EjjK0KqwaFMlPin1ajhP943VPENHJdEz1KLIegjaI3k= github.com/dgraph-io/badger/v2 v2.2007.2/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= @@ -138,28 +173,37 @@ github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUn github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= +github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/dop251/goja v0.0.0-20200721192441-a695b0cdd498/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b h1:HBah4D48ypg3J7Np4N+HY/ZR76fx3HEUGxDU6Uk39oQ= github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= +github.com/dvyukov/go-fuzz v0.0.0-20200318091601-be3528f3a813/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/enigmampc/btcutil v1.0.3-0.20200723161021-e2fb6adb2a25 h1:2vLKys4RBU4pn2T/hjXMbvwTr1Cvy5THHrQkbeY9HRk= github.com/enigmampc/btcutil v1.0.3-0.20200723161021-e2fb6adb2a25/go.mod h1:hTr8+TLQmkUkgcuh3mcr5fjrT9c64ZzsBCdCEC6UppY= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/ethereum/go-ethereum v1.9.23/go.mod h1:JIfVb6esrqALTExdz9hRYvrP0xBDf6wCncIu1hNwHpM= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 h1:0JZ+dUmQeA8IIVUMzysrX4/AKuQwWhV2dYQuPZdvdSQ= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 h1:E2s37DuLxFhQDg5gKsWoLBOB0n+ZW8s599zru8FJ2/Y= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= +github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= @@ -168,8 +212,13 @@ github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= +github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.6.3 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14= +github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= @@ -180,9 +229,25 @@ github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9 github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= +github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= +github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= +github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= +github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= +github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-playground/validator/v10 v10.2.0 h1:KgJ0snyC2R9VXYN2rneOtQcw5aHQB1Vv0sFl1UcHBOY= +github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= +github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= +github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= +github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= +github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= +github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= +github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/gogo/gateway v1.1.0 h1:u0SuhL9+Il+UbjM9VIE3ntfRujKbvVpFvNB4HbjeVQ0= @@ -219,6 +284,7 @@ github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.2-0.20200707131729-196ae77b8a26/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.2 h1:aeE13tS0IiQgFjYdoL8qN3K1N2bXXtI6Vi51/y7BpMw= github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -231,11 +297,15 @@ github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa h1:Q75Upo5UN4JbPFURXZ8nLKYUvF85dyFRop/vQ0Rv+64= +github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= @@ -249,6 +319,7 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= @@ -259,13 +330,18 @@ github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.1/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2 h1:FlFbCRLd5Jr4iYXZufAvgWN6Ao0JrI5chLINnUXDDr0= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= @@ -312,14 +388,25 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87 h1:uUjLpLt6bVvZ72SQc/B4dXcPBw4Vgd7soowdRl52qEM= +github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87/go.mod h1:XGsKKeXxeRr95aEOgipvluMPlgjr7dGlk9ZTWOjcUcg= +github.com/holiman/uint256 v1.1.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= +github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= +github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= +github.com/improbable-eng/grpc-web v0.14.0 h1:GdoK+cXABdB+1keuqsV1drSFO2XLYIxqt/4Rj8SWGBk= +github.com/improbable-eng/grpc-web v0.14.0/go.mod h1:6hRR09jOEG81ADP5wCQju1z71g6OL4eEvELdran/3cs= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jhump/protoreflect v1.8.2 h1:k2xE7wcUomeqwY0LDCYA16y4WWfyTcMx5mKhk0d4ua0= +github.com/jhump/protoreflect v1.8.2/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= @@ -330,42 +417,62 @@ github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCV github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.1.1-0.20170430222011-975b5c4c7c21/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d h1:Z+RDyXzjKE0i2sTjZ/b1uxiGtPhFy34Ou/Tk0qwN0kM= github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/kkdai/bstream v1.0.0/go.mod h1:FDnDOHt5Yx4p3FaHcioFT0QjDOtgUpvjeZqAs+NVZZA= +github.com/klauspost/compress v1.10.3 h1:OP96hzwJVBIHYU52pVTI6CczrxPvrGfgqF9N5eTO0Q8= +github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= +github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs= github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= +github.com/lucasjones/reggen v0.0.0-20180717132126-cdb49ff09d77/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.4 h1:8KGKTcQQGm0Kv7vEbKFErAoAOFyyacLStRtQSeYtvkY= -github.com/magiconair/properties v1.8.4/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls= +github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= +github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.5-0.20180830101745-3fb116b82035/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= @@ -383,14 +490,21 @@ github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0Qu github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.3.3 h1:SzB1nHZ2Xi+17FP0zVQBHIZqvwRN9408fJO8h+eeNA8= +github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= +github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= @@ -400,12 +514,15 @@ github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxzi github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt3d53pc1VYcphSCIaYAJtnPYnr3Zyn8fMq2wvPGPso= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -427,8 +544,8 @@ github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxS github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/otiai10/copy v1.4.2 h1:RTiz2sol3eoXPLF4o+YWqEybwfUa/Q2Nkc4ZIUs3fwI= -github.com/otiai10/copy v1.4.2/go.mod h1:XWfuS3CrI0R6IE0FbgHsEazaXO8G0LpMp9o8tos0x4E= +github.com/otiai10/copy v1.6.0 h1:IinKAryFFuPONZ7cm6T6E2QX/vcJwSnlaA5lfoaXIiQ= +github.com/otiai10/copy v1.6.0/go.mod h1:XWfuS3CrI0R6IE0FbgHsEazaXO8G0LpMp9o8tos0x4E= github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= github.com/otiai10/curr v1.0.0 h1:TJIWdbX0B+kpNagQrjgq8bCMrbhiuX73M2XwgtDMoOI= github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= @@ -440,11 +557,13 @@ github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIw github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.8.0 h1:Keo9qb7iRJs2voHvunFtuuYFsbWeOBh8/P9v/kVMFtw= -github.com/pelletier/go-toml v1.8.0/go.mod h1:D6yutnOGMveHEPV7VQOuvI/gXY61bv+9bAOTRnLElKs= +github.com/pelletier/go-toml v1.8.1 h1:1Nf83orprkJyknT6h7zbuEGUEjcyVlCxSUGTENmNCRM= +github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= +github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp0hoxKjt1H5pDo6utceo3dQVK3I5XQ= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -467,6 +586,8 @@ github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3O github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.8.0 h1:zvJNkoCFAnYFNC24FV8nW4JdRJ3GIFcLbg65lL/JDcw= github.com/prometheus/client_golang v1.8.0/go.mod h1:O9VU6huf47PktckDQfMTX0Y8tY0/7TSWwj+ITvv0TnM= +github.com/prometheus/client_golang v1.10.0 h1:/o0BDeWzLWXNZ+4q5gXltUvaMpJqckTa+jTNoB+z4cg= +github.com/prometheus/client_golang v1.10.0/go.mod h1:WJM3cc3yu7XKBKa/I8WeZm+V3eltZnBwfENSU7mdogU= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -483,8 +604,9 @@ github.com/prometheus/common v0.9.1 h1:KOMtN28tlbam3/7ZKEYKHhKoJZYYj3gMH4uc62x7X github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.15.0 h1:4fgOnadei3EZvgRwxJ7RMpG1k1pOZth5Pc13tyspaKM= -github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.18.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.23.0 h1:GXWvPYuTUenIa+BhOq/x+L/QZzCqASkVRny5KTlPDGM= +github.com/prometheus/common v0.23.0/go.mod h1:H6QK/N6XVT42whUeIdI3dp36w49c+/iMDk7UAI2qm7Q= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -494,6 +616,9 @@ github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+Gx github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.2.0 h1:wH4vA7pcjKuZzjF7lM8awk4fnuJO6idemZXoKnULUx4= github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= @@ -505,14 +630,17 @@ github.com/regen-network/cosmos-proto v0.3.1 h1:rV7iM4SSFAagvy8RiyhiACbWEGotmqzy github.com/regen-network/cosmos-proto v0.3.1/go.mod h1:jO0sVX6a1B36nmE8C9xBFXpNwWejXC7QqCOnH3O0+YM= github.com/regen-network/protobuf v1.3.3-alpha.regen.1 h1:OHEc+q5iIAXpqiqFKeLpu5NwTIkVXUs48vFMwzqpqY4= github.com/regen-network/protobuf v1.3.3-alpha.regen.1/go.mod h1:2DjTFR1HhMQhiWC5sZ4OhQ3+NtdbZ6oBDKQwq5Ou+FI= +github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= -github.com/rs/zerolog v1.20.0 h1:38k9hgtUBdxFwE34yS8rTHmHBa4eN16E4DJlv177LNs= -github.com/rs/zerolog v1.20.0/go.mod h1:IzD0RJ65iWH0w97OQQebJEvTZYvsCUm9WVLWBQrJRjo= +github.com/rs/zerolog v1.21.0 h1:Q3vdXlfLNT+OftyBHsU0Y445MD+8m8axjKgf2si0QcM= +github.com/rs/zerolog v1.21.0/go.mod h1:ZPhntP/xmq1nnND05hhpAh2QMhSsA4UN3MGZ6O2J3hM= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= @@ -521,6 +649,7 @@ github.com/sasha-s/go-deadlock v0.2.0/go.mod h1:StQn567HiB1fF2yJ44N9au7wOhrPS3iZ github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa h1:0U2s5loxrTy6/VgfVoLuVLFJcURKLH49ie0zSch7gh4= github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= @@ -549,6 +678,8 @@ github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.1 h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= +github.com/spf13/cobra v1.1.3 h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M= +github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= @@ -561,6 +692,9 @@ github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/y github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk= github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= +github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570/go.mod h1:8OR4w3TdeIHIh1g6EMY5p0gVNOovcWC+1vpc7naMuAw= +github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3/go.mod h1:hpGUWaI9xL8pRQCTXQgocU38Qw1g0Us7n5PxxTwTCYU= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= @@ -587,6 +721,8 @@ github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzH github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s= github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U= +github.com/tendermint/cosmos-rosetta-gateway v0.3.0-rc2.0.20210304154332-87d6ca4410df h1:hoMLrOS4WyyMM+Y+iWdGu94o0zzp6Q43y7v89Q1/OIw= +github.com/tendermint/cosmos-rosetta-gateway v0.3.0-rc2.0.20210304154332-87d6ca4410df/go.mod h1:gBPw8WV2Erm4UGHlBRiM3zaEBst4bsuihmMCNQdgP/s= github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 h1:hqAk8riJvK4RMWx1aInLzndwxKalgi5rTqgfXxOxbEI= github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= @@ -594,8 +730,8 @@ github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoM github.com/tendermint/tendermint v0.34.0-rc4/go.mod h1:yotsojf2C1QBOw4dZrTcxbyxmPUrT4hNuOQWX9XUwB4= github.com/tendermint/tendermint v0.34.0-rc6/go.mod h1:ugzyZO5foutZImv0Iyx/gOFCX6mjJTgbLHTwi17VDVg= github.com/tendermint/tendermint v0.34.0/go.mod h1:Aj3PIipBFSNO21r+Lq3TtzQ+uKESxkbA3yo/INM4QwQ= -github.com/tendermint/tendermint v0.34.9 h1:9P2MXDEPOcPW0NBcHQ/HDSfvczZm+q5nUUw7AZ6f1Vc= -github.com/tendermint/tendermint v0.34.9/go.mod h1:kl4Z1JwGx1I+u1SXIzMDy7Z3T8LiMeCAOnzNn6AIMT4= +github.com/tendermint/tendermint v0.34.10 h1:wBOc/It8sh/pVH9np2V5fBvRmIyFN/bUrGPx+eAHexs= +github.com/tendermint/tendermint v0.34.10/go.mod h1:aeHL7alPh4uTBIJQ8mgFEE8VwJLXI1VD3rVOmH2Mcy0= github.com/tendermint/tm-db v0.5.1 h1:H9HDq8UEA7Eeg13kdYckkgwwkQLBnJGgX4PgLJRhieY= github.com/tendermint/tm-db v0.5.1/go.mod h1:g92zWjHpCYlEvQXvy9M168Su8V1IBEeawpXVVBaK4f4= github.com/tendermint/tm-db v0.6.2/go.mod h1:GYtQ67SUvATOcoY8/+x6ylk8Qo02BQyLrAs+yAcLvGI= @@ -604,16 +740,29 @@ github.com/tendermint/tm-db v0.6.4 h1:3N2jlnYQkXNQclQwd/eKV/NzlqPlfK21cpRRIx80XX github.com/tendermint/tm-db v0.6.4/go.mod h1:dptYhIpJ2M5kUuenLr+Yyf3zQOv1SgBZcl8/BmWlMBw= github.com/terra-project/ledger-terra-go v0.11.1-terra h1:BnwRp8dyJMN5sROg8g6dXc5/Zoi44gd5c8Llf0Nobac= github.com/terra-project/ledger-terra-go v0.11.1-terra/go.mod h1:5fdyEuDNvsymbqag/EaaAeWAgyAebQe2VH38H+DnXnA= +github.com/tidwall/gjson v1.6.1/go.mod h1:BaHyNc5bjzYkPqgLq7mdVzeiRtULKULXLgZFKsxEHI0= +github.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E= +github.com/tidwall/pretty v1.0.2/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tidwall/sjson v1.1.2/go.mod h1:SEzaDwxiPzKzNfUEO4HbYF/m4UCSJDsGgNqsS1LvdoY= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= +github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= +github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/vmihailenco/msgpack/v5 v5.0.0-beta.9/go.mod h1:HVxBVPUK/+fZMonk4bi1islLa8V3cfnBug0+4dykPzo= +github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= +github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+mw0EzQ08zFqg7pK3FebNXpaMsRy2RT+Ees= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= @@ -664,6 +813,7 @@ golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= @@ -678,15 +828,18 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mobile v0.0.0-20200801112145-973feb4309de/go.mod h1:skQtrUTUwhdJvXM/2KKJzY8pDgNr9I/FOMqDVRPBUS4= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191209134235-331c550502dd/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -713,6 +866,7 @@ golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974 h1:IX6qOQeG5uLjB/hjjwjedwfjND0hgjPMMyO1RoIXQNI= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= @@ -728,7 +882,9 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -739,6 +895,7 @@ golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -761,6 +918,7 @@ golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200122134326-e047566fdf82 h1:ywK/j/KkyTHcdyYSZNXGjMwgmDSfjglYZ3vStQ/gSCU= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -768,11 +926,16 @@ golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200824131525-c12d262b63d8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200922070232-aee5d888a860/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211 h1:9UQO31fZ+0aKQOFldThf7BKPMJTiBfWycGh/u3UoO88= golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4 h1:EZ2mChiOa8udjfp6rRmswTbtZN/QzUQp4ptM4rnjHvc= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -805,17 +968,20 @@ golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190828213141-aed303cbaa74/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117012304-6edc0a871e69/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200717024301-6ddee64345a6/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -872,6 +1038,7 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.25.1-0.20200805231151-a709e31e5d12/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= @@ -890,9 +1057,14 @@ gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMy gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.61.0 h1:LBCdW4FmFYL4s/vDZD1RQYX7oAR6IjujCYgMdbHBR10= +gopkg.in/ini.v1 v1.61.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= +gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -908,11 +1080,17 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= +nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/proto/terra/msgauth/v1beta1/genesis.proto b/proto/terra/msgauth/v1beta1/genesis.proto deleted file mode 100644 index 72b7b17d7..000000000 --- a/proto/terra/msgauth/v1beta1/genesis.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; -package terra.msgauth.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/any.proto"; - -import "cosmos_proto/cosmos.proto"; -import "terra/msgauth/v1beta1/msgauth.proto"; - -option go_package = "github.com/terra-project/core/x/msgauth/types"; - -// GenesisState defines the msgauth module's genesis state. -message GenesisState { - repeated AuthorizationEntry authorization_entries = 1 [(gogoproto.nullable) = false]; -} - -// AuthorizationEntry hold each authorization information -message AuthorizationEntry { - option (gogoproto.goproto_getters) = false; - - string granter = 1; - string grantee = 2; - google.protobuf.Any authorization = 3 [(cosmos_proto.accepts_interface) = "AuthorizationI"]; - google.protobuf.Timestamp expiration = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; -} diff --git a/proto/terra/msgauth/v1beta1/msgauth.proto b/proto/terra/msgauth/v1beta1/msgauth.proto deleted file mode 100644 index 06e190eb5..000000000 --- a/proto/terra/msgauth/v1beta1/msgauth.proto +++ /dev/null @@ -1,68 +0,0 @@ -syntax = "proto3"; -package terra.msgauth.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/any.proto"; - -import "cosmos_proto/cosmos.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -option go_package = "github.com/terra-project/core/x/msgauth/types"; - -// AuthorizationGrant represent the stored grant instance in the keeper store -message AuthorizationGrant { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = true; - option (gogoproto.goproto_getters) = false; - - google.protobuf.Any authorization = 1 - [(gogoproto.moretags) = "yaml:\"authorization\"", (cosmos_proto.accepts_interface) = "AuthorizationI"]; - google.protobuf.Timestamp expiration = 2 - [(gogoproto.moretags) = "yaml:\"expiration\"", (gogoproto.nullable) = false, (gogoproto.stdtime) = true]; -} - -// GenericAuthorization grants the permission to execute any transaction of the provided -// msg type without restrictions -message GenericAuthorization { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = true; - option (cosmos_proto.implements_interface) = "AuthorizationI"; - - // GrantMsgType is the type of Msg this capability grant allows - string grant_msg_type = 1 [(gogoproto.moretags) = "yaml:\"grant_msg_type\""]; -} - -// SendAuthorization grants the permission to execute send transaction of the provided -// msg type with spend limit -message SendAuthorization { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = true; - option (cosmos_proto.implements_interface) = "AuthorizationI"; - - // SpendLimit specifies the maximum amount of tokens that can be spent - // by this authorization and will be updated as tokens are spent. If it is - // empty, there is no spend limit and any amount of coins can be spent. - repeated cosmos.base.v1beta1.Coin spend_limit = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; -} - -// GGMPair is struct that just has a granter-grantee-msgtype pair with no other data. -// It is intended to be used as a marshalable pointer. For example, a GGPair can be used to construct the -// key to getting an Grant from state. -message GGMPair { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = true; - - string granter_address = 1 [(gogoproto.moretags) = "yaml:\"granter_address\""]; - string grantee_address = 2 [(gogoproto.moretags) = "yaml:\"grantee_address\""]; - string msg_type = 3 [(gogoproto.moretags) = "yaml:\"msg_type\""]; -} - -// GGMPairs is the array of GGMPair -message GGMPairs { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = true; - - repeated GGMPair pairs = 1 [(gogoproto.moretags) = "yaml:\"pairs\"", (gogoproto.nullable) = false]; -} \ No newline at end of file diff --git a/proto/terra/msgauth/v1beta1/query.proto b/proto/terra/msgauth/v1beta1/query.proto deleted file mode 100644 index 69cc8c987..000000000 --- a/proto/terra/msgauth/v1beta1/query.proto +++ /dev/null @@ -1,48 +0,0 @@ -syntax = "proto3"; -package terra.msgauth.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "terra/msgauth/v1beta1/msgauth.proto"; - -option go_package = "github.com/terra-project/core/x/msgauth/types"; - -// Query defines the gRPC querier service. -service Query { - // Grants returns grants between a granter and a grantee - rpc Grants(QueryGrantsRequest) returns (QueryGrantsResponse) { - option (google.api.http).get = "/terra/msgauth/v1beta1/granters/{granter}/grantees/{grantee}/grants"; - } - - // AllGrants returns all grants of a granter - rpc AllGrants(QueryAllGrantsRequest) returns (QueryAllGrantsResponse) { - option (google.api.http).get = "/terra/market/v1beta1/granters/{granter}/grants"; - } -} - -// QueryGrantsRequest is the request type for the Query/Grants RPC method. -message QueryGrantsRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string granter = 1; - string grantee = 2; -} - -// QueryGrantsResponse is the response type for the Query/Grants RPC method. -message QueryGrantsResponse { - repeated AuthorizationGrant grants = 1 [(gogoproto.nullable) = false]; -} - -// QueryAllGrantsRequest is the request type for the Query/AllGrants RPC method. -message QueryAllGrantsRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string granter = 1; -} - -// QueryAllGrantsResponse is the response type for the Query/AllGrants RPC method. -message QueryAllGrantsResponse { - repeated AuthorizationGrant grants = 1 [(gogoproto.nullable) = false]; -} diff --git a/proto/terra/msgauth/v1beta1/tx.proto b/proto/terra/msgauth/v1beta1/tx.proto deleted file mode 100644 index 27829b348..000000000 --- a/proto/terra/msgauth/v1beta1/tx.proto +++ /dev/null @@ -1,69 +0,0 @@ -syntax = "proto3"; -package terra.msgauth.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/any.proto"; - -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/terra-project/core/x/msgauth/types"; - -// Msg defines the market Msg service. -service Msg { - // GrantAuthorization defines a method for granting the provided - // authorization to the grantee on the granter's - // account during the provided period time. - rpc GrantAuthorization(MsgGrantAuthorization) returns (MsgGrantAuthorizationResponse); - - // RevokeAuthorization defines a method for revoking any authorization - // with the provided sdk.Msg type on the granter's account with - // that has been granted to the grantee. - rpc RevokeAuthorization(MsgRevokeAuthorization) returns (MsgRevokeAuthorizationResponse); - - // ExecAuthorized defines a method for revoking any authorization - // with the provided sdk.Msg type on the granter's account with - // that has been granted to the grantee. - rpc ExecAuthorized(MsgExecAuthorized) returns (MsgExecAuthorizedResponse); -} - -// MsgGrantAuthorization represents a message to grant msg execute authorization -message MsgGrantAuthorization { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string granter = 1 [(gogoproto.moretags) = "yaml:\"granter\""]; - string grantee = 2 [(gogoproto.moretags) = "yaml:\"grantee\""]; - google.protobuf.Any authorization = 3 - [(gogoproto.moretags) = "yaml:\"authorization\"", (cosmos_proto.accepts_interface) = "AuthorizationI"]; - google.protobuf.Duration period = 4 - [(gogoproto.moretags) = "yaml:\"period\"", (gogoproto.nullable) = false, (gogoproto.stdduration) = true]; -} - -// MsgGrantAuthorizationResponse defines the Msg/GrantAuthorization response type. -message MsgGrantAuthorizationResponse {} - -// MsgRevokeAuthorization represents a message to revoke a grant -message MsgRevokeAuthorization { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string granter = 1 [(gogoproto.moretags) = "yaml:\"granter\""]; - string grantee = 2 [(gogoproto.moretags) = "yaml:\"grantee\""]; - string authorization_msg_type = 3 [(gogoproto.moretags) = "yaml:\"authorization_msg_type\""]; -} - -// MsgRevokeAuthorizationResponse defines the Msg/RevokeAuthorization response type. -message MsgRevokeAuthorizationResponse {} - -// MsgExecAuthorized represents a message to execute granted msg -message MsgExecAuthorized { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string grantee = 1 [(gogoproto.moretags) = "yaml:\"grantee\""]; - repeated google.protobuf.Any msgs = 2 [(gogoproto.moretags) = "yaml:\"msgs\""]; -} - -// MsgExecAuthorizedResponse defines the Msg/ExecAuthorized response type. -message MsgExecAuthorizedResponse {} \ No newline at end of file diff --git a/third_party/proto/cosmos/auth/v1beta1/query.proto b/third_party/proto/cosmos/auth/v1beta1/query.proto index a88579268..76d30dd61 100644 --- a/third_party/proto/cosmos/auth/v1beta1/query.proto +++ b/third_party/proto/cosmos/auth/v1beta1/query.proto @@ -1,6 +1,7 @@ syntax = "proto3"; package cosmos.auth.v1beta1; +import "cosmos/base/query/v1beta1/pagination.proto"; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; import "google/api/annotations.proto"; @@ -11,6 +12,11 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types"; // Query defines the gRPC querier service. service Query { + // Accounts returns all the existing accounts + rpc Accounts(QueryAccountsRequest) returns (QueryAccountsResponse) { + option (google.api.http).get = "/cosmos/auth/v1beta1/accounts"; + } + // Account returns account details based on address. rpc Account(QueryAccountRequest) returns (QueryAccountResponse) { option (google.api.http).get = "/cosmos/auth/v1beta1/accounts/{address}"; @@ -22,6 +28,21 @@ service Query { } } +// QueryAccountsRequest is the request type for the Query/Accounts RPC method. +message QueryAccountsRequest { + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +// QueryAccountsResponse is the response type for the Query/Accounts RPC method. +message QueryAccountsResponse { + // accounts are the existing accounts + repeated google.protobuf.Any accounts = 1 [(cosmos_proto.accepts_interface) = "AccountI"]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + // QueryAccountRequest is the request type for the Query/Account RPC method. message QueryAccountRequest { option (gogoproto.equal) = false; diff --git a/third_party/proto/cosmos/authz/v1beta1/authz.proto b/third_party/proto/cosmos/authz/v1beta1/authz.proto new file mode 100644 index 000000000..c69a93c11 --- /dev/null +++ b/third_party/proto/cosmos/authz/v1beta1/authz.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; +package cosmos.authz.v1beta1; + +import "cosmos_proto/cosmos.proto"; +import "google/protobuf/timestamp.proto"; +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; +option (gogoproto.goproto_getters_all) = false; + +// GenericAuthorization gives the grantee unrestricted permissions to execute +// the provided method on behalf of the granter's account. +message GenericAuthorization { + option (cosmos_proto.implements_interface) = "Authorization"; + + // Msg, identified by it's type URL, to grant unrestricted permissions to execute + string msg = 1; +} + +// Grant gives permissions to execute +// the provide method with expiration time. +message Grant { + google.protobuf.Any authorization = 1 [(cosmos_proto.accepts_interface) = "Authorization"]; + google.protobuf.Timestamp expiration = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; +} diff --git a/third_party/proto/cosmos/authz/v1beta1/event.proto b/third_party/proto/cosmos/authz/v1beta1/event.proto new file mode 100644 index 000000000..c77cea3e6 --- /dev/null +++ b/third_party/proto/cosmos/authz/v1beta1/event.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; +package cosmos.authz.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; + +// EventGrant is emitted on Msg/Grant +message EventGrant { + // Msg type URL for which an autorization is granted + string msg_type_url = 2; + // Granter account address + string granter = 3; + // Grantee account address + string grantee = 4; +} + +// EventRevoke is emitted on Msg/Revoke +message EventRevoke { + // Msg type URL for which an autorization is revoked + string msg_type_url = 2; + // Granter account address + string granter = 3; + // Grantee account address + string grantee = 4; +} diff --git a/third_party/proto/cosmos/authz/v1beta1/genesis.proto b/third_party/proto/cosmos/authz/v1beta1/genesis.proto new file mode 100644 index 000000000..411fd276f --- /dev/null +++ b/third_party/proto/cosmos/authz/v1beta1/genesis.proto @@ -0,0 +1,23 @@ +syntax = "proto3"; +package cosmos.authz.v1beta1; + +import "google/protobuf/timestamp.proto"; +import "google/protobuf/any.proto"; +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; + +// GenesisState defines the authz module's genesis state. +message GenesisState { + repeated GrantAuthorization authorization = 1 [(gogoproto.nullable) = false]; +} + +// GrantAuthorization defines the GenesisState/GrantAuthorization type. +message GrantAuthorization { + string granter = 1; + string grantee = 2; + + google.protobuf.Any authorization = 3 [(cosmos_proto.accepts_interface) = "Authorization"]; + google.protobuf.Timestamp expiration = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; +} diff --git a/third_party/proto/cosmos/authz/v1beta1/query.proto b/third_party/proto/cosmos/authz/v1beta1/query.proto new file mode 100644 index 000000000..3b66e0310 --- /dev/null +++ b/third_party/proto/cosmos/authz/v1beta1/query.proto @@ -0,0 +1,34 @@ +syntax = "proto3"; +package cosmos.authz.v1beta1; + +import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "cosmos/authz/v1beta1/authz.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; + +// Query defines the gRPC querier service. +service Query { + // Returns list of `Authorization`, granted to the grantee by the granter. + rpc Grants(QueryGrantsRequest) returns (QueryGrantsResponse) { + option (google.api.http).get = "/cosmos/authz/v1beta1/grants"; + } +} + +// QueryGrantsRequest is the request type for the Query/Grants RPC method. +message QueryGrantsRequest { + string granter = 1; + string grantee = 2; + // Optional, msg_type_url, when set, will query only grants matching given msg type. + string msg_type_url = 3; + // pagination defines an pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 4; +} + +// QueryGrantsResponse is the response type for the Query/Authorizations RPC method. +message QueryGrantsResponse { + // authorizations is a list of grants granted for grantee by granter. + repeated cosmos.authz.v1beta1.Grant grants = 1; + // pagination defines an pagination for the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} diff --git a/third_party/proto/cosmos/authz/v1beta1/tx.proto b/third_party/proto/cosmos/authz/v1beta1/tx.proto new file mode 100644 index 000000000..472b81a0e --- /dev/null +++ b/third_party/proto/cosmos/authz/v1beta1/tx.proto @@ -0,0 +1,67 @@ +syntax = "proto3"; +package cosmos.authz.v1beta1; + +import "cosmos_proto/cosmos.proto"; +import "gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/any.proto"; +import "cosmos/base/abci/v1beta1/abci.proto"; +import "cosmos/authz/v1beta1/authz.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; +option (gogoproto.goproto_getters_all) = false; + +// Msg defines the authz Msg service. +service Msg { + // Grant grants the provided authorization to the grantee on the granter's + // account with the provided expiration time. + rpc Grant(MsgGrant) returns (MsgGrantResponse); + + // Exec 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. + rpc Exec(MsgExec) returns (MsgExecResponse); + + // Revoke revokes any authorization corresponding to the provided method name on the + // granter's account that has been granted to the grantee. + rpc Revoke(MsgRevoke) returns (MsgRevokeResponse); +} + +// MsgGrant grants the provided authorization to the grantee on the granter's +// account with the provided expiration time. +message MsgGrant { + string granter = 1; + string grantee = 2; + + cosmos.authz.v1beta1.Grant grant = 3 [(gogoproto.nullable) = false]; +} + +// MsgExecResponse defines the Msg/MsgExecResponse response type. +message MsgExecResponse { + cosmos.base.abci.v1beta1.Result result = 1; +} + +// 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. +message MsgExec { + string grantee = 1; + // 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. + repeated google.protobuf.Any msgs = 2 [(cosmos_proto.accepts_interface) = "sdk.Msg, authz.Authorization"]; +} + +// MsgGrantResponse defines the Msg/MsgGrant response type. +message MsgGrantResponse {} + +// MsgRevoke revokes any authorization with the provided sdk.Msg type on the +// granter's account with that has been granted to the grantee. +message MsgRevoke { + string granter = 1; + string grantee = 2; + string msg_type_url = 3; +} + +// MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. +message MsgRevokeResponse {} diff --git a/third_party/proto/cosmos/bank/v1beta1/authz.proto b/third_party/proto/cosmos/bank/v1beta1/authz.proto new file mode 100644 index 000000000..f3505ad41 --- /dev/null +++ b/third_party/proto/cosmos/bank/v1beta1/authz.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; +package cosmos.bank.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; + +// SendAuthorization allows the grantee to spend up to spend_limit coins from +// the granter's account. +message SendAuthorization { + option (cosmos_proto.implements_interface) = "Authorization"; + + repeated cosmos.base.v1beta1.Coin spend_limit = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; +} diff --git a/third_party/proto/cosmos/bank/v1beta1/bank.proto b/third_party/proto/cosmos/bank/v1beta1/bank.proto index 5a9383362..eb843b2cb 100644 --- a/third_party/proto/cosmos/bank/v1beta1/bank.proto +++ b/third_party/proto/cosmos/bank/v1beta1/bank.proto @@ -45,12 +45,14 @@ message Output { // 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. message Supply { - option (gogoproto.equal) = true; - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; + option deprecated = true; + + option (gogoproto.equal) = true; + option (gogoproto.goproto_getters) = false; - option (cosmos_proto.implements_interface) = "*github.com/cosmos/cosmos-sdk/x/bank/exported.SupplyI"; + option (cosmos_proto.implements_interface) = "*github.com/cosmos/cosmos-sdk/x/bank/legacy/v040.SupplyI"; repeated cosmos.base.v1beta1.Coin total = 1 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; @@ -82,4 +84,9 @@ message Metadata { // display indicates the suggested denom that should be // displayed in clients. string display = 4; + // name defines the name of the token (eg: Cosmos Atom) + string name = 5; + // symbol is the token symbol usually shown on exchanges (eg: ATOM). This can + // be the same as the display. + string symbol = 6; } diff --git a/third_party/proto/cosmos/bank/v1beta1/genesis.proto b/third_party/proto/cosmos/bank/v1beta1/genesis.proto index 25c80a38b..8fd7329a0 100644 --- a/third_party/proto/cosmos/bank/v1beta1/genesis.proto +++ b/third_party/proto/cosmos/bank/v1beta1/genesis.proto @@ -15,7 +15,8 @@ message GenesisState { // balances is an array containing the balances of all the accounts. repeated Balance balances = 2 [(gogoproto.nullable) = false]; - // supply represents the total supply. + // 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. repeated cosmos.base.v1beta1.Coin supply = 3 [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false]; diff --git a/third_party/proto/cosmos/bank/v1beta1/query.proto b/third_party/proto/cosmos/bank/v1beta1/query.proto index bc5e29137..e3a464f8b 100644 --- a/third_party/proto/cosmos/bank/v1beta1/query.proto +++ b/third_party/proto/cosmos/bank/v1beta1/query.proto @@ -90,7 +90,13 @@ message QueryAllBalancesResponse { // QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC // method. -message QueryTotalSupplyRequest {} +message QueryTotalSupplyRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} // QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC // method @@ -98,6 +104,9 @@ message QueryTotalSupplyResponse { // supply is the supply of the coins repeated cosmos.base.v1beta1.Coin supply = 1 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; } // QuerySupplyOfRequest is the request type for the Query/SupplyOf RPC method. diff --git a/third_party/proto/cosmos/base/query/v1beta1/pagination.proto b/third_party/proto/cosmos/base/query/v1beta1/pagination.proto index 2a8cbcced..7ee60f18d 100644 --- a/third_party/proto/cosmos/base/query/v1beta1/pagination.proto +++ b/third_party/proto/cosmos/base/query/v1beta1/pagination.proto @@ -30,6 +30,9 @@ message PageRequest { // count_total is only respected when offset is used. It is ignored when key // is set. bool count_total = 4; + + // reverse is set to true indicates that, results to be returned in the descending order. + bool reverse = 5; } // PageResponse is to be embedded in gRPC response messages where the diff --git a/third_party/proto/cosmos/base/reflection/v1beta1/reflection.proto b/third_party/proto/cosmos/base/reflection/v1beta1/reflection.proto index 22670e72b..8ac4f1158 100644 --- a/third_party/proto/cosmos/base/reflection/v1beta1/reflection.proto +++ b/third_party/proto/cosmos/base/reflection/v1beta1/reflection.proto @@ -41,4 +41,4 @@ message ListImplementationsRequest { // RPC. message ListImplementationsResponse { repeated string implementation_message_names = 1; -} +} \ No newline at end of file diff --git a/third_party/proto/cosmos/base/reflection/v2alpha1/reflection.proto b/third_party/proto/cosmos/base/reflection/v2alpha1/reflection.proto new file mode 100644 index 000000000..3e8e94048 --- /dev/null +++ b/third_party/proto/cosmos/base/reflection/v2alpha1/reflection.proto @@ -0,0 +1,217 @@ +syntax = "proto3"; +package cosmos.base.reflection.v2alpha1; + +import "google/api/annotations.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/server/grpc/reflection/v2alpha1"; + +// AppDescriptor describes a cosmos-sdk based application +message AppDescriptor { + // AuthnDescriptor provides information on how to authenticate transactions on the application + // NOTE: experimental and subject to change in future releases. + AuthnDescriptor authn = 1; + // chain provides the chain descriptor + ChainDescriptor chain = 2; + // codec provides metadata information regarding codec related types + CodecDescriptor codec = 3; + // configuration provides metadata information regarding the sdk.Config type + ConfigurationDescriptor configuration = 4; + // query_services provides metadata information regarding the available queriable endpoints + QueryServicesDescriptor query_services = 5; + // tx provides metadata information regarding how to send transactions to the given application + TxDescriptor tx = 6; +} + +// TxDescriptor describes the accepted transaction type +message 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. + string fullname = 1; + // msgs lists the accepted application messages (sdk.Msg) + repeated MsgDescriptor msgs = 2; +} + +// AuthnDescriptor provides information on how to sign transactions without relying +// on the online RPCs GetTxMetadata and CombineUnsignedTxAndSignatures +message AuthnDescriptor { + // sign_modes defines the supported signature algorithm + repeated SigningModeDescriptor sign_modes = 1; +} + +// 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 +message SigningModeDescriptor { + // name defines the unique name of the signing mode + string name = 1; + // number is the unique int32 identifier for the sign_mode enum + int32 number = 2; + // 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 + string authn_info_provider_method_fullname = 3; +} + +// ChainDescriptor describes chain information of the application +message ChainDescriptor { + // id is the chain id + string id = 1; +} + +// CodecDescriptor describes the registered interfaces and provides metadata information on the types +message CodecDescriptor { + // interfaces is a list of the registerted interfaces descriptors + repeated InterfaceDescriptor interfaces = 1; +} + +// InterfaceDescriptor describes the implementation of an interface +message InterfaceDescriptor { + // fullname is the name of the interface + string fullname = 1; + // interface_accepting_messages contains information regarding the proto messages which contain the interface as + // google.protobuf.Any field + repeated InterfaceAcceptingMessageDescriptor interface_accepting_messages = 2; + // interface_implementers is a list of the descriptors of the interface implementers + repeated InterfaceImplementerDescriptor interface_implementers = 3; +} + +// InterfaceImplementerDescriptor describes an interface implementer +message InterfaceImplementerDescriptor { + // fullname is the protobuf queryable name of the interface implementer + string fullname = 1; + // 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 + string type_url = 2; +} + +// InterfaceAcceptingMessageDescriptor describes a protobuf message which contains +// an interface represented as a google.protobuf.Any +message InterfaceAcceptingMessageDescriptor { + // fullname is the protobuf fullname of the type containing the interface + string fullname = 1; + // 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) + repeated string field_descriptor_names = 2; +} + +// ConfigurationDescriptor contains metadata information on the sdk.Config +message ConfigurationDescriptor { + // bech32_account_address_prefix is the account address prefix + string bech32_account_address_prefix = 1; +} + +// MsgDescriptor describes a cosmos-sdk message that can be delivered with a transaction +message MsgDescriptor { + // msg_type_url contains the TypeURL of a sdk.Msg. + string msg_type_url = 1; +} + +// ReflectionService defines a service for application reflection. +service ReflectionService { + // GetAuthnDescriptor returns information on how to authenticate transactions in the application + // NOTE: this RPC is still experimental and might be subject to breaking changes or removal in + // future releases of the cosmos-sdk. + rpc GetAuthnDescriptor(GetAuthnDescriptorRequest) returns (GetAuthnDescriptorResponse) { + option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/authn"; + } + // GetChainDescriptor returns the description of the chain + rpc GetChainDescriptor(GetChainDescriptorRequest) returns (GetChainDescriptorResponse) { + option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/chain"; + }; + // GetCodecDescriptor returns the descriptor of the codec of the application + rpc GetCodecDescriptor(GetCodecDescriptorRequest) returns (GetCodecDescriptorResponse) { + option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/codec"; + } + // GetConfigurationDescriptor returns the descriptor for the sdk.Config of the application + rpc GetConfigurationDescriptor(GetConfigurationDescriptorRequest) returns (GetConfigurationDescriptorResponse) { + option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/configuration"; + } + // GetQueryServicesDescriptor returns the available gRPC queryable services of the application + rpc GetQueryServicesDescriptor(GetQueryServicesDescriptorRequest) returns (GetQueryServicesDescriptorResponse) { + option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/query_services"; + } + // GetTxDescriptor returns information on the used transaction object and available msgs that can be used + rpc GetTxDescriptor(GetTxDescriptorRequest) returns (GetTxDescriptorResponse) { + option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/tx_descriptor"; + } +} + +// GetAuthnDescriptorRequest is the request used for the GetAuthnDescriptor RPC +message GetAuthnDescriptorRequest {} +// GetAuthnDescriptorResponse is the response returned by the GetAuthnDescriptor RPC +message GetAuthnDescriptorResponse { + // authn describes how to authenticate to the application when sending transactions + AuthnDescriptor authn = 1; +} + +// GetChainDescriptorRequest is the request used for the GetChainDescriptor RPC +message GetChainDescriptorRequest {} +// GetChainDescriptorResponse is the response returned by the GetChainDescriptor RPC +message GetChainDescriptorResponse { + // chain describes application chain information + ChainDescriptor chain = 1; +} + +// GetCodecDescriptorRequest is the request used for the GetCodecDescriptor RPC +message GetCodecDescriptorRequest {} +// GetCodecDescriptorResponse is the response returned by the GetCodecDescriptor RPC +message GetCodecDescriptorResponse { + // codec describes the application codec such as registered interfaces and implementations + CodecDescriptor codec = 1; +} + +// GetConfigurationDescriptorRequest is the request used for the GetConfigurationDescriptor RPC +message GetConfigurationDescriptorRequest {} +// GetConfigurationDescriptorResponse is the response returned by the GetConfigurationDescriptor RPC +message GetConfigurationDescriptorResponse { + // config describes the application's sdk.Config + ConfigurationDescriptor config = 1; +} + +// GetQueryServicesDescriptorRequest is the request used for the GetQueryServicesDescriptor RPC +message GetQueryServicesDescriptorRequest {} +// GetQueryServicesDescriptorResponse is the response returned by the GetQueryServicesDescriptor RPC +message GetQueryServicesDescriptorResponse { + // queries provides information on the available queryable services + QueryServicesDescriptor queries = 1; +} + +// GetTxDescriptorRequest is the request used for the GetTxDescriptor RPC +message GetTxDescriptorRequest {} +// GetTxDescriptorResponse is the response returned by the GetTxDescriptor RPC +message GetTxDescriptorResponse { + // tx provides information on msgs that can be forwarded to the application + // alongside the accepted transaction protobuf type + TxDescriptor tx = 1; +} + +// QueryServicesDescriptor contains the list of cosmos-sdk queriable services +message QueryServicesDescriptor { + // query_services is a list of cosmos-sdk QueryServiceDescriptor + repeated QueryServiceDescriptor query_services = 1; +} + +// QueryServiceDescriptor describes a cosmos-sdk queryable service +message QueryServiceDescriptor { + // fullname is the protobuf fullname of the service descriptor + string fullname = 1; + // is_module describes if this service is actually exposed by an application's module + bool is_module = 2; + // methods provides a list of query service methods + repeated QueryMethodDescriptor methods = 3; +} + +// 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 +message QueryMethodDescriptor { + // name is the protobuf name (not fullname) of the method + string name = 1; + // full_query_path is the path that can be used to query + // this method via tendermint abci.Query + string full_query_path = 2; +} diff --git a/third_party/proto/cosmos/base/store/v1beta1/listening.proto b/third_party/proto/cosmos/base/store/v1beta1/listening.proto new file mode 100644 index 000000000..186ecee4b --- /dev/null +++ b/third_party/proto/cosmos/base/store/v1beta1/listening.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; +package cosmos.base.store.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/store/types"; + +// 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 +message StoreKVPair { + string store_key = 1; // the store key for the KVStore this pair originates from + bool delete = 2; // true indicates a delete operation, false indicates a set operation + bytes key = 3; + bytes value = 4; +} diff --git a/third_party/proto/cosmos/crypto/ed25519/keys.proto b/third_party/proto/cosmos/crypto/ed25519/keys.proto index bed9c29cc..6ffec3448 100644 --- a/third_party/proto/cosmos/crypto/ed25519/keys.proto +++ b/third_party/proto/cosmos/crypto/ed25519/keys.proto @@ -5,18 +5,19 @@ import "gogoproto/gogo.proto"; option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519"; -// PubKey defines a ed25519 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. +// 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. message PubKey { option (gogoproto.goproto_stringer) = false; bytes key = 1 [(gogoproto.casttype) = "crypto/ed25519.PublicKey"]; } -// PrivKey defines a ed25519 private key. +// Deprecated: PrivKey defines a ed25519 private key. +// NOTE: ed25519 keys must not be used in SDK apps except in a tendermint validator context. message PrivKey { bytes key = 1 [(gogoproto.casttype) = "crypto/ed25519.PrivateKey"]; } diff --git a/third_party/proto/cosmos/crypto/secp256r1/keys.proto b/third_party/proto/cosmos/crypto/secp256r1/keys.proto new file mode 100644 index 000000000..b0aad99d1 --- /dev/null +++ b/third_party/proto/cosmos/crypto/secp256r1/keys.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; +package cosmos.crypto.secp256r1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/secp256r1"; +option (gogoproto.messagename_all) = true; +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_getters_all) = false; + +// PubKey defines a secp256r1 ECDSA public key. +message PubKey { + // Point on secp256r1 curve in a compressed representation as specified in section + // 4.3.6 of ANSI X9.62: https://webstore.ansi.org/standards/ascx9/ansix9621998 + bytes key = 1 [(gogoproto.customtype) = "ecdsaPK"]; +} + +// PrivKey defines a secp256r1 ECDSA private key. +message PrivKey { + // secret number serialized using big-endian encoding + bytes secret = 1 [(gogoproto.customtype) = "ecdsaSK"]; +} diff --git a/third_party/proto/cosmos/feegrant/v1beta1/feegrant.proto b/third_party/proto/cosmos/feegrant/v1beta1/feegrant.proto new file mode 100644 index 000000000..dfd9b7826 --- /dev/null +++ b/third_party/proto/cosmos/feegrant/v1beta1/feegrant.proto @@ -0,0 +1,77 @@ +syntax = "proto3"; +package cosmos.feegrant.v1beta1; + +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/duration.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant"; + +// BasicAllowance implements Allowance with a one-time grant of tokens +// that optionally expires. The grantee can use up to SpendLimit to cover fees. +message BasicAllowance { + option (cosmos_proto.implements_interface) = "FeeAllowanceI"; + + // spend_limit specifies the maximum amount of tokens that can be spent + // by this allowance and will be updated as tokens are spent. If it is + // empty, there is no spend limit and any amount of coins can be spent. + repeated cosmos.base.v1beta1.Coin spend_limit = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + + // expiration specifies an optional time when this allowance expires + google.protobuf.Timestamp expiration = 2 [(gogoproto.stdtime) = true]; +} + +// PeriodicAllowance extends Allowance to allow for both a maximum cap, +// as well as a limit per time period. +message PeriodicAllowance { + option (cosmos_proto.implements_interface) = "FeeAllowanceI"; + + // basic specifies a struct of `BasicAllowance` + BasicAllowance basic = 1 [(gogoproto.nullable) = false]; + + // period specifies the time duration in which period_spend_limit coins can + // be spent before that allowance is reset + google.protobuf.Duration period = 2 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; + + // period_spend_limit specifies the maximum number of coins that can be spent + // in the period + repeated cosmos.base.v1beta1.Coin period_spend_limit = 3 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + + // period_can_spend is the number of coins left to be spent before the period_reset time + repeated cosmos.base.v1beta1.Coin period_can_spend = 4 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + + // 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 + google.protobuf.Timestamp period_reset = 5 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; +} + +// AllowedMsgAllowance creates allowance only for specified message types. +message AllowedMsgAllowance { + option (gogoproto.goproto_getters) = false; + option (cosmos_proto.implements_interface) = "FeeAllowanceI"; + + // allowance can be any of basic and filtered fee allowance. + google.protobuf.Any allowance = 1 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"]; + + // allowed_messages are the messages for which the grantee has the access. + repeated string allowed_messages = 2; +} + +// Grant is stored in the KVStore to record a grant with full context +message Grant { + // granter is the address of the user granting an allowance of their funds. + string granter = 1; + + // grantee is the address of the user being granted an allowance of another user's funds. + string grantee = 2; + + // allowance can be any of basic and filtered fee allowance. + google.protobuf.Any allowance = 3 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"]; +} diff --git a/third_party/proto/cosmos/feegrant/v1beta1/genesis.proto b/third_party/proto/cosmos/feegrant/v1beta1/genesis.proto new file mode 100644 index 000000000..4c1e51fdd --- /dev/null +++ b/third_party/proto/cosmos/feegrant/v1beta1/genesis.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; +package cosmos.feegrant.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos/feegrant/v1beta1/feegrant.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant"; + +// GenesisState contains a set of fee allowances, persisted from the store +message GenesisState { + repeated Grant allowances = 1 [(gogoproto.nullable) = false]; +} diff --git a/third_party/proto/cosmos/feegrant/v1beta1/query.proto b/third_party/proto/cosmos/feegrant/v1beta1/query.proto new file mode 100644 index 000000000..00ea598b1 --- /dev/null +++ b/third_party/proto/cosmos/feegrant/v1beta1/query.proto @@ -0,0 +1,54 @@ +syntax = "proto3"; +package cosmos.feegrant.v1beta1; + +import "cosmos/feegrant/v1beta1/feegrant.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "google/api/annotations.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant"; + +// Query defines the gRPC querier service. +service Query { + + // Allowance returns fee granted to the grantee by the granter. + rpc Allowance(QueryAllowanceRequest) returns (QueryAllowanceResponse) { + option (google.api.http).get = "/cosmos/feegrant/v1beta1/allowance/{granter}/{grantee}"; + } + + // Allowances returns all the grants for address. + rpc Allowances(QueryAllowancesRequest) returns (QueryAllowancesResponse) { + option (google.api.http).get = "/cosmos/feegrant/v1beta1/allowances/{grantee}"; + } +} + +// QueryAllowanceRequest is the request type for the Query/Allowance RPC method. +message QueryAllowanceRequest { + // granter is the address of the user granting an allowance of their funds. + string granter = 1; + + // grantee is the address of the user being granted an allowance of another user's funds. + string grantee = 2; +} + +// QueryAllowanceResponse is the response type for the Query/Allowance RPC method. +message QueryAllowanceResponse { + // allowance is a allowance granted for grantee by granter. + cosmos.feegrant.v1beta1.Grant allowance = 1; +} + +// QueryAllowancesRequest is the request type for the Query/Allowances RPC method. +message QueryAllowancesRequest { + string grantee = 1; + + // pagination defines an pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryAllowancesResponse is the response type for the Query/Allowances RPC method. +message QueryAllowancesResponse { + // allowances are allowance's granted for grantee by granter. + repeated cosmos.feegrant.v1beta1.Grant allowances = 1; + + // pagination defines an pagination for the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} diff --git a/third_party/proto/cosmos/feegrant/v1beta1/tx.proto b/third_party/proto/cosmos/feegrant/v1beta1/tx.proto new file mode 100644 index 000000000..66c27a798 --- /dev/null +++ b/third_party/proto/cosmos/feegrant/v1beta1/tx.proto @@ -0,0 +1,48 @@ +syntax = "proto3"; +package cosmos.feegrant.v1beta1; + +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; +import "cosmos_proto/cosmos.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant"; + +// Msg defines the feegrant msg service. +service Msg { + + // GrantAllowance grants fee allowance to the grantee on the granter's + // account with the provided expiration time. + rpc GrantAllowance(MsgGrantAllowance) returns (MsgGrantAllowanceResponse); + + // RevokeAllowance revokes any fee allowance of granter's account that + // has been granted to the grantee. + rpc RevokeAllowance(MsgRevokeAllowance) returns (MsgRevokeAllowanceResponse); +} + +// MsgGrantAllowance adds permission for Grantee to spend up to Allowance +// of fees from the account of Granter. +message MsgGrantAllowance { + // granter is the address of the user granting an allowance of their funds. + string granter = 1; + + // grantee is the address of the user being granted an allowance of another user's funds. + string grantee = 2; + + // allowance can be any of basic and filtered fee allowance. + google.protobuf.Any allowance = 3 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"]; +} + +// MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. +message MsgGrantAllowanceResponse {} + +// MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. +message MsgRevokeAllowance { + // granter is the address of the user granting an allowance of their funds. + string granter = 1; + + // grantee is the address of the user being granted an allowance of another user's funds. + string grantee = 2; +} + +// MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. +message MsgRevokeAllowanceResponse {} diff --git a/third_party/proto/cosmos/gov/v1beta1/gov.proto b/third_party/proto/cosmos/gov/v1beta1/gov.proto index 1d72e6432..392534c53 100644 --- a/third_party/proto/cosmos/gov/v1beta1/gov.proto +++ b/third_party/proto/cosmos/gov/v1beta1/gov.proto @@ -29,6 +29,16 @@ enum VoteOption { VOTE_OPTION_NO_WITH_VETO = 4 [(gogoproto.enumvalue_customname) = "OptionNoWithVeto"]; } +// WeightedVoteOption defines a unit of vote for vote split. +message WeightedVoteOption { + VoteOption option = 1; + string weight = 2 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false, + (gogoproto.moretags) = "yaml:\"weight\"" + ]; +} + // TextProposal defines a standard text proposal whose changes need to be // manually updated in case of approval. message TextProposal { @@ -119,9 +129,11 @@ message Vote { option (gogoproto.goproto_stringer) = false; option (gogoproto.equal) = false; - uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""]; - string voter = 2; - VoteOption option = 3; + uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""]; + string voter = 2; + reserved 3; + reserved "option"; + repeated WeightedVoteOption options = 4 [(gogoproto.nullable) = false]; } // DepositParams defines the params for deposits on governance proposals. diff --git a/third_party/proto/cosmos/gov/v1beta1/tx.proto b/third_party/proto/cosmos/gov/v1beta1/tx.proto index d4f0c1f99..d717c26c4 100644 --- a/third_party/proto/cosmos/gov/v1beta1/tx.proto +++ b/third_party/proto/cosmos/gov/v1beta1/tx.proto @@ -17,6 +17,9 @@ service Msg { // Vote defines a method to add a vote on a specific proposal. rpc Vote(MsgVote) returns (MsgVoteResponse); + // VoteWeighted defines a method to add a weighted vote on a specific proposal. + rpc VoteWeighted(MsgVoteWeighted) returns (MsgVoteWeightedResponse); + // Deposit defines a method to add deposit on a specific proposal. rpc Deposit(MsgDeposit) returns (MsgDepositResponse); } @@ -58,6 +61,21 @@ message MsgVote { // MsgVoteResponse defines the Msg/Vote response type. message MsgVoteResponse {} +// MsgVoteWeighted defines a message to cast a vote. +message MsgVoteWeighted { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + option (gogoproto.stringer) = false; + option (gogoproto.goproto_getters) = false; + + uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""]; + string voter = 2; + repeated WeightedVoteOption options = 3 [(gogoproto.nullable) = false]; +} + +// MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. +message MsgVoteWeightedResponse {} + // MsgDeposit defines a message to submit a deposit to an existing proposal. message MsgDeposit { option (gogoproto.equal) = false; diff --git a/third_party/proto/cosmos/slashing/v1beta1/slashing.proto b/third_party/proto/cosmos/slashing/v1beta1/slashing.proto index 657a90f1b..882a0fb60 100644 --- a/third_party/proto/cosmos/slashing/v1beta1/slashing.proto +++ b/third_party/proto/cosmos/slashing/v1beta1/slashing.proto @@ -15,17 +15,20 @@ message ValidatorSigningInfo { option (gogoproto.goproto_stringer) = false; string address = 1; - // height at which validator was first a candidate OR was unjailed + // Height at which validator was first a candidate OR was unjailed int64 start_height = 2 [(gogoproto.moretags) = "yaml:\"start_height\""]; - // index offset into signed block bit array + // 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`. int64 index_offset = 3 [(gogoproto.moretags) = "yaml:\"index_offset\""]; - // timestamp validator cannot be unjailed until + // Timestamp until which the validator is jailed due to liveness downtime. google.protobuf.Timestamp jailed_until = 4 [(gogoproto.moretags) = "yaml:\"jailed_until\"", (gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - // whether or not a validator has been tombstoned (killed out of validator - // set) + // 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. bool tombstoned = 5; - // missed blocks counter (to avoid scanning the array every time) + // A counter kept to avoid unnecessary array reads. + // Note that `Sum(MissedBlocksBitArray)` always equals `MissedBlocksCounter`. int64 missed_blocks_counter = 6 [(gogoproto.moretags) = "yaml:\"missed_blocks_counter\""]; } diff --git a/third_party/proto/cosmos/staking/v1beta1/authz.proto b/third_party/proto/cosmos/staking/v1beta1/authz.proto new file mode 100644 index 000000000..6345612f2 --- /dev/null +++ b/third_party/proto/cosmos/staking/v1beta1/authz.proto @@ -0,0 +1,43 @@ +syntax = "proto3"; +package cosmos.staking.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; + +// StakeAuthorization defines authorization for delegate/undelegate/redelegate. +message StakeAuthorization { + option (cosmos_proto.implements_interface) = "Authorization"; + + // 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. + cosmos.base.v1beta1.Coin max_tokens = 1 [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin"]; + // validators is the oneof that represents either allow_list or deny_list + oneof validators { + // allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's + // account. + Validators allow_list = 2; + // deny_list specifies list of validator addresses to whom grantee can not delegate tokens. + Validators deny_list = 3; + } + // Validators defines list of validator addresses. + message Validators { + repeated string address = 1; + } + // authorization_type defines one of AuthorizationType. + AuthorizationType authorization_type = 4; +} + +// AuthorizationType defines the type of staking module authorization type +enum AuthorizationType { + // AUTHORIZATION_TYPE_UNSPECIFIED specifies an unknown authorization type + AUTHORIZATION_TYPE_UNSPECIFIED = 0; + // AUTHORIZATION_TYPE_DELEGATE defines an authorization type for Msg/Delegate + AUTHORIZATION_TYPE_DELEGATE = 1; + // AUTHORIZATION_TYPE_UNDELEGATE defines an authorization type for Msg/Undelegate + AUTHORIZATION_TYPE_UNDELEGATE = 2; + // AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for Msg/BeginRedelegate + AUTHORIZATION_TYPE_REDELEGATE = 3; +} diff --git a/third_party/proto/cosmos/staking/v1beta1/staking.proto b/third_party/proto/cosmos/staking/v1beta1/staking.proto index 76e9599e2..651cd9177 100644 --- a/third_party/proto/cosmos/staking/v1beta1/staking.proto +++ b/third_party/proto/cosmos/staking/v1beta1/staking.proto @@ -282,6 +282,12 @@ message Params { uint32 historical_entries = 4 [(gogoproto.moretags) = "yaml:\"historical_entries\""]; // bond_denom defines the bondable coin denomination. string bond_denom = 5 [(gogoproto.moretags) = "yaml:\"bond_denom\""]; + // power_reduction is the amount of staking tokens required for 1 unit of consensus-engine power + string power_reduction = 6 [ + (gogoproto.moretags) = "yaml:\"power_reduction\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; } // DelegationResponse is equivalent to Delegation except that it contains a diff --git a/third_party/proto/cosmos/tx/v1beta1/service.proto b/third_party/proto/cosmos/tx/v1beta1/service.proto index 115adf1c1..646175c00 100644 --- a/third_party/proto/cosmos/tx/v1beta1/service.proto +++ b/third_party/proto/cosmos/tx/v1beta1/service.proto @@ -101,7 +101,10 @@ message BroadcastTxResponse { // RPC method. message SimulateRequest { // tx is the transaction to simulate. - cosmos.tx.v1beta1.Tx tx = 1; + // Deprecated. Send raw tx bytes instead. + cosmos.tx.v1beta1.Tx tx = 1 [deprecated = true]; + // tx_bytes is the raw transaction. + bytes tx_bytes = 2; } // SimulateResponse is the response type for the diff --git a/third_party/proto/cosmos/tx/v1beta1/tx.proto b/third_party/proto/cosmos/tx/v1beta1/tx.proto index 2b02874cc..6d5caf12c 100644 --- a/third_party/proto/cosmos/tx/v1beta1/tx.proto +++ b/third_party/proto/cosmos/tx/v1beta1/tx.proto @@ -74,7 +74,9 @@ message TxBody { // transaction. repeated google.protobuf.Any messages = 1; - // memo is any arbitrary memo to be added to the transaction + // 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 https://github.com/cosmos/cosmos-sdk/issues/9122). string memo = 2; // timeout is the block height after which this transaction will not diff --git a/third_party/proto/cosmos/upgrade/v1beta1/query.proto b/third_party/proto/cosmos/upgrade/v1beta1/query.proto index 9eab27e76..0fc6fd856 100644 --- a/third_party/proto/cosmos/upgrade/v1beta1/query.proto +++ b/third_party/proto/cosmos/upgrade/v1beta1/query.proto @@ -64,5 +64,7 @@ message QueryUpgradedConsensusStateRequest { // QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState // RPC method. message QueryUpgradedConsensusStateResponse { - google.protobuf.Any upgraded_consensus_state = 1; + reserved 1; + + bytes upgraded_consensus_state = 2; } diff --git a/third_party/proto/cosmos/upgrade/v1beta1/upgrade.proto b/third_party/proto/cosmos/upgrade/v1beta1/upgrade.proto index 6d6839ca5..7b767dedf 100644 --- a/third_party/proto/cosmos/upgrade/v1beta1/upgrade.proto +++ b/third_party/proto/cosmos/upgrade/v1beta1/upgrade.proto @@ -22,9 +22,10 @@ message Plan { // reached and the software will exit. string name = 1; - // The time after which the upgrade must be performed. - // Leave set to its zero value to use a pre-defined Height instead. - google.protobuf.Timestamp time = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + // Time based upgrades have been deprecated. Time based upgrade logic + // has been removed from the SDK. + reserved 2; + reserved "time"; // The height at which the upgrade must be performed. // Only used if Time is not set. @@ -34,12 +35,10 @@ message Plan { // such as a git commit that validators could automatically upgrade to string info = 4; - // IBC-enabled chains can opt-in to including the upgraded client state in its upgrade plan - // 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 - google.protobuf.Any upgraded_client_state = 5 [(gogoproto.moretags) = "yaml:\"upgraded_client_state\""]; + // UpgradedClientState field has been deprecated. IBC upgrade logic has been + // moved to the IBC module in the sub module 02-client. + reserved 5; + reserved "option"; } // SoftwareUpgradeProposal is a gov Content type for initiating a software diff --git a/third_party/proto/ibc/applications/transfer/v1/genesis.proto b/third_party/proto/ibc/applications/transfer/v1/genesis.proto index 98cf2296d..9c6b78ac7 100644 --- a/third_party/proto/ibc/applications/transfer/v1/genesis.proto +++ b/third_party/proto/ibc/applications/transfer/v1/genesis.proto @@ -1,10 +1,11 @@ syntax = "proto3"; + package ibc.applications.transfer.v1; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/types"; +option go_package = "github.com/cosmos/ibc-go/modules/apps/transfer/types"; -import "gogoproto/gogo.proto"; import "ibc/applications/transfer/v1/transfer.proto"; +import "gogoproto/gogo.proto"; // GenesisState defines the ibc-transfer genesis state message GenesisState { diff --git a/third_party/proto/ibc/applications/transfer/v1/query.proto b/third_party/proto/ibc/applications/transfer/v1/query.proto index e9cbd02a3..cd428413e 100644 --- a/third_party/proto/ibc/applications/transfer/v1/query.proto +++ b/third_party/proto/ibc/applications/transfer/v1/query.proto @@ -1,4 +1,5 @@ syntax = "proto3"; + package ibc.applications.transfer.v1; import "gogoproto/gogo.proto"; @@ -6,23 +7,23 @@ import "cosmos/base/query/v1beta1/pagination.proto"; import "ibc/applications/transfer/v1/transfer.proto"; import "google/api/annotations.proto"; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/types"; +option go_package = "github.com/cosmos/ibc-go/modules/apps/transfer/types"; // Query provides defines the gRPC querier service. service Query { // DenomTrace queries a denomination trace information. rpc DenomTrace(QueryDenomTraceRequest) returns (QueryDenomTraceResponse) { - option (google.api.http).get = "/ibc/applications/transfer/v1beta1/denom_traces/{hash}"; + option (google.api.http).get = "/ibc/apps/transfer/v1/denom_traces/{hash}"; } // DenomTraces queries all denomination traces. rpc DenomTraces(QueryDenomTracesRequest) returns (QueryDenomTracesResponse) { - option (google.api.http).get = "/ibc/applications/transfer/v1beta1/denom_traces"; + option (google.api.http).get = "/ibc/apps/transfer/v1/denom_traces"; } // Params queries all parameters of the ibc-transfer module. rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/ibc/applications/transfer/v1beta1/params"; + option (google.api.http).get = "/ibc/apps/transfer/v1/params"; } } diff --git a/third_party/proto/ibc/applications/transfer/v1/transfer.proto b/third_party/proto/ibc/applications/transfer/v1/transfer.proto index b388c3b87..b1c41f6a5 100644 --- a/third_party/proto/ibc/applications/transfer/v1/transfer.proto +++ b/third_party/proto/ibc/applications/transfer/v1/transfer.proto @@ -1,7 +1,8 @@ syntax = "proto3"; + package ibc.applications.transfer.v1; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/types"; +option go_package = "github.com/cosmos/ibc-go/modules/apps/transfer/types"; import "gogoproto/gogo.proto"; diff --git a/third_party/proto/ibc/applications/transfer/v1/tx.proto b/third_party/proto/ibc/applications/transfer/v1/tx.proto index a0f0827aa..eb56b4702 100644 --- a/third_party/proto/ibc/applications/transfer/v1/tx.proto +++ b/third_party/proto/ibc/applications/transfer/v1/tx.proto @@ -1,7 +1,8 @@ syntax = "proto3"; + package ibc.applications.transfer.v1; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/types"; +option go_package = "github.com/cosmos/ibc-go/modules/apps/transfer/types"; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; diff --git a/third_party/proto/ibc/core/channel/v1/channel.proto b/third_party/proto/ibc/core/channel/v1/channel.proto index 302a48068..edb39d04b 100644 --- a/third_party/proto/ibc/core/channel/v1/channel.proto +++ b/third_party/proto/ibc/core/channel/v1/channel.proto @@ -1,7 +1,8 @@ syntax = "proto3"; + package ibc.core.channel.v1; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types"; +option go_package = "github.com/cosmos/ibc-go/modules/core/04-channel/types"; import "gogoproto/gogo.proto"; import "ibc/core/client/v1/client.proto"; diff --git a/third_party/proto/ibc/core/channel/v1/genesis.proto b/third_party/proto/ibc/core/channel/v1/genesis.proto index d3b2c0424..75bf1fdb0 100644 --- a/third_party/proto/ibc/core/channel/v1/genesis.proto +++ b/third_party/proto/ibc/core/channel/v1/genesis.proto @@ -1,7 +1,8 @@ syntax = "proto3"; + package ibc.core.channel.v1; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types"; +option go_package = "github.com/cosmos/ibc-go/modules/core/04-channel/types"; import "gogoproto/gogo.proto"; import "ibc/core/channel/v1/channel.proto"; diff --git a/third_party/proto/ibc/core/channel/v1/query.proto b/third_party/proto/ibc/core/channel/v1/query.proto index d9e3ceb8a..194fe8677 100644 --- a/third_party/proto/ibc/core/channel/v1/query.proto +++ b/third_party/proto/ibc/core/channel/v1/query.proto @@ -1,6 +1,9 @@ syntax = "proto3"; + package ibc.core.channel.v1; +option go_package = "github.com/cosmos/ibc-go/modules/core/04-channel/types"; + import "ibc/core/client/v1/client.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; import "ibc/core/channel/v1/channel.proto"; @@ -8,88 +11,92 @@ import "google/api/annotations.proto"; import "google/protobuf/any.proto"; import "gogoproto/gogo.proto"; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types"; - // Query provides defines the gRPC querier service service Query { // Channel queries an IBC Channel. rpc Channel(QueryChannelRequest) returns (QueryChannelResponse) { - option (google.api.http).get = "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}"; + option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}"; } // Channels queries all the IBC channels of a chain. rpc Channels(QueryChannelsRequest) returns (QueryChannelsResponse) { - option (google.api.http).get = "/ibc/core/channel/v1beta1/channels"; + option (google.api.http).get = "/ibc/core/channel/v1/channels"; } // ConnectionChannels queries all the channels associated with a connection // end. rpc ConnectionChannels(QueryConnectionChannelsRequest) returns (QueryConnectionChannelsResponse) { - option (google.api.http).get = "/ibc/core/channel/v1beta1/connections/{connection}/channels"; + option (google.api.http).get = "/ibc/core/channel/v1/connections/{connection}/channels"; } // ChannelClientState queries for the client state for the channel associated // with the provided channel identifiers. rpc ChannelClientState(QueryChannelClientStateRequest) returns (QueryChannelClientStateResponse) { - option (google.api.http).get = "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/client_state"; + option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" + "ports/{port_id}/client_state"; } // ChannelConsensusState queries for the consensus state for the channel // associated with the provided channel identifiers. rpc ChannelConsensusState(QueryChannelConsensusStateRequest) returns (QueryChannelConsensusStateResponse) { - option (google.api.http).get = - "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/consensus_state/revision/" - "{revision_number}/height/{revision_height}"; + option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" + "ports/{port_id}/consensus_state/revision/" + "{revision_number}/height/{revision_height}"; } // PacketCommitment queries a stored packet commitment hash. rpc PacketCommitment(QueryPacketCommitmentRequest) returns (QueryPacketCommitmentResponse) { - option (google.api.http).get = - "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence}"; + option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/" + "packet_commitments/{sequence}"; } // PacketCommitments returns all the packet commitments hashes associated // with a channel. rpc PacketCommitments(QueryPacketCommitmentsRequest) returns (QueryPacketCommitmentsResponse) { - option (google.api.http).get = "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments"; + option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" + "ports/{port_id}/packet_commitments"; } - // PacketReceipt queries if a given packet sequence has been received on the queried chain + // PacketReceipt queries if a given packet sequence has been received on the + // queried chain rpc PacketReceipt(QueryPacketReceiptRequest) returns (QueryPacketReceiptResponse) { - option (google.api.http).get = - "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_receipts/{sequence}"; + option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" + "ports/{port_id}/packet_receipts/{sequence}"; } // PacketAcknowledgement queries a stored packet acknowledgement hash. rpc PacketAcknowledgement(QueryPacketAcknowledgementRequest) returns (QueryPacketAcknowledgementResponse) { - option (google.api.http).get = - "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence}"; + option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" + "ports/{port_id}/packet_acks/{sequence}"; } // PacketAcknowledgements returns all the packet acknowledgements associated // with a channel. rpc PacketAcknowledgements(QueryPacketAcknowledgementsRequest) returns (QueryPacketAcknowledgementsResponse) { - option (google.api.http).get = - "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acknowledgements"; + option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" + "ports/{port_id}/packet_acknowledgements"; } // UnreceivedPackets returns all the unreceived IBC packets associated with a // channel and sequences. rpc UnreceivedPackets(QueryUnreceivedPacketsRequest) returns (QueryUnreceivedPacketsResponse) { - option (google.api.http).get = "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/" + option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/" + "packet_commitments/" "{packet_commitment_sequences}/unreceived_packets"; } - // UnreceivedAcks returns all the unreceived IBC acknowledgements associated with a - // channel and sequences. + // UnreceivedAcks returns all the unreceived IBC acknowledgements associated + // with a channel and sequences. rpc UnreceivedAcks(QueryUnreceivedAcksRequest) returns (QueryUnreceivedAcksResponse) { - option (google.api.http).get = "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/" + option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" + "ports/{port_id}/packet_commitments/" "{packet_ack_sequences}/unreceived_acks"; } // NextSequenceReceive returns the next receive sequence for a given channel. rpc NextSequenceReceive(QueryNextSequenceReceiveRequest) returns (QueryNextSequenceReceiveResponse) { - option (google.api.http).get = "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/next_sequence"; + option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" + "ports/{port_id}/next_sequence"; } } @@ -250,8 +257,8 @@ message QueryPacketReceiptRequest { uint64 sequence = 3; } -// QueryPacketReceiptResponse defines the client query response for a packet receipt -// which also includes a proof, and the height from which the proof was +// QueryPacketReceiptResponse defines the client query response for a packet +// receipt which also includes a proof, and the height from which the proof was // retrieved message QueryPacketReceiptResponse { // success flag for if receipt exists diff --git a/third_party/proto/ibc/core/channel/v1/tx.proto b/third_party/proto/ibc/core/channel/v1/tx.proto index 5f8426412..59af0d3f2 100644 --- a/third_party/proto/ibc/core/channel/v1/tx.proto +++ b/third_party/proto/ibc/core/channel/v1/tx.proto @@ -1,7 +1,8 @@ syntax = "proto3"; + package ibc.core.channel.v1; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types"; +option go_package = "github.com/cosmos/ibc-go/modules/core/04-channel/types"; import "gogoproto/gogo.proto"; import "ibc/core/client/v1/client.proto"; @@ -24,7 +25,8 @@ service Msg { // ChannelCloseInit defines a rpc handler method for MsgChannelCloseInit. rpc ChannelCloseInit(MsgChannelCloseInit) returns (MsgChannelCloseInitResponse); - // ChannelCloseConfirm defines a rpc handler method for MsgChannelCloseConfirm. + // ChannelCloseConfirm defines a rpc handler method for + // MsgChannelCloseConfirm. rpc ChannelCloseConfirm(MsgChannelCloseConfirm) returns (MsgChannelCloseConfirmResponse); // RecvPacket defines a rpc handler method for MsgRecvPacket. @@ -61,8 +63,8 @@ message MsgChannelOpenTry { option (gogoproto.goproto_getters) = false; string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - // in the case of crossing hello's, when both chains call OpenInit, we need the channel identifier - // of the previous channel in state INIT + // in the case of crossing hello's, when both chains call OpenInit, we need + // the channel identifier of the previous channel in state INIT string previous_channel_id = 2 [(gogoproto.moretags) = "yaml:\"previous_channel_id\""]; Channel channel = 3 [(gogoproto.nullable) = false]; string counterparty_version = 4 [(gogoproto.moretags) = "yaml:\"counterparty_version\""]; @@ -108,7 +110,8 @@ message MsgChannelOpenConfirm { string signer = 5; } -// MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response type. +// MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response +// type. message MsgChannelOpenConfirmResponse {} // MsgChannelCloseInit defines a msg sent by a Relayer to Chain A @@ -139,7 +142,8 @@ message MsgChannelCloseConfirm { string signer = 5; } -// MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm response type. +// MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm response +// type. message MsgChannelCloseConfirmResponse {} // MsgRecvPacket receives incoming IBC packet diff --git a/third_party/proto/ibc/core/client/v1/client.proto b/third_party/proto/ibc/core/client/v1/client.proto index 11d2195aa..a4a2cc85d 100644 --- a/third_party/proto/ibc/core/client/v1/client.proto +++ b/third_party/proto/ibc/core/client/v1/client.proto @@ -1,10 +1,12 @@ syntax = "proto3"; + package ibc.core.client.v1; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types"; +option go_package = "github.com/cosmos/ibc-go/modules/core/02-client/types"; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; +import "cosmos/upgrade/v1beta1/upgrade.proto"; // IdentifiedClientState defines a client state with an additional client // identifier field. @@ -15,7 +17,8 @@ message IdentifiedClientState { google.protobuf.Any client_state = 2 [(gogoproto.moretags) = "yaml:\"client_state\""]; } -// ConsensusStateWithHeight defines a consensus state with an additional height field. +// ConsensusStateWithHeight defines a consensus state with an additional height +// field. message ConsensusStateWithHeight { // consensus state height Height height = 1 [(gogoproto.nullable) = false]; @@ -33,9 +36,12 @@ message ClientConsensusStates { [(gogoproto.moretags) = "yaml:\"consensus_states\"", (gogoproto.nullable) = false]; } -// ClientUpdateProposal is a governance proposal. If it passes, the client is -// updated with the provided header. The update may fail if the header is not -// valid given certain conditions specified by the client implementation. +// ClientUpdateProposal is a governance proposal. If it passes, the substitute +// client's consensus states starting from the 'initial height' are copied over +// to the subjects client state. 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). The updated client +// must also be valid (cannot be expired). message ClientUpdateProposal { option (gogoproto.goproto_getters) = false; // the title of the update proposal @@ -43,20 +49,45 @@ message ClientUpdateProposal { // the description of the proposal string description = 2; // the client identifier for the client to be updated if the proposal passes - string client_id = 3 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // the header used to update the client if the proposal passes - google.protobuf.Any header = 4; + string subject_client_id = 3 [(gogoproto.moretags) = "yaml:\"subject_client_id\""]; + // the substitute client identifier for the client standing in for the subject + // client + string substitute_client_id = 4 [(gogoproto.moretags) = "yaml:\"susbtitute_client_id\""]; + // the intital height to copy consensus states from the substitute to the + // subject + Height initial_height = 5 [(gogoproto.moretags) = "yaml:\"initial_height\"", (gogoproto.nullable) = false]; +} + +// UpgradeProposal is a gov Content type for initiating an IBC breaking +// upgrade. +message UpgradeProposal { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + option (gogoproto.equal) = true; + + string title = 1; + string description = 2; + cosmos.upgrade.v1beta1.Plan plan = 3 [(gogoproto.nullable) = false]; + + // 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 + google.protobuf.Any upgraded_client_state = 4 [(gogoproto.moretags) = "yaml:\"upgraded_client_state\""]; } // 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 +// 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 message Height { option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_stringer) = false; diff --git a/third_party/proto/ibc/core/client/v1/genesis.proto b/third_party/proto/ibc/core/client/v1/genesis.proto index 16febbcee..30592cf72 100644 --- a/third_party/proto/ibc/core/client/v1/genesis.proto +++ b/third_party/proto/ibc/core/client/v1/genesis.proto @@ -1,7 +1,8 @@ syntax = "proto3"; + package ibc.core.client.v1; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types"; +option go_package = "github.com/cosmos/ibc-go/modules/core/02-client/types"; import "ibc/core/client/v1/client.proto"; import "gogoproto/gogo.proto"; @@ -38,9 +39,10 @@ message GenesisMetadata { bytes value = 2; } -// IdentifiedGenesisMetadata has the client metadata with the corresponding client id. +// IdentifiedGenesisMetadata has the client metadata with the corresponding +// client id. message IdentifiedGenesisMetadata { string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; repeated GenesisMetadata client_metadata = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"client_metadata\""]; -} \ No newline at end of file +} diff --git a/third_party/proto/ibc/core/client/v1/query.proto b/third_party/proto/ibc/core/client/v1/query.proto index 97f3acd62..36a513570 100644 --- a/third_party/proto/ibc/core/client/v1/query.proto +++ b/third_party/proto/ibc/core/client/v1/query.proto @@ -1,42 +1,59 @@ syntax = "proto3"; + package ibc.core.client.v1; +option go_package = "github.com/cosmos/ibc-go/modules/core/02-client/types"; + import "cosmos/base/query/v1beta1/pagination.proto"; import "ibc/core/client/v1/client.proto"; import "google/protobuf/any.proto"; import "google/api/annotations.proto"; import "gogoproto/gogo.proto"; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types"; - // Query provides defines the gRPC querier service service Query { // ClientState queries an IBC light client. rpc ClientState(QueryClientStateRequest) returns (QueryClientStateResponse) { - option (google.api.http).get = "/ibc/core/client/v1beta1/client_states/{client_id}"; + option (google.api.http).get = "/ibc/core/client/v1/client_states/{client_id}"; } // ClientStates queries all the IBC light clients of a chain. rpc ClientStates(QueryClientStatesRequest) returns (QueryClientStatesResponse) { - option (google.api.http).get = "/ibc/core/client/v1beta1/client_states"; + option (google.api.http).get = "/ibc/core/client/v1/client_states"; } // ConsensusState queries a consensus state associated with a client state at // a given height. rpc ConsensusState(QueryConsensusStateRequest) returns (QueryConsensusStateResponse) { - option (google.api.http).get = "/ibc/core/client/v1beta1/consensus_states/{client_id}/revision/{revision_number}/" + option (google.api.http).get = "/ibc/core/client/v1/consensus_states/" + "{client_id}/revision/{revision_number}/" "height/{revision_height}"; } // ConsensusStates queries all the consensus state associated with a given // client. rpc ConsensusStates(QueryConsensusStatesRequest) returns (QueryConsensusStatesResponse) { - option (google.api.http).get = "/ibc/core/client/v1beta1/consensus_states/{client_id}"; + option (google.api.http).get = "/ibc/core/client/v1/consensus_states/{client_id}"; + } + + // Status queries the status of an IBC client. + rpc ClientStatus(QueryClientStatusRequest) returns (QueryClientStatusResponse) { + option (google.api.http).get = "/ibc/core/client/v1/client_status/{client_id}"; } // ClientParams queries all parameters of the ibc client. rpc ClientParams(QueryClientParamsRequest) returns (QueryClientParamsResponse) { - option (google.api.http).get = "/ibc/client/v1beta1/params"; + option (google.api.http).get = "/ibc/client/v1/params"; + } + + // UpgradedClientState queries an Upgraded IBC light client. + rpc UpgradedClientState(QueryUpgradedClientStateRequest) returns (QueryUpgradedClientStateResponse) { + option (google.api.http).get = "/ibc/core/client/v1/upgraded_client_states"; + } + + // UpgradedConsensusState queries an Upgraded IBC consensus state. + rpc UpgradedConsensusState(QueryUpgradedConsensusStateRequest) returns (QueryUpgradedConsensusStateResponse) { + option (google.api.http).get = "/ibc/core/client/v1/upgraded_consensus_states"; } } @@ -120,11 +137,48 @@ message QueryConsensusStatesResponse { cosmos.base.query.v1beta1.PageResponse pagination = 2; } -// QueryClientParamsRequest is the request type for the Query/ClientParams RPC method. +// QueryClientStatusRequest is the request type for the Query/ClientStatus RPC +// method +message QueryClientStatusRequest { + // client unique identifier + string client_id = 1; +} + +// QueryClientStatusResponse is the response type for the Query/ClientStatus RPC +// method. It returns the current status of the IBC client. +message QueryClientStatusResponse { + string status = 1; +} + +// QueryClientParamsRequest is the request type for the Query/ClientParams RPC +// method. message QueryClientParamsRequest {} -// QueryClientParamsResponse is the response type for the Query/ClientParams RPC method. +// QueryClientParamsResponse is the response type for the Query/ClientParams RPC +// method. message QueryClientParamsResponse { // params defines the parameters of the module. Params params = 1; } + +// QueryUpgradedClientStateRequest is the request type for the +// Query/UpgradedClientState RPC method +message QueryUpgradedClientStateRequest {} + +// QueryUpgradedClientStateResponse is the response type for the +// Query/UpgradedClientState RPC method. +message QueryUpgradedClientStateResponse { + // client state associated with the request identifier + google.protobuf.Any upgraded_client_state = 1; +} + +// QueryUpgradedConsensusStateRequest is the request type for the +// Query/UpgradedConsensusState RPC method +message QueryUpgradedConsensusStateRequest {} + +// QueryUpgradedConsensusStateResponse is the response type for the +// Query/UpgradedConsensusState RPC method. +message QueryUpgradedConsensusStateResponse { + // Consensus state associated with the request identifier + google.protobuf.Any upgraded_consensus_state = 1; +} diff --git a/third_party/proto/ibc/core/client/v1/tx.proto b/third_party/proto/ibc/core/client/v1/tx.proto index a30ec8bbf..35386adb8 100644 --- a/third_party/proto/ibc/core/client/v1/tx.proto +++ b/third_party/proto/ibc/core/client/v1/tx.proto @@ -1,7 +1,8 @@ syntax = "proto3"; + package ibc.core.client.v1; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types"; +option go_package = "github.com/cosmos/ibc-go/modules/core/02-client/types"; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; @@ -56,7 +57,8 @@ message MsgUpdateClient { // MsgUpdateClientResponse defines the Msg/UpdateClient response type. message MsgUpdateClientResponse {} -// MsgUpgradeClient defines an sdk.Msg to upgrade an IBC client to a new client state +// MsgUpgradeClient defines an sdk.Msg to upgrade an IBC client to a new client +// state message MsgUpgradeClient { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; @@ -65,7 +67,8 @@ message MsgUpgradeClient { string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; // upgraded client state google.protobuf.Any client_state = 2 [(gogoproto.moretags) = "yaml:\"client_state\""]; - // upgraded consensus state, only contains enough information to serve as a basis of trust in update logic + // upgraded consensus state, only contains enough information to serve as a + // basis of trust in update logic google.protobuf.Any consensus_state = 3 [(gogoproto.moretags) = "yaml:\"consensus_state\""]; // proof that old chain committed to new client bytes proof_upgrade_client = 4 [(gogoproto.moretags) = "yaml:\"proof_upgrade_client\""]; @@ -92,5 +95,6 @@ message MsgSubmitMisbehaviour { string signer = 3; } -// MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response type. +// MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response +// type. message MsgSubmitMisbehaviourResponse {} diff --git a/third_party/proto/ibc/core/commitment/v1/commitment.proto b/third_party/proto/ibc/core/commitment/v1/commitment.proto index 51c102731..47d823942 100644 --- a/third_party/proto/ibc/core/commitment/v1/commitment.proto +++ b/third_party/proto/ibc/core/commitment/v1/commitment.proto @@ -1,7 +1,8 @@ syntax = "proto3"; + package ibc.core.commitment.v1; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/23-commitment/types"; +option go_package = "github.com/cosmos/ibc-go/modules/core/23-commitment/types"; import "gogoproto/gogo.proto"; import "confio/proofs.proto"; @@ -37,4 +38,4 @@ message MerklePath { // MerkleProofs are ordered from leaf-to-root message MerkleProof { repeated ics23.CommitmentProof proofs = 1; -} \ No newline at end of file +} diff --git a/third_party/proto/ibc/core/connection/v1/connection.proto b/third_party/proto/ibc/core/connection/v1/connection.proto index d21e59516..5b4e32bf8 100644 --- a/third_party/proto/ibc/core/connection/v1/connection.proto +++ b/third_party/proto/ibc/core/connection/v1/connection.proto @@ -1,7 +1,8 @@ syntax = "proto3"; + package ibc.core.connection.v1; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/03-connection/types"; +option go_package = "github.com/cosmos/ibc-go/modules/core/03-connection/types"; import "gogoproto/gogo.proto"; import "ibc/core/commitment/v1/commitment.proto"; @@ -24,8 +25,9 @@ message ConnectionEnd { State state = 3; // counterparty chain associated with this connection. Counterparty counterparty = 4 [(gogoproto.nullable) = false]; - // 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. + // 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. uint64 delay_period = 5 [(gogoproto.moretags) = "yaml:\"delay_period\""]; } diff --git a/third_party/proto/ibc/core/connection/v1/genesis.proto b/third_party/proto/ibc/core/connection/v1/genesis.proto index 11df4ba18..62296e1e6 100644 --- a/third_party/proto/ibc/core/connection/v1/genesis.proto +++ b/third_party/proto/ibc/core/connection/v1/genesis.proto @@ -1,7 +1,8 @@ syntax = "proto3"; + package ibc.core.connection.v1; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/03-connection/types"; +option go_package = "github.com/cosmos/ibc-go/modules/core/03-connection/types"; import "gogoproto/gogo.proto"; import "ibc/core/connection/v1/connection.proto"; diff --git a/third_party/proto/ibc/core/connection/v1/query.proto b/third_party/proto/ibc/core/connection/v1/query.proto index c5085a131..ca90e0eeb 100644 --- a/third_party/proto/ibc/core/connection/v1/query.proto +++ b/third_party/proto/ibc/core/connection/v1/query.proto @@ -1,6 +1,9 @@ syntax = "proto3"; + package ibc.core.connection.v1; +option go_package = "github.com/cosmos/ibc-go/modules/core/03-connection/types"; + import "gogoproto/gogo.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; import "ibc/core/client/v1/client.proto"; @@ -8,36 +11,34 @@ import "ibc/core/connection/v1/connection.proto"; import "google/api/annotations.proto"; import "google/protobuf/any.proto"; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/03-connection/types"; - // Query provides defines the gRPC querier service service Query { // Connection queries an IBC connection end. rpc Connection(QueryConnectionRequest) returns (QueryConnectionResponse) { - option (google.api.http).get = "/ibc/core/connection/v1beta1/connections/{connection_id}"; + option (google.api.http).get = "/ibc/core/connection/v1/connections/{connection_id}"; } // Connections queries all the IBC connections of a chain. rpc Connections(QueryConnectionsRequest) returns (QueryConnectionsResponse) { - option (google.api.http).get = "/ibc/core/connection/v1beta1/connections"; + option (google.api.http).get = "/ibc/core/connection/v1/connections"; } // ClientConnections queries the connection paths associated with a client // state. rpc ClientConnections(QueryClientConnectionsRequest) returns (QueryClientConnectionsResponse) { - option (google.api.http).get = "/ibc/core/connection/v1beta1/client_connections/{client_id}"; + option (google.api.http).get = "/ibc/core/connection/v1/client_connections/{client_id}"; } // ConnectionClientState queries the client state associated with the // connection. rpc ConnectionClientState(QueryConnectionClientStateRequest) returns (QueryConnectionClientStateResponse) { - option (google.api.http).get = "/ibc/core/connection/v1beta1/connections/{connection_id}/client_state"; + option (google.api.http).get = "/ibc/core/connection/v1/connections/{connection_id}/client_state"; } // ConnectionConsensusState queries the consensus state associated with the // connection. rpc ConnectionConsensusState(QueryConnectionConsensusStateRequest) returns (QueryConnectionConsensusStateResponse) { - option (google.api.http).get = "/ibc/core/connection/v1beta1/connections/{connection_id}/consensus_state/" + option (google.api.http).get = "/ibc/core/connection/v1/connections/{connection_id}/consensus_state/" "revision/{revision_number}/height/{revision_height}"; } } diff --git a/third_party/proto/ibc/core/connection/v1/tx.proto b/third_party/proto/ibc/core/connection/v1/tx.proto index 19b40c69c..6318f9fd2 100644 --- a/third_party/proto/ibc/core/connection/v1/tx.proto +++ b/third_party/proto/ibc/core/connection/v1/tx.proto @@ -1,7 +1,8 @@ syntax = "proto3"; + package ibc.core.connection.v1; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/03-connection/types"; +option go_package = "github.com/cosmos/ibc-go/modules/core/03-connection/types"; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; @@ -19,7 +20,8 @@ service Msg { // ConnectionOpenAck defines a rpc handler method for MsgConnectionOpenAck. rpc ConnectionOpenAck(MsgConnectionOpenAck) returns (MsgConnectionOpenAckResponse); - // ConnectionOpenConfirm defines a rpc handler method for MsgConnectionOpenConfirm. + // ConnectionOpenConfirm defines a rpc handler method for + // MsgConnectionOpenConfirm. rpc ConnectionOpenConfirm(MsgConnectionOpenConfirm) returns (MsgConnectionOpenConfirmResponse); } @@ -36,7 +38,8 @@ message MsgConnectionOpenInit { string signer = 5; } -// MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response type. +// MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response +// type. message MsgConnectionOpenInitResponse {} // MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a @@ -46,8 +49,8 @@ message MsgConnectionOpenTry { option (gogoproto.goproto_getters) = false; string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // in the case of crossing hello's, when both chains call OpenInit, we need the connection identifier - // of the previous connection in state INIT + // in the case of crossing hello's, when both chains call OpenInit, we need + // the connection identifier of the previous connection in state INIT string previous_connection_id = 2 [(gogoproto.moretags) = "yaml:\"previous_connection_id\""]; google.protobuf.Any client_state = 3 [(gogoproto.moretags) = "yaml:\"client_state\""]; Counterparty counterparty = 4 [(gogoproto.nullable) = false]; @@ -111,5 +114,6 @@ message MsgConnectionOpenConfirm { string signer = 4; } -// MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm response type. +// MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm +// response type. message MsgConnectionOpenConfirmResponse {} diff --git a/third_party/proto/ibc/core/types/v1/genesis.proto b/third_party/proto/ibc/core/types/v1/genesis.proto index ace508599..2451da323 100644 --- a/third_party/proto/ibc/core/types/v1/genesis.proto +++ b/third_party/proto/ibc/core/types/v1/genesis.proto @@ -1,7 +1,8 @@ syntax = "proto3"; + package ibc.core.types.v1; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/types"; +option go_package = "github.com/cosmos/ibc-go/modules/core/types"; import "gogoproto/gogo.proto"; import "ibc/core/client/v1/genesis.proto"; diff --git a/third_party/proto/ibc/lightclients/localhost/v1/localhost.proto b/third_party/proto/ibc/lightclients/localhost/v1/localhost.proto index d48a1c007..77e17bc32 100644 --- a/third_party/proto/ibc/lightclients/localhost/v1/localhost.proto +++ b/third_party/proto/ibc/lightclients/localhost/v1/localhost.proto @@ -1,11 +1,12 @@ syntax = "proto3"; + package ibc.lightclients.localhost.v1; +option go_package = "github.com/cosmos/ibc-go/modules/light-clients/09-localhost/types"; + import "gogoproto/gogo.proto"; import "ibc/core/client/v1/client.proto"; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/09-localhost/types"; - // ClientState defines a loopback (localhost) client. It requires (read-only) // access to keys outside the client prefix. message ClientState { diff --git a/third_party/proto/ibc/lightclients/solomachine/v1/solomachine.proto b/third_party/proto/ibc/lightclients/solomachine/v1/solomachine.proto index 89686f3b7..68f0c1ea4 100644 --- a/third_party/proto/ibc/lightclients/solomachine/v1/solomachine.proto +++ b/third_party/proto/ibc/lightclients/solomachine/v1/solomachine.proto @@ -1,7 +1,8 @@ syntax = "proto3"; + package ibc.lightclients.solomachine.v1; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/06-solomachine/types"; +option go_package = "github.com/cosmos/ibc-go/modules/light-clients/06-solomachine/types"; import "ibc/core/connection/v1/connection.proto"; import "ibc/core/channel/v1/channel.proto"; @@ -22,14 +23,16 @@ message ClientState { bool allow_update_after_proposal = 4 [(gogoproto.moretags) = "yaml:\"allow_update_after_proposal\""]; } -// 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. +// 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. message ConsensusState { option (gogoproto.goproto_getters) = false; // public key of the solo machine google.protobuf.Any public_key = 1 [(gogoproto.moretags) = "yaml:\"public_key\""]; - // diversifier allows the same public key to be re-used across different solo machine clients - // (potentially on different chains) without being considered misbehaviour. + // diversifier allows the same public key to be re-used across different solo + // machine clients (potentially on different chains) without being considered + // misbehaviour. string diversifier = 2; uint64 timestamp = 3; } @@ -86,8 +89,8 @@ message SignBytes { bytes data = 5; } -// DataType defines the type of solo machine proof being created. This is done to preserve uniqueness of different -// data sign byte encodings. +// DataType defines the type of solo machine proof being created. This is done +// to preserve uniqueness of different data sign byte encodings. enum DataType { option (gogoproto.goproto_enum_prefix) = false; diff --git a/third_party/proto/ibc/lightclients/tendermint/v1/tendermint.proto b/third_party/proto/ibc/lightclients/tendermint/v1/tendermint.proto index a6882bf43..17a6cce40 100644 --- a/third_party/proto/ibc/lightclients/tendermint/v1/tendermint.proto +++ b/third_party/proto/ibc/lightclients/tendermint/v1/tendermint.proto @@ -1,7 +1,8 @@ syntax = "proto3"; + package ibc.lightclients.tendermint.v1; -option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/07-tendermint/types"; +option go_package = "github.com/cosmos/ibc-go/modules/light-clients/07-tendermint/types"; import "tendermint/types/validator.proto"; import "tendermint/types/types.proto"; @@ -43,10 +44,12 @@ message ClientState { repeated ics23.ProofSpec proof_specs = 8 [(gogoproto.moretags) = "yaml:\"proof_specs\""]; // 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"}` + // 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"}` repeated string upgrade_path = 9 [(gogoproto.moretags) = "yaml:\"upgrade_path\""]; // This flag, when set to true, will allow governance to recover a client @@ -104,7 +107,8 @@ message Header { .tendermint.types.ValidatorSet trusted_validators = 4 [(gogoproto.moretags) = "yaml:\"trusted_validators\""]; } -// Fraction defines the protobuf message type for tmmath.Fraction that only supports positive values. +// Fraction defines the protobuf message type for tmmath.Fraction that only +// supports positive values. message Fraction { uint64 numerator = 1; uint64 denominator = 2; diff --git a/x/market/common_test.go b/x/market/common_test.go index 6e7e4c282..5f7fdb5dd 100644 --- a/x/market/common_test.go +++ b/x/market/common_test.go @@ -11,7 +11,7 @@ import ( var ( uSDRAmt = sdk.NewInt(1005 * core.MicroUnit) - stakingAmt = sdk.TokensFromConsensusPower(10) + stakingAmt = sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) randomPrice = sdk.NewDec(1700) ) diff --git a/x/market/handler_test.go b/x/market/handler_test.go index 21a512dc4..2d39c7064 100644 --- a/x/market/handler_test.go +++ b/x/market/handler_test.go @@ -74,13 +74,9 @@ func TestSwapMsg_Burn(t *testing.T) { amt := sdk.NewInt(10000) offerCoin := sdk.NewCoin(core.MicroSDRDenom, amt) - err := input.BankKeeper.AddCoins(input.Ctx, keeper.Addrs[0], sdk.NewCoins(offerCoin)) + err := keeper.FundAccount(input, keeper.Addrs[0], sdk.NewCoins(offerCoin)) require.NoError(t, err) - supply := input.BankKeeper.GetSupply(input.Ctx) - supply.SetTotal(supply.GetTotal().Add(offerCoin)) - input.BankKeeper.SetSupply(input.Ctx, supply) - swapMsg := types.NewMsgSwap(keeper.Addrs[0], offerCoin, core.MicroLunaDenom) _, err = h(input.Ctx, swapMsg) require.NoError(t, err) diff --git a/x/market/keeper/keeper.go b/x/market/keeper/keeper.go index 125679229..86bd4a42a 100644 --- a/x/market/keeper/keeper.go +++ b/x/market/keeper/keeper.go @@ -15,7 +15,7 @@ import ( // Keeper of the market store type Keeper struct { storeKey sdk.StoreKey - cdc codec.BinaryMarshaler + cdc codec.BinaryCodec paramSpace paramstypes.Subspace AccountKeeper types.AccountKeeper @@ -25,7 +25,7 @@ type Keeper struct { // NewKeeper constructs a new keeper for oracle func NewKeeper( - cdc codec.BinaryMarshaler, + cdc codec.BinaryCodec, storeKey sdk.StoreKey, paramstore paramstypes.Subspace, accountKeeper types.AccountKeeper, @@ -67,14 +67,14 @@ func (k Keeper) GetMintPoolDelta(ctx sdk.Context) sdk.Dec { } dp := sdk.DecProto{} - k.cdc.MustUnmarshalBinaryBare(bz, &dp) + k.cdc.MustUnmarshal(bz, &dp) return dp.Dec } // SetMintPoolDelta updates MintPoolDelta which is gap between the MintPool and the BasePool func (k Keeper) SetMintPoolDelta(ctx sdk.Context, delta sdk.Dec) { store := ctx.KVStore(k.storeKey) - bz := k.cdc.MustMarshalBinaryBare(&sdk.DecProto{Dec: delta}) + bz := k.cdc.MustMarshal(&sdk.DecProto{Dec: delta}) store.Set(types.MintPoolDeltaKey, bz) } @@ -87,14 +87,14 @@ func (k Keeper) GetBurnPoolDelta(ctx sdk.Context) sdk.Dec { } dp := sdk.DecProto{} - k.cdc.MustUnmarshalBinaryBare(bz, &dp) + k.cdc.MustUnmarshal(bz, &dp) return dp.Dec } // SetBurnPoolDelta updates BurnPoolDelta which is gap between the BurnPool and the BasePool func (k Keeper) SetBurnPoolDelta(ctx sdk.Context, delta sdk.Dec) { store := ctx.KVStore(k.storeKey) - bz := k.cdc.MustMarshalBinaryBare(&sdk.DecProto{Dec: delta}) + bz := k.cdc.MustMarshal(&sdk.DecProto{Dec: delta}) store.Set(types.BurnPoolDeltaKey, bz) } diff --git a/x/market/keeper/test_utils.go b/x/market/keeper/test_utils.go index 4544dd95e..6a3a17be0 100644 --- a/x/market/keeper/test_utils.go +++ b/x/market/keeper/test_utils.go @@ -1,6 +1,8 @@ -//nolint package keeper +//nolint +//DONTCOVER + import ( "testing" "time" @@ -45,6 +47,8 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) +const faucetAccountName = "faucet" + // ModuleBasics nolint var ModuleBasics = module.NewBasicManager( customauth.AppModuleBasic{}, @@ -56,7 +60,7 @@ var ModuleBasics = module.NewBasicManager( ) // MakeTestCodec nolint -func MakeTestCodec(t *testing.T) codec.Marshaler { +func MakeTestCodec(t *testing.T) codec.Codec { return MakeEncodingConfig(t).Marshaler } @@ -105,7 +109,7 @@ var ( sdk.ValAddress(PubKeys[2].Address()), } - InitTokens = sdk.TokensFromConsensusPower(200) + InitTokens = sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction) InitCoins = sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, InitTokens)) ) @@ -148,14 +152,15 @@ func CreateTestInput(t *testing.T) TestInput { require.NoError(t, ms.LoadLatestVersion()) blackListAddrs := map[string]bool{ + faucetAccountName: true, authtypes.FeeCollectorName: true, stakingtypes.NotBondedPoolName: true, stakingtypes.BondedPoolName: true, distrtypes.ModuleName: true, - oracletypes.ModuleName: true, } maccPerms := map[string][]string{ + faucetAccountName: {authtypes.Minter}, authtypes.FeeCollectorName: nil, stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking}, stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking}, @@ -168,8 +173,8 @@ func CreateTestInput(t *testing.T) TestInput { accountKeeper := authkeeper.NewAccountKeeper(appCodec, keyAcc, paramsKeeper.Subspace(authtypes.ModuleName), authtypes.ProtoBaseAccount, maccPerms) bankKeeper := bankkeeper.NewBaseKeeper(appCodec, keyBank, accountKeeper, paramsKeeper.Subspace(banktypes.ModuleName), blackListAddrs) - totalSupply := sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, InitTokens.MulRaw(int64(len(Addrs))))) - bankKeeper.SetSupply(ctx, banktypes.NewSupply(totalSupply)) + totalSupply := sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, InitTokens.MulRaw(int64(len(Addrs)*10)))) + bankKeeper.MintCoins(ctx, faucetAccountName, totalSupply) stakingKeeper := stakingkeeper.NewKeeper( appCodec, @@ -186,7 +191,7 @@ func CreateTestInput(t *testing.T) TestInput { distrKeeper := distrkeeper.NewKeeper( appCodec, keyDistr, paramsKeeper.Subspace(distrtypes.ModuleName), - accountKeeper, bankKeeper, stakingKeeper, + accountKeeper, bankKeeper, &stakingKeeper, authtypes.FeeCollectorName, blackListAddrs) distrKeeper.SetFeePool(ctx, distrtypes.InitialFeePool()) @@ -204,7 +209,7 @@ func CreateTestInput(t *testing.T) TestInput { oracleAcc := authtypes.NewEmptyModuleAccount(oracletypes.ModuleName) marketAcc := authtypes.NewEmptyModuleAccount(types.ModuleName, authtypes.Burner, authtypes.Minter) - bankKeeper.SetBalances(ctx, notBondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, InitTokens.MulRaw(int64(len(Addrs)))))) + bankKeeper.SendCoinsFromModuleToModule(ctx, faucetAccountName, stakingtypes.NotBondedPoolName, sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, InitTokens.MulRaw(int64(len(Addrs)))))) accountKeeper.SetModuleAccount(ctx, feeCollectorAcc) accountKeeper.SetModuleAccount(ctx, bondPool) @@ -215,9 +220,9 @@ func CreateTestInput(t *testing.T) TestInput { for _, addr := range Addrs { accountKeeper.SetAccount(ctx, authtypes.NewBaseAccountWithAddress(addr)) - err := bankKeeper.SetBalances(ctx, addr, InitCoins) - require.Equal(t, bankKeeper.GetAllBalances(ctx, addr), InitCoins) + err := bankKeeper.SendCoinsFromModuleToAccount(ctx, faucetAccountName, addr, InitCoins) require.NoError(t, err) + require.Equal(t, bankKeeper.GetAllBalances(ctx, addr), InitCoins) } oracleKeeper := oraclekeeper.NewKeeper( @@ -248,3 +253,14 @@ func CreateTestInput(t *testing.T) TestInput { return TestInput{ctx, legacyAmino, accountKeeper, bankKeeper, oracleKeeper, keeper} } + +// FundAccount is a utility function that funds an account by minting and +// sending the coins to the address. This should be used for testing purposes +// only! +func FundAccount(input TestInput, addr sdk.AccAddress, amounts sdk.Coins) error { + if err := input.BankKeeper.MintCoins(input.Ctx, faucetAccountName, amounts); err != nil { + return err + } + + return input.BankKeeper.SendCoinsFromModuleToAccount(input.Ctx, faucetAccountName, addr, amounts) +} diff --git a/x/market/legacy/v05/migrate_test.go b/x/market/legacy/v05/migrate_test.go index 17b138897..917ee65ee 100644 --- a/x/market/legacy/v05/migrate_test.go +++ b/x/market/legacy/v05/migrate_test.go @@ -23,7 +23,7 @@ func TestMigrate(t *testing.T) { WithInterfaceRegistry(encodingConfig.InterfaceRegistry). WithTxConfig(encodingConfig.TxConfig). WithLegacyAmino(encodingConfig.Amino). - WithJSONMarshaler(encodingConfig.Marshaler) + WithJSONCodec(encodingConfig.Marshaler) marketGenState := v04market.GenesisState{ TerraPoolDelta: sdk.ZeroDec(), @@ -36,7 +36,7 @@ func TestMigrate(t *testing.T) { migrated := v05market.Migrate(marketGenState) - bz, err := clientCtx.JSONMarshaler.MarshalJSON(migrated) + bz, err := clientCtx.JSONCodec.MarshalJSON(migrated) require.NoError(t, err) // Indent the JSON bz correctly. diff --git a/x/market/module.go b/x/market/module.go index e9b817c5e..f6f43475c 100644 --- a/x/market/module.go +++ b/x/market/module.go @@ -35,7 +35,7 @@ var ( // AppModuleBasic defines the basic application module used by the market module. type AppModuleBasic struct { - cdc codec.Marshaler + cdc codec.Codec } // Name returns the market module's name @@ -55,12 +55,12 @@ func (b AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry // DefaultGenesis returns default genesis state as raw bytes for the market // module. -func (AppModuleBasic) DefaultGenesis(cdc codec.JSONMarshaler) json.RawMessage { +func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { return cdc.MustMarshalJSON(types.DefaultGenesisState()) } // ValidateGenesis performs genesis state validation for the market module. -func (AppModuleBasic) ValidateGenesis(cdc codec.JSONMarshaler, config client.TxEncodingConfig, bz json.RawMessage) error { +func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { var data types.GenesisState if err := cdc.UnmarshalJSON(bz, &data); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) @@ -103,7 +103,7 @@ type AppModule struct { // NewAppModule creates a new AppModule object func NewAppModule( - cdc codec.Marshaler, + cdc codec.Codec, keeper keeper.Keeper, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, @@ -145,7 +145,7 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { // InitGenesis performs genesis initialization for the market module. It returns // no validator updates. -func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONMarshaler, data json.RawMessage) []abci.ValidatorUpdate { +func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { var genesisState types.GenesisState cdc.MustUnmarshalJSON(data, &genesisState) InitGenesis(ctx, am.keeper, &genesisState) @@ -155,11 +155,14 @@ func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONMarshaler, data j // ExportGenesis returns the exported genesis state as raw bytes for the market // module. -func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONMarshaler) json.RawMessage { +func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { gs := ExportGenesis(ctx, am.keeper) return cdc.MustMarshalJSON(gs) } +// ConsensusVersion implements AppModule/ConsensusVersion. +func (AppModule) ConsensusVersion() uint64 { return 2 } + // BeginBlock returns the begin blocker for the market module. func (AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {} diff --git a/x/market/simulation/decoder.go b/x/market/simulation/decoder.go index e4180954d..cd637f178 100644 --- a/x/market/simulation/decoder.go +++ b/x/market/simulation/decoder.go @@ -13,18 +13,18 @@ import ( // NewDecodeStore returns a decoder function closure that unmarshals the KVPair's // Value to the corresponding market type. -func NewDecodeStore(cdc codec.Marshaler) func(kvA, kvB kv.Pair) string { +func NewDecodeStore(cdc codec.Codec) func(kvA, kvB kv.Pair) string { return func(kvA, kvB kv.Pair) string { switch { case bytes.Equal(kvA.Key[:1], types.MintPoolDeltaKey): var deltaA, deltaB sdk.DecProto - cdc.MustUnmarshalBinaryBare(kvA.Value, &deltaA) - cdc.MustUnmarshalBinaryBare(kvB.Value, &deltaB) + cdc.MustUnmarshal(kvA.Value, &deltaA) + cdc.MustUnmarshal(kvB.Value, &deltaB) return fmt.Sprintf("%v\n%v", deltaA, deltaB) case bytes.Equal(kvA.Key[:1], types.BurnPoolDeltaKey): var deltaA, deltaB sdk.DecProto - cdc.MustUnmarshalBinaryBare(kvA.Value, &deltaA) - cdc.MustUnmarshalBinaryBare(kvB.Value, &deltaB) + cdc.MustUnmarshal(kvA.Value, &deltaA) + cdc.MustUnmarshal(kvB.Value, &deltaB) return fmt.Sprintf("%v\n%v", deltaA, deltaB) default: panic(fmt.Sprintf("invalid market key prefix %X", kvA.Key[:1])) diff --git a/x/market/simulation/decoder_test.go b/x/market/simulation/decoder_test.go index 3fa0ab33e..dfabbfaaf 100644 --- a/x/market/simulation/decoder_test.go +++ b/x/market/simulation/decoder_test.go @@ -22,8 +22,8 @@ func TestDecodeDistributionStore(t *testing.T) { kvPairs := kv.Pairs{ Pairs: []kv.Pair{ - {Key: types.MintPoolDeltaKey, Value: cdc.MustMarshalBinaryBare(&sdk.DecProto{Dec: mintDelta})}, - {Key: types.BurnPoolDeltaKey, Value: cdc.MustMarshalBinaryBare(&sdk.DecProto{Dec: burnDelta})}, + {Key: types.MintPoolDeltaKey, Value: cdc.MustMarshal(&sdk.DecProto{Dec: mintDelta})}, + {Key: types.BurnPoolDeltaKey, Value: cdc.MustMarshal(&sdk.DecProto{Dec: burnDelta})}, {Key: []byte{0x99}, Value: []byte{0x99}}, }, } diff --git a/x/market/simulation/operations.go b/x/market/simulation/operations.go index 894f66c61..1d2b496b2 100644 --- a/x/market/simulation/operations.go +++ b/x/market/simulation/operations.go @@ -27,7 +27,7 @@ const ( // WeightedOperations returns all the operations from the module with their respective weights func WeightedOperations( appParams simtypes.AppParams, - cdc codec.JSONMarshaler, + cdc codec.JSONCodec, ak types.AccountKeeper, bk types.BankKeeper, ok types.OracleKeeper, @@ -114,7 +114,7 @@ func SimulateMsgSwap( return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "unable to deliver tx"), nil, err } - return simtypes.NewOperationMsg(msg, true, ""), nil, nil + return simtypes.NewOperationMsg(msg, true, "", nil), nil, nil } } @@ -161,7 +161,7 @@ func SimulateMsgSwapSend( } // Check send_enabled status of offer denom - if !bk.SendEnabledCoin(ctx, sdk.Coin{Denom: offerDenom, Amount: sdk.NewInt(1)}) { + if !bk.IsSendEnabledCoin(ctx, sdk.Coin{Denom: offerDenom, Amount: sdk.NewInt(1)}) { return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgSwapSend, err.Error()), nil, nil } @@ -196,6 +196,6 @@ func SimulateMsgSwapSend( return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "unable to deliver tx"), nil, err } - return simtypes.NewOperationMsg(msg, true, ""), nil, nil + return simtypes.NewOperationMsg(msg, true, "", nil), nil, nil } } diff --git a/x/market/types/codec.go b/x/market/types/codec.go index 5955af883..f80b10797 100644 --- a/x/market/types/codec.go +++ b/x/market/types/codec.go @@ -6,8 +6,6 @@ import ( cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" - - msgauthtypes "github.com/terra-project/core/x/msgauth/types" ) // RegisterLegacyAminoCodec registers the necessary x/market interfaces and concrete types @@ -43,7 +41,4 @@ func init() { RegisterLegacyAminoCodec(amino) cryptocodec.RegisterCrypto(amino) amino.Seal() - - msgauthtypes.RegisterGrantableMsgType(TypeMsgSwap) - msgauthtypes.RegisterMsgAuthTypeCodec(&MsgSwap{}, "market/MsgSwap") } diff --git a/x/market/types/expected_keepers.go b/x/market/types/expected_keepers.go index c73aaecef..2ef431d6b 100644 --- a/x/market/types/expected_keepers.go +++ b/x/market/types/expected_keepers.go @@ -3,7 +3,6 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - bankexported "github.com/cosmos/cosmos-sdk/x/bank/exported" ) // AccountKeeper is expected keeper for auth module @@ -15,7 +14,6 @@ type AccountKeeper interface { // BankKeeper defines expected supply keeper type BankKeeper interface { - GetSupply(ctx sdk.Context) (supply bankexported.SupplyI) SendCoinsFromModuleToModule(ctx sdk.Context, senderModule string, recipientModule string, amt sdk.Coins) error SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error @@ -26,7 +24,7 @@ type BankKeeper interface { // only used for simulation SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin - SendEnabledCoin(ctx sdk.Context, coin sdk.Coin) bool + IsSendEnabledCoin(ctx sdk.Context, coin sdk.Coin) bool } // OracleKeeper defines expected oracle keeper diff --git a/x/market/types/genesis.go b/x/market/types/genesis.go index 318609cdc..dc6820484 100644 --- a/x/market/types/genesis.go +++ b/x/market/types/genesis.go @@ -32,7 +32,7 @@ func ValidateGenesis(data *GenesisState) error { // GetGenesisStateFromAppState returns x/market GenesisState given raw application // genesis state. -func GetGenesisStateFromAppState(cdc codec.JSONMarshaler, appState map[string]json.RawMessage) *GenesisState { +func GetGenesisStateFromAppState(cdc codec.JSONCodec, appState map[string]json.RawMessage) *GenesisState { var genesisState GenesisState if appState[ModuleName] != nil { diff --git a/x/msgauth/abci.go b/x/msgauth/abci.go deleted file mode 100644 index fcf7e9291..000000000 --- a/x/msgauth/abci.go +++ /dev/null @@ -1,33 +0,0 @@ -package msgauth - -import ( - "fmt" - "time" - - "github.com/terra-project/core/x/msgauth/keeper" - "github.com/terra-project/core/x/msgauth/types" - - "github.com/cosmos/cosmos-sdk/telemetry" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// EndBlocker is called at the end of every block -func EndBlocker(ctx sdk.Context, k keeper.Keeper) { - defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker) - - // clears all the mature grants - matureGrants := k.DequeueAllMatureGrantQueue(ctx) - for _, grant := range matureGrants.Pairs { - granter, err := sdk.AccAddressFromBech32(grant.GranterAddress) - if err != nil { - panic(fmt.Sprintf("invalid granter address %s not found", grant.GranterAddress)) - } - - grantee, err := sdk.AccAddressFromBech32(grant.GranteeAddress) - if err != nil { - panic(fmt.Sprintf("invalid grantee address %s not found", grant.GranteeAddress)) - } - - k.RevokeGrant(ctx, granter, grantee, grant.MsgType) - } -} diff --git a/x/msgauth/abci_test.go b/x/msgauth/abci_test.go deleted file mode 100644 index bc6f81fd8..000000000 --- a/x/msgauth/abci_test.go +++ /dev/null @@ -1,36 +0,0 @@ -package msgauth - -import ( - "testing" - "time" - - "github.com/stretchr/testify/require" - - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/terra-project/core/x/msgauth/keeper" - "github.com/terra-project/core/x/msgauth/types" -) - -func TestMature(t *testing.T) { - input := keeper.CreateTestInput(t) - h := NewHandler(input.AuthorizationKeeper) - coins := sdk.NewCoins(sdk.NewCoin("foo", sdk.NewInt(1_000_000_000))) - - // send authorization - sendAuth := types.NewSendAuthorization(coins) - msg, err := types.NewMsgGrantAuthorization(keeper.Addrs[0], keeper.Addrs[1], sendAuth, time.Hour) - require.NoError(t, err) - - _, err = h(input.Ctx, msg) - require.NoError(t, err) - - grant, found := input.AuthorizationKeeper.GetGrant(input.Ctx, keeper.Addrs[0], keeper.Addrs[1], sendAuth.MsgType()) - require.True(t, found) - require.Equal(t, sendAuth, grant.GetAuthorization()) - require.Equal(t, input.Ctx.BlockTime().Add(time.Hour), grant.Expiration) - - EndBlocker(input.Ctx.WithBlockTime(input.Ctx.BlockTime().Add(time.Hour)), input.AuthorizationKeeper) - _, found = input.AuthorizationKeeper.GetGrant(input.Ctx, keeper.Addrs[0], keeper.Addrs[1], sendAuth.MsgType()) - require.False(t, found) -} diff --git a/x/msgauth/client/cli/query.go b/x/msgauth/client/cli/query.go deleted file mode 100644 index 4e554d032..000000000 --- a/x/msgauth/client/cli/query.go +++ /dev/null @@ -1,95 +0,0 @@ -package cli - -import ( - "context" - "strings" - - "github.com/spf13/cobra" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/terra-project/core/x/msgauth/types" -) - -// GetQueryCmd returns the cli query commands for this module -func GetQueryCmd() *cobra.Command { - authorizationQueryCmd := &cobra.Command{ - Use: types.ModuleName, - Short: "Querying commands for the msg authorization module", - Long: "", - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - authorizationQueryCmd.AddCommand( - GetCmdQueryGrants(), - ) - - return authorizationQueryCmd -} - -// GetCmdQueryGrants implements the query grants command. -func GetCmdQueryGrants() *cobra.Command { - cmd := &cobra.Command{ - Use: "grant [granter-addr] [grantee-addr]", - Args: cobra.RangeArgs(1, 2), - Short: "Query grants of a granter or between a granter-grantee pair", - Long: strings.TrimSpace(` -Query grants between a granter-grantee pair, - -$ terrad query msgauth grant terra... terra... - -Or, query all grants of a granter, - -$ terrad query msgauth grant terra... - `), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - granter := args[0] - _, err = sdk.AccAddressFromBech32(granter) - if err != nil { - return err - } - - // when grantee address was given, - // query grants - if len(args) == 2 { - grantee := args[1] - _, err = sdk.AccAddressFromBech32(grantee) - if err != nil { - return err - } - - res, err := queryClient.Grants(context.Background(), - &types.QueryGrantsRequest{Granter: granter, Grantee: grantee}, - ) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - } - - res, err := queryClient.AllGrants(context.Background(), - &types.QueryAllGrantsRequest{Granter: granter}, - ) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - - }, - } - - flags.AddQueryFlagsToCmd(cmd) - return cmd -} diff --git a/x/msgauth/client/cli/tx.go b/x/msgauth/client/cli/tx.go deleted file mode 100644 index ddbe05ec6..000000000 --- a/x/msgauth/client/cli/tx.go +++ /dev/null @@ -1,209 +0,0 @@ -package cli - -import ( - "strings" - "time" - - "github.com/spf13/cobra" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/tx" - sdk "github.com/cosmos/cosmos-sdk/types" - authclient "github.com/cosmos/cosmos-sdk/x/auth/client" - - feeutils "github.com/terra-project/core/custom/auth/client/utils" - "github.com/terra-project/core/x/msgauth/types" -) - -// flagPeriod is flag to specify grant period -const flagPeriod = "period" - -// GetTxCmd returns the transaction commands for this module -func GetTxCmd() *cobra.Command { - AuthorizationTxCmd := &cobra.Command{ - Use: types.ModuleName, - Short: "Msg authorization transactions subcommands", - Long: "Authorize and revoke access to execute transactions on behalf of your address", - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - AuthorizationTxCmd.AddCommand( - GetCmdGrantAuthorization(), - GetCmdRevokeAuthorization(), - GetCmdSendAs(), - ) - - return AuthorizationTxCmd -} - -// GetCmdGrantAuthorization return cmd handler to grant authorization -func GetCmdGrantAuthorization() *cobra.Command { - cmd := &cobra.Command{ - Use: "grant [grantee-address] [msg-type] [limit]", - Short: "Grant authorization of a specific msg type to an address", - Long: strings.TrimSpace(` -Grant authorization of a specific msg type to an address -to let the address execute a transaction on your behalf, - -$ terrad tx msgauth grant terra... send 1000000uluna,10000000ukrw --from [granter] - -Or, you can just give authorization of other msg types - -$ terrad tx msgauth grant terra... swap --from [granter] - `), - Args: cobra.RangeArgs(2, 3), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - granter := clientCtx.FromAddress - grantee, err := sdk.AccAddressFromBech32(args[0]) - if err != nil { - return err - } - - msgType := args[1] - - var authorization types.AuthorizationI - if msgType == (types.SendAuthorization{}.MsgType()) { - limit, err := sdk.ParseCoinsNormalized(args[2]) - if err != nil { - return err - } - - authorization = types.NewSendAuthorization(limit) - } else { - authorization = types.NewGenericAuthorization(msgType) - } - - p, err := cmd.Flags().GetInt64(flagPeriod) - if err != nil { - return err - } - - period := time.Duration(p) * time.Second - msg, err := types.NewMsgGrantAuthorization(granter, grantee, authorization, period) - if err != nil { - return err - } - - if err := msg.ValidateBasic(); err != nil { - return err - } - - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - - }, - } - - cmd.Flags().Int64(flagPeriod, int64(3600*24*365), "The second unit of time duration which the authorization is active for the user; Default is a year") - flags.AddTxFlagsToCmd(cmd) - - return cmd -} - -// GetCmdRevokeAuthorization return cmd handler to revoke authorization -func GetCmdRevokeAuthorization() *cobra.Command { - cmd := &cobra.Command{ - Use: "revoke [grantee_address] [msg_type]", - Short: "Revoke authorization", - Long: strings.TrimSpace(` -Revoke authorization from an address for a msg type, - -$ terrad tx msgauth revoke terra... send --from [granter] -`), - Args: cobra.ExactArgs(2), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - granter := clientCtx.FromAddress - grantee, err := sdk.AccAddressFromBech32(args[0]) - if err != nil { - return err - } - - msgAuthorized := args[1] - - msg := types.NewMsgRevokeAuthorization(granter, grantee, msgAuthorized) - if err := msg.ValidateBasic(); err != nil { - return err - } - - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - return cmd -} - -// GetCmdSendAs return cmd handler to transfer tokens with authorization privilege -func GetCmdSendAs() *cobra.Command { - cmd := &cobra.Command{ - Use: "send-as [granter] [tx_json] --from [grantee]", - Short: "Execute tx on behalf of granter account", - Long: strings.TrimSpace(` -Execute tx on behalf of granter account, - -$ terrad tx msgauth send-as terra... ./tx.json --from [grantee] - -tx.json should be format of StdTx -`), - Args: cobra.ExactArgs(2), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - // Generate transaction factory for gas simulation - txf := tx.NewFactoryCLI(clientCtx, cmd.Flags()) - - grantee := clientCtx.FromAddress - - stdTx, err := authclient.ReadTxFromFile(clientCtx, args[1]) - if err != nil { - return err - } - - msg, err := types.NewMsgExecAuthorized(grantee, stdTx.GetMsgs()) - if err != nil { - return err - } - - if err := msg.ValidateBasic(); err != nil { - return err - } - - if !clientCtx.GenerateOnly && txf.Fees().IsZero() { - // estimate tax and gas - stdFee, err := feeutils.ComputeFeesWithCmd(clientCtx, cmd.Flags(), msg) - - if err != nil { - return err - } - - // override gas and fees - txf = txf. - WithFees(stdFee.Amount.String()). - WithGas(stdFee.Gas). - WithSimulateAndExecute(false). - WithGasPrices("") - } - - // build and sign the transaction, then broadcast to Tendermint - return tx.GenerateOrBroadcastTxWithFactory(clientCtx, txf, msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - return cmd -} diff --git a/x/msgauth/client/rest/query.go b/x/msgauth/client/rest/query.go deleted file mode 100644 index f87272e00..000000000 --- a/x/msgauth/client/rest/query.go +++ /dev/null @@ -1,95 +0,0 @@ -package rest - -import ( - "fmt" - "net/http" - - "github.com/terra-project/core/x/msgauth/types" - - "github.com/gorilla/mux" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/types/rest" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -func registerQueryRoutes(clientCtx client.Context, rtr *mux.Router) { - rtr.HandleFunc(fmt.Sprintf("/msgauth/granters/{%s}/grants", RestGranter), queryAllGrantsHandlerFunction(clientCtx)).Methods("GET") - rtr.HandleFunc(fmt.Sprintf("/msgauth/granters/{%s}/grantees/{%s}/grants", RestGranter, RestGrantee), queryGrantsHandlerFunction(clientCtx)).Methods("GET") -} - -func queryGrantsHandlerFunction(clientCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - clientCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, clientCtx, r) - if !ok { - return - } - - vars := mux.Vars(r) - granter := vars[RestGranter] - grantee := vars[RestGrantee] - - granterAddr, err := sdk.AccAddressFromBech32(granter) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - granteeAddr, err := sdk.AccAddressFromBech32(grantee) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - params := types.NewQueryGrantsParams(granterAddr, granteeAddr) - - bz, err := clientCtx.LegacyAmino.MarshalJSON(params) - if rest.CheckBadRequestError(w, err) { - return - } - - res, height, err := clientCtx.QueryWithData(fmt.Sprintf("custom/%s/%s", types.QuerierRoute, types.QueryGrants), bz) - if rest.CheckInternalServerError(w, err) { - return - } - - clientCtx = clientCtx.WithHeight(height) - rest.PostProcessResponse(w, clientCtx, res) - } -} - -func queryAllGrantsHandlerFunction(clientCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - clientCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, clientCtx, r) - if !ok { - return - } - - vars := mux.Vars(r) - granter := vars[RestGranter] - - granterAddr, err := sdk.AccAddressFromBech32(granter) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - params := types.NewQueryAllGrantsParams(granterAddr) - - bz, err := clientCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - res, height, err := clientCtx.QueryWithData(fmt.Sprintf("custom/%s/%s", types.QuerierRoute, types.QueryGrants), bz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - clientCtx = clientCtx.WithHeight(height) - rest.PostProcessResponse(w, clientCtx, res) - } -} diff --git a/x/msgauth/client/rest/rest.go b/x/msgauth/client/rest/rest.go deleted file mode 100644 index 54d9cab34..000000000 --- a/x/msgauth/client/rest/rest.go +++ /dev/null @@ -1,42 +0,0 @@ -package rest - -import ( - "time" - - "github.com/gorilla/mux" - - "github.com/cosmos/cosmos-sdk/client" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/rest" -) - -//nolint -const ( - RestGranter = "granter" - RestGrantee = "grantee" - RestMsgType = "msg_type" -) - -// RegisterRoutes register routes for querier and tx broadcast -func RegisterRoutes(clientCtx client.Context, rtr *mux.Router) { - registerQueryRoutes(clientCtx, rtr) - registerTxRoutes(clientCtx, rtr) -} - -// GrantRequest defines the properties of a grant request's body. -type GrantRequest struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - Period time.Duration `json:"period"` - Limit sdk.Coins `json:"limit,omitempty"` -} - -// RevokeRequest defines the properties of a revoke request's body. -type RevokeRequest struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` -} - -// ExecuteRequest defines the properties of a execute request's body. -type ExecuteRequest struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - Msgs []sdk.Msg `json:"msgs" yaml:"msgs"` -} diff --git a/x/msgauth/client/rest/tx.go b/x/msgauth/client/rest/tx.go deleted file mode 100644 index ca4b1180f..000000000 --- a/x/msgauth/client/rest/tx.go +++ /dev/null @@ -1,180 +0,0 @@ -package rest - -import ( - "bytes" - "fmt" - "net/http" - "strconv" - - "github.com/gorilla/mux" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/tx" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/rest" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - - feeutils "github.com/terra-project/core/custom/auth/client/utils" - "github.com/terra-project/core/x/msgauth/types" -) - -func registerTxRoutes(clientCtx client.Context, rtr *mux.Router) { - rtr.HandleFunc(fmt.Sprintf("/msgauth/granters/{%s}/grantees/{%s}/grants/{%s}", RestGranter, RestGrantee, RestMsgType), grantHandler(clientCtx)).Methods("POST") - rtr.HandleFunc(fmt.Sprintf("/msgauth/granters/{%s}/grantees/{%s}/grants/{%s}/revoke", RestGranter, RestGrantee, RestMsgType), revokeHandler(clientCtx)).Methods("POST") - rtr.HandleFunc("/msgauth/execute", executeHandler(clientCtx)).Methods("POST") -} - -func grantHandler(clientCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req GrantRequest - - if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) { - return - } - - req.BaseReq = req.BaseReq.Sanitize() - if !req.BaseReq.ValidateBasic(w) { - return - } - - vars := mux.Vars(r) - granter := vars[RestGranter] - grantee := vars[RestGrantee] - msgType := vars[RestMsgType] - - granterAddr, err := sdk.AccAddressFromBech32(granter) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - granteeAddr, err := sdk.AccAddressFromBech32(grantee) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - var authorization types.AuthorizationI - if msgType == (banktypes.TypeMsgSend) { - authorization = types.NewSendAuthorization(req.Limit) - } else { - authorization = types.NewGenericAuthorization(msgType) - } - - msg, err := types.NewMsgGrantAuthorization(granterAddr, granteeAddr, authorization, req.Period) - if rest.CheckBadRequestError(w, err) { - return - } - - if rest.CheckBadRequestError(w, msg.ValidateBasic()) { - return - } - - fromAddr, err := sdk.AccAddressFromBech32(req.BaseReq.From) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - if !bytes.Equal(fromAddr, granterAddr) { - rest.WriteErrorResponse(w, http.StatusUnauthorized, "must use own granter address") - return - } - - tx.WriteGeneratedTxResponse(clientCtx, w, req.BaseReq, msg) - } -} - -func revokeHandler(clientCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req RevokeRequest - - if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) { - return - } - - req.BaseReq = req.BaseReq.Sanitize() - if !req.BaseReq.ValidateBasic(w) { - return - } - - vars := mux.Vars(r) - granter := vars[RestGranter] - grantee := vars[RestGrantee] - msgType := vars[RestMsgType] - - granterAddr, err := sdk.AccAddressFromBech32(granter) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - granteeAddr, err := sdk.AccAddressFromBech32(grantee) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - msg := types.NewMsgRevokeAuthorization(granterAddr, granteeAddr, msgType) - if rest.CheckBadRequestError(w, msg.ValidateBasic()) { - return - } - - fromAddr, err := sdk.AccAddressFromBech32(req.BaseReq.From) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - if !bytes.Equal(fromAddr, granteeAddr) { - rest.WriteErrorResponse(w, http.StatusUnauthorized, "must use own grantee address") - return - } - - tx.WriteGeneratedTxResponse(clientCtx, w, req.BaseReq, msg) - } -} - -func executeHandler(clientCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req ExecuteRequest - - if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) { - return - } - - req.BaseReq = req.BaseReq.Sanitize() - if !req.BaseReq.ValidateBasic(w) { - return - } - - fromAddr, err := sdk.AccAddressFromBech32(req.BaseReq.From) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - msg, err := types.NewMsgExecAuthorized(fromAddr, req.Msgs) - if rest.CheckBadRequestError(w, err) { - return - } - - if rest.CheckBadRequestError(w, msg.ValidateBasic()) { - return - } - - if req.BaseReq.Fees.IsZero() { - stdFee, err := feeutils.ComputeFeesWithBaseReq(clientCtx, req.BaseReq, msg) - if rest.CheckBadRequestError(w, err) { - return - } - - // override gas and fees - req.BaseReq.Gas = strconv.FormatUint(stdFee.Gas, 10) - req.BaseReq.Fees = stdFee.Amount - req.BaseReq.GasPrices = sdk.DecCoins{} - } - - tx.WriteGeneratedTxResponse(clientCtx, w, req.BaseReq, msg) - } -} diff --git a/x/msgauth/exported/alias.go b/x/msgauth/exported/alias.go deleted file mode 100644 index a129c27a8..000000000 --- a/x/msgauth/exported/alias.go +++ /dev/null @@ -1,11 +0,0 @@ -package exported - -import ( - "github.com/terra-project/core/x/msgauth/types" -) - -// RegisterMsgAuthTypeCodec nolint -var RegisterMsgAuthTypeCodec = types.RegisterMsgAuthTypeCodec - -// MsgExecAuthorized nolint -type MsgExecAuthorized = types.MsgExecAuthorized diff --git a/x/msgauth/genesis.go b/x/msgauth/genesis.go deleted file mode 100644 index 2a5dbd8ac..000000000 --- a/x/msgauth/genesis.go +++ /dev/null @@ -1,52 +0,0 @@ -package msgauth - -import ( - "fmt" - - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/terra-project/core/x/msgauth/keeper" - "github.com/terra-project/core/x/msgauth/types" -) - -// InitGenesis register all exported authorization entries -func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, data *types.GenesisState) { - for _, entry := range data.AuthorizationEntries { - granter, err := sdk.AccAddressFromBech32(entry.Granter) - if err != nil { - panic(fmt.Errorf("Invalid granter address %s", entry.Granter)) - } - - grantee, err := sdk.AccAddressFromBech32(entry.Grantee) - if err != nil { - panic(fmt.Errorf("Invalid grantee address %s", entry.Grantee)) - } - - authorization := entry.GetAuthorization() - grant, err := types.NewAuthorizationGrant(authorization, entry.Expiration) - if err != nil { - panic(err) - } - - keeper.SetGrant(ctx, granter, grantee, authorization.MsgType(), grant) - keeper.InsertGrantQueue(ctx, granter, grantee, authorization.MsgType(), entry.Expiration) - } -} - -// ExportGenesis writes the current store values -// to a genesis file, which can be imported again -// with InitGenesis -func ExportGenesis(ctx sdk.Context, keeper keeper.Keeper) (data *types.GenesisState) { - var entries []types.AuthorizationEntry - keeper.IterateGrants(ctx, func(granter, grantee sdk.AccAddress, grant types.AuthorizationGrant) bool { - entries = append(entries, types.AuthorizationEntry{ - Granter: granter.String(), - Grantee: grantee.String(), - Expiration: grant.Expiration, - Authorization: grant.Authorization, - }) - return false - }) - - return types.NewGenesisState(entries) -} diff --git a/x/msgauth/genesis_test.go b/x/msgauth/genesis_test.go deleted file mode 100644 index 42a5d3f4e..000000000 --- a/x/msgauth/genesis_test.go +++ /dev/null @@ -1,34 +0,0 @@ -package msgauth - -import ( - "testing" - "time" - - "github.com/stretchr/testify/require" - - sdk "github.com/cosmos/cosmos-sdk/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - - "github.com/terra-project/core/x/msgauth/keeper" - "github.com/terra-project/core/x/msgauth/types" -) - -func TestGenesisExportImport(t *testing.T) { - input := keeper.CreateTestInput(t) - coins := sdk.NewCoins(sdk.NewCoin("foo", sdk.NewInt(1_000_000_000))) - - now := input.Ctx.BlockHeader().Time - grant, err := types.NewAuthorizationGrant(types.NewSendAuthorization(coins), now.Add(time.Hour)) - require.NoError(t, err) - - input.AuthorizationKeeper.SetGrant(input.Ctx, keeper.Addrs[0], keeper.Addrs[1], banktypes.TypeMsgSend, grant) - genesis := ExportGenesis(input.Ctx, input.AuthorizationKeeper) - - // Clear keeper - input.AuthorizationKeeper.RevokeGrant(input.Ctx, keeper.Addrs[0], keeper.Addrs[1], banktypes.TypeMsgSend) - - InitGenesis(input.Ctx, input.AuthorizationKeeper, genesis) - newGenesis := ExportGenesis(input.Ctx, input.AuthorizationKeeper) - - require.Equal(t, genesis, newGenesis) -} diff --git a/x/msgauth/handler.go b/x/msgauth/handler.go deleted file mode 100644 index 3d3f8910a..000000000 --- a/x/msgauth/handler.go +++ /dev/null @@ -1,31 +0,0 @@ -package msgauth - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - - "github.com/terra-project/core/x/msgauth/keeper" - "github.com/terra-project/core/x/msgauth/types" -) - -// NewHandler creates a new handler for all msgauth type messages. -func NewHandler(k keeper.Keeper) sdk.Handler { - msgServer := keeper.NewMsgServerImpl(k) - - return func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { - ctx = ctx.WithEventManager(sdk.NewEventManager()) - switch msg := msg.(type) { - case *types.MsgGrantAuthorization: - res, err := msgServer.GrantAuthorization(sdk.WrapSDKContext(ctx), msg) - return sdk.WrapServiceResult(ctx, res, err) - case *types.MsgRevokeAuthorization: - res, err := msgServer.RevokeAuthorization(sdk.WrapSDKContext(ctx), msg) - return sdk.WrapServiceResult(ctx, res, err) - case *types.MsgExecAuthorized: - res, err := msgServer.ExecAuthorized(sdk.WrapSDKContext(ctx), msg) - return sdk.WrapServiceResult(ctx, res, err) - default: - return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized authorization message type: %T", msg) - } - } -} diff --git a/x/msgauth/handler_test.go b/x/msgauth/handler_test.go deleted file mode 100644 index 69b43e3c5..000000000 --- a/x/msgauth/handler_test.go +++ /dev/null @@ -1,90 +0,0 @@ -package msgauth - -import ( - "testing" - "time" - - "github.com/stretchr/testify/require" - - sdk "github.com/cosmos/cosmos-sdk/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - - "github.com/terra-project/core/x/msgauth/keeper" - "github.com/terra-project/core/x/msgauth/types" -) - -func TestGrant(t *testing.T) { - input := keeper.CreateTestInput(t) - h := NewHandler(input.AuthorizationKeeper) - coins := sdk.NewCoins(sdk.NewCoin("foo", sdk.NewInt(1_000_000_000))) - - // send authorization - sendAuth := types.NewSendAuthorization(coins) - msg, err := types.NewMsgGrantAuthorization(keeper.Addrs[0], keeper.Addrs[1], sendAuth, time.Hour) - - _, err = h(input.Ctx, msg) - require.NoError(t, err) - - grant, found := input.AuthorizationKeeper.GetGrant(input.Ctx, keeper.Addrs[0], keeper.Addrs[1], sendAuth.MsgType()) - require.True(t, found) - require.Equal(t, sendAuth, grant.GetAuthorization()) - require.Equal(t, input.Ctx.BlockTime().Add(time.Hour), grant.Expiration) - - // generic authorization - genericAuth := types.NewGenericAuthorization("swap") - msg, err = types.NewMsgGrantAuthorization(keeper.Addrs[0], keeper.Addrs[1], genericAuth, time.Hour) - require.NoError(t, err) - - _, err = h(input.Ctx, msg) - require.NoError(t, err) - - grant, found = input.AuthorizationKeeper.GetGrant(input.Ctx, keeper.Addrs[0], keeper.Addrs[1], "swap") - require.True(t, found) - require.Equal(t, genericAuth, grant.GetAuthorization()) - require.Equal(t, input.Ctx.BlockTime().Add(time.Hour), grant.Expiration) - - // test not allowed to grant - genericAuth = types.NewGenericAuthorization("now allowed msg") - msg, err = types.NewMsgGrantAuthorization(keeper.Addrs[0], keeper.Addrs[1], genericAuth, time.Hour) - require.NoError(t, err) - - _, err = h(input.Ctx, msg) - require.Error(t, err) -} - -func TestRevoke(t *testing.T) { - input := keeper.CreateTestInput(t) - h := NewHandler(input.AuthorizationKeeper) - coins := sdk.NewCoins(sdk.NewCoin("foo", sdk.NewInt(1_000_000_000))) - grantMsg, err := types.NewMsgGrantAuthorization(keeper.Addrs[0], keeper.Addrs[1], types.NewSendAuthorization(coins), time.Hour) - - _, err = h(input.Ctx, grantMsg) - require.NoError(t, err) - - revokeMsg := types.NewMsgRevokeAuthorization(keeper.Addrs[0], keeper.Addrs[1], banktypes.TypeMsgSend) - _, err = h(input.Ctx, revokeMsg) - require.NoError(t, err) - - _, found := input.AuthorizationKeeper.GetGrant(input.Ctx, keeper.Addrs[1], keeper.Addrs[0], banktypes.TypeMsgSend) - require.False(t, found) -} - -func TestExecute(t *testing.T) { - input := keeper.CreateTestInput(t) - h := NewHandler(input.AuthorizationKeeper) - coins := sdk.NewCoins(sdk.NewCoin("foo", sdk.NewInt(1_000_000_000))) - input.BankKeeper.SetBalances(input.Ctx, keeper.Addrs[0], coins) - - grantMsg, err := types.NewMsgGrantAuthorization(keeper.Addrs[0], keeper.Addrs[1], types.NewSendAuthorization(coins), time.Hour) - require.NoError(t, err) - - _, err = h(input.Ctx, grantMsg) - require.NoError(t, err) - - execMsg, err := types.NewMsgExecAuthorized(keeper.Addrs[1], []sdk.Msg{ - banktypes.NewMsgSend(keeper.Addrs[0], keeper.Addrs[1], coins), - }) - - _, err = h(input.Ctx, execMsg) - require.NoError(t, err) -} diff --git a/x/msgauth/keeper/keeper.go b/x/msgauth/keeper/keeper.go deleted file mode 100644 index cfc550bc1..000000000 --- a/x/msgauth/keeper/keeper.go +++ /dev/null @@ -1,252 +0,0 @@ -package keeper - -import ( - "bytes" - "fmt" - "time" - - "github.com/gogo/protobuf/proto" - - "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - - "github.com/terra-project/core/x/msgauth/types" -) - -// Keeper of the msgauth store -type Keeper struct { - storeKey sdk.StoreKey - cdc codec.BinaryMarshaler - router sdk.Router -} - -// NewKeeper constructs a message authorization Keeper -func NewKeeper( - cdc codec.BinaryMarshaler, - storeKey sdk.StoreKey, - router sdk.Router, -) Keeper { - return Keeper{ - cdc: cdc, - storeKey: storeKey, - router: router, - } -} - -// GetGrant returns grant between granter and grantee for the given msg type -func (k Keeper) GetGrant(ctx sdk.Context, granterAddr sdk.AccAddress, granteeAddr sdk.AccAddress, msgType string) (grant types.AuthorizationGrant, found bool) { - store := ctx.KVStore(k.storeKey) - bz := store.Get(types.GetGrantKey(granterAddr, granteeAddr, msgType)) - if bz == nil { - return grant, false - } - - k.cdc.MustUnmarshalBinaryBare(bz, &grant) - return grant, true -} - -// GetGrants returns all the grants between granter and grantee -func (k Keeper) GetGrants(ctx sdk.Context, granterAddr sdk.AccAddress, granteeAddr sdk.AccAddress) (grants types.AuthorizationGrants) { - store := ctx.KVStore(k.storeKey) - iter := sdk.KVStorePrefixIterator(store, types.GetGrantsKey(granterAddr, granteeAddr)) - defer iter.Close() - for ; iter.Valid(); iter.Next() { - var authorizationGrant types.AuthorizationGrant - k.cdc.MustUnmarshalBinaryBare(iter.Value(), &authorizationGrant) - grants = append(grants, authorizationGrant) - } - - return grants -} - -// GetAllGrants returns all the grants of a granter -func (k Keeper) GetAllGrants(ctx sdk.Context, granterAddr sdk.AccAddress) (grants types.AuthorizationGrants) { - store := ctx.KVStore(k.storeKey) - iter := sdk.KVStorePrefixIterator(store, types.GetAllGrantsKey(granterAddr)) - defer iter.Close() - for ; iter.Valid(); iter.Next() { - var authorizationGrant types.AuthorizationGrant - k.cdc.MustUnmarshalBinaryBare(iter.Value(), &authorizationGrant) - grants = append(grants, authorizationGrant) - } - - return grants -} - -// DispatchActions attempts to execute the provided messages via authorization -// grants from the message signer to the grantee. -func (k Keeper) DispatchActions(ctx sdk.Context, granteeAddr sdk.AccAddress, msgs []sdk.Msg) error { - for _, msg := range msgs { - signers := msg.GetSigners() - if len(signers) != 1 { - return sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "authorization can be given to msg with only one signer") - } - granterAddr := signers[0] - if !bytes.Equal(granterAddr, granteeAddr) { - grant, found := k.GetGrant(ctx, granterAddr, granteeAddr, msg.Type()) - if !found { - return sdkerrors.Wrapf(sdkerrors.ErrUnauthorized, "authorization not found") - } - - authorization := grant.Authorization.GetCachedValue().(types.AuthorizationI) - allow, updated, del := authorization.Accept(msg, ctx.BlockHeader()) - if !allow { - return sdkerrors.Wrapf(sdkerrors.ErrUnauthorized, "authorization not found") - } - - if del { - k.RevokeGrant(ctx, granterAddr, granteeAddr, msg.Type()) - k.RevokeFromGrantQueue(ctx, granterAddr, granteeAddr, msg.Type(), grant.Expiration) - } else if updated != nil { - protoMsg, ok := updated.(proto.Message) - if !ok { - return fmt.Errorf("%T does not implement proto.Message", authorization) - } - - any, err := codectypes.NewAnyWithValue(protoMsg) - if err != nil { - return err - } - - grant.Authorization = any - k.SetGrant(ctx, granterAddr, granteeAddr, msg.Type(), grant) - } - } - - handler := k.router.Route(ctx, msg.Route()) - if handler == nil { - return sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized message route: %s", msg.Route()) - } - - res, err := handler(ctx, msg) - if err != nil { - return sdkerrors.Wrapf(err, "failed to execute message; message %s", msg.Type()) - } - - var events sdk.Events - for _, event := range res.Events { - events = append(events, sdk.Event(event)) - } - - ctx.EventManager().EmitEvents(events) - } - - return nil -} - -// SetGrant method grants the provided authorization to the grantee on the granter's account with the provided expiration -// time. If there is an existing authorization grant for the same `sdk.Msg` type, this grant -// overwrites that. -func (k Keeper) SetGrant( - ctx sdk.Context, granterAddr, granteeAddr sdk.AccAddress, - msgType string, grant types.AuthorizationGrant) { - store := ctx.KVStore(k.storeKey) - bz := k.cdc.MustMarshalBinaryBare(&grant) - - store.Set(types.GetGrantKey(granterAddr, granteeAddr, msgType), bz) -} - -// RevokeGrant removes method revokes any authorization for the provided message type granted to the grantee by the granter. -func (k Keeper) RevokeGrant(ctx sdk.Context, granterAddr, granteeAddr sdk.AccAddress, msgType string) { - store := ctx.KVStore(k.storeKey) - store.Delete(types.GetGrantKey(granterAddr, granteeAddr, msgType)) -} - -// IterateGrants iterates over all authorization grants -func (k Keeper) IterateGrants(ctx sdk.Context, - handler func(granterAddr, granteeAddr sdk.AccAddress, grant types.AuthorizationGrant) bool) { - store := ctx.KVStore(k.storeKey) - iter := sdk.KVStorePrefixIterator(store, types.GrantKey) - defer iter.Close() - for ; iter.Valid(); iter.Next() { - var grant types.AuthorizationGrant - granterAddr, granteeAddr := types.ExtractAddressesFromGrantKey(iter.Key()) - k.cdc.MustUnmarshalBinaryBare(iter.Value(), &grant) - if handler(granterAddr, granteeAddr, grant) { - break - } - } -} - -// grant queue timeslice operations - -// GetGrantQueueTimeSlice gets a specific grant queue timeslice. A timeslice is a slice of GGMPair -// corresponding to grants that expire at a certain time. -func (k Keeper) GetGrantQueueTimeSlice(ctx sdk.Context, timestamp time.Time) (ggmPairs types.GGMPairs) { - store := ctx.KVStore(k.storeKey) - bz := store.Get(types.GetGrantTimeKey(timestamp)) - if bz == nil { - return types.GGMPairs{} - } - k.cdc.MustUnmarshalBinaryBare(bz, &ggmPairs) - return ggmPairs -} - -// SetGrantQueueTimeSlice sets a specific grant queue timeslice. -func (k Keeper) SetGrantQueueTimeSlice(ctx sdk.Context, timestamp time.Time, keys types.GGMPairs) { - store := ctx.KVStore(k.storeKey) - bz := k.cdc.MustMarshalBinaryBare(&keys) - store.Set(types.GetGrantTimeKey(timestamp), bz) -} - -// InsertGrantQueue inserts an grant to the appropriate timeslice in the grant queue -func (k Keeper) InsertGrantQueue(ctx sdk.Context, granterAddr, - granteeAddr sdk.AccAddress, msgType string, completionTime time.Time) { - - timeSlice := k.GetGrantQueueTimeSlice(ctx, completionTime) - ggmPair := types.GGMPair{GranterAddress: granterAddr.String(), GranteeAddress: granteeAddr.String(), MsgType: msgType} - if len(timeSlice.Pairs) == 0 { - k.SetGrantQueueTimeSlice(ctx, completionTime, types.GGMPairs{Pairs: []types.GGMPair{ggmPair}}) - } else { - timeSlice.Pairs = append(timeSlice.Pairs, ggmPair) - k.SetGrantQueueTimeSlice(ctx, completionTime, timeSlice) - } -} - -// RevokeFromGrantQueue removes grant data from the timeslice queue -func (k Keeper) RevokeFromGrantQueue(ctx sdk.Context, granterAddr, - granteeAddr sdk.AccAddress, msgType string, completionTime time.Time) { - timeSlice := k.GetGrantQueueTimeSlice(ctx, completionTime) - - granterAddrStr := granterAddr.String() - granteeAddrStr := granteeAddr.String() - - for idx, ggmPair := range timeSlice.Pairs { - if ggmPair.GranterAddress == granterAddrStr && - ggmPair.GranteeAddress == granteeAddrStr && - ggmPair.MsgType == msgType { - - lastIdx := len(timeSlice.Pairs) - 1 - timeSlice.Pairs[idx] = timeSlice.Pairs[lastIdx] - timeSlice.Pairs = timeSlice.Pairs[:lastIdx] - - k.SetGrantQueueTimeSlice(ctx, completionTime, timeSlice) - return - } - } -} - -// GrantQueueIterator returns all the grant queue timeslices from time 0 until endTime -func (k Keeper) GrantQueueIterator(ctx sdk.Context, endTime time.Time) sdk.Iterator { - store := ctx.KVStore(k.storeKey) - return store.Iterator(types.GrantQueueKey, - sdk.InclusiveEndBytes(types.GetGrantTimeKey(endTime))) -} - -// DequeueAllMatureGrantQueue returns a concatenated list of all the timeslices inclusively previous to -// current block time, and deletes the timeslices from the queue -func (k Keeper) DequeueAllMatureGrantQueue(ctx sdk.Context) (matureGrants types.GGMPairs) { - store := ctx.KVStore(k.storeKey) - // gets an iterator for all timeslices from time 0 until the current Blockheader time - grantTimesliceIterator := k.GrantQueueIterator(ctx, ctx.BlockHeader().Time) - for ; grantTimesliceIterator.Valid(); grantTimesliceIterator.Next() { - timeslice := types.GGMPairs{} - value := grantTimesliceIterator.Value() - k.cdc.MustUnmarshalBinaryBare(value, ×lice) - matureGrants.Pairs = append(matureGrants.Pairs, timeslice.Pairs...) - store.Delete(grantTimesliceIterator.Key()) - } - return matureGrants -} diff --git a/x/msgauth/keeper/keeper_test.go b/x/msgauth/keeper/keeper_test.go deleted file mode 100644 index bad790980..000000000 --- a/x/msgauth/keeper/keeper_test.go +++ /dev/null @@ -1,157 +0,0 @@ -package keeper - -import ( - "testing" - "time" - - "github.com/stretchr/testify/require" - - sdk "github.com/cosmos/cosmos-sdk/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - - core "github.com/terra-project/core/types" - "github.com/terra-project/core/x/msgauth/types" -) - -func TestKeeper(t *testing.T) { - input := CreateTestInput(t) - - // "verify that no authorization returns nil" - _, found := input.AuthorizationKeeper.GetGrant(input.Ctx, Addrs[0], Addrs[1], banktypes.TypeMsgSend) - require.False(t, found) - - now := input.Ctx.BlockHeader().Time - - // "verify if authorization is accepted" - grant, err := types.NewAuthorizationGrant(types.NewSendAuthorization(InitCoins), now.Add(time.Hour)) - require.NoError(t, err) - - input.AuthorizationKeeper.SetGrant(input.Ctx, Addrs[0], Addrs[1], banktypes.TypeMsgSend, grant) - grant2, _ := input.AuthorizationKeeper.GetGrant(input.Ctx, Addrs[0], Addrs[1], banktypes.TypeMsgSend) - require.Equal(t, grant, grant2) - require.Equal(t, grant2.GetAuthorization().MsgType(), banktypes.TypeMsgSend) - - // "verify fetching authorization with wrong msg type fails" - _, found = input.AuthorizationKeeper.GetGrant(input.Ctx, Addrs[0], Addrs[1], banktypes.MsgMultiSend{}.Type()) - require.False(t, found) - - // "verify fetching authorization with wrong grantee fails" - _, found = input.AuthorizationKeeper.GetGrant(input.Ctx, Addrs[0], Addrs[2], banktypes.TypeMsgSend) - require.False(t, found) - - grants := input.AuthorizationKeeper.GetGrants(input.Ctx, Addrs[0], Addrs[1]) - require.Equal(t, 1, len(grants)) - - allGrants := input.AuthorizationKeeper.GetAllGrants(input.Ctx, Addrs[0]) - require.Equal(t, 1, len(allGrants)) - - input.AuthorizationKeeper.IterateGrants(input.Ctx, func( - granter, grantee sdk.AccAddress, grant2 types.AuthorizationGrant, - ) bool { - require.Equal(t, Addrs[0], granter) - require.Equal(t, Addrs[1], grantee) - require.Equal(t, grant, grant2) - return false - }) - - // "verify revoke fails with wrong information" - input.AuthorizationKeeper.RevokeGrant(input.Ctx, Addrs[0], Addrs[2], banktypes.TypeMsgSend) - _, found = input.AuthorizationKeeper.GetGrant(input.Ctx, Addrs[0], Addrs[1], banktypes.TypeMsgSend) - require.True(t, found) - - // "verify revoke executes with correct information" - input.AuthorizationKeeper.RevokeGrant(input.Ctx, Addrs[0], Addrs[1], banktypes.TypeMsgSend) - _, found = input.AuthorizationKeeper.GetGrant(input.Ctx, Addrs[0], Addrs[1], banktypes.TypeMsgSend) - require.False(t, found) - -} - -func TestKeeperFees(t *testing.T) { - input := CreateTestInput(t) - - now := input.Ctx.BlockHeader().Time - - smallCoins := sdk.NewCoins(sdk.NewInt64Coin(core.MicroLunaDenom, 2)) - coins := sdk.NewCoins(sdk.NewInt64Coin(core.MicroLunaDenom, 20)) - largeCoins := sdk.NewCoins(sdk.NewInt64Coin(core.MicroLunaDenom, 123)) - - msgs := []sdk.Msg{banktypes.NewMsgSend(Addrs[0], Addrs[2], smallCoins)} - - // "verify dispatch fails with invalid authorization" - err := input.AuthorizationKeeper.DispatchActions(input.Ctx, Addrs[1], msgs) - require.Error(t, err) - - // "verify dispatch executes with correct information" - // grant authorization - grant, err := types.NewAuthorizationGrant(types.NewSendAuthorization(coins), now) - require.NoError(t, err) - input.AuthorizationKeeper.SetGrant(input.Ctx, Addrs[0], Addrs[1], banktypes.TypeMsgSend, grant) - - grant2, found := input.AuthorizationKeeper.GetGrant(input.Ctx, Addrs[0], Addrs[1], banktypes.TypeMsgSend) - require.True(t, found) - require.Equal(t, grant, grant2) - require.Equal(t, - grant.Authorization.GetCachedValue().(types.AuthorizationI).MsgType(), - banktypes.TypeMsgSend, - ) - - err = input.AuthorizationKeeper.DispatchActions(input.Ctx, Addrs[1], msgs) - require.NoError(t, err) - - _, found = input.AuthorizationKeeper.GetGrant(input.Ctx, Addrs[0], Addrs[1], banktypes.TypeMsgSend) - require.True(t, found) - - // "verify dispatch fails with overlimit" - msgs = []sdk.Msg{banktypes.NewMsgSend(Addrs[0], Addrs[2], largeCoins)} - err = input.AuthorizationKeeper.DispatchActions(input.Ctx, Addrs[1], msgs) - require.Error(t, err) - - _, found = input.AuthorizationKeeper.GetGrant(input.Ctx, Addrs[0], Addrs[1], banktypes.TypeMsgSend) - require.True(t, found) - - // "verify dispatch success and revoke grant which is out of limit" - msgs = []sdk.Msg{banktypes.NewMsgSend(Addrs[0], Addrs[2], coins.Sub(smallCoins))} - err = input.AuthorizationKeeper.DispatchActions(input.Ctx, Addrs[1], msgs) - require.NoError(t, err) - - _, found = input.AuthorizationKeeper.GetGrant(input.Ctx, Addrs[0], Addrs[1], banktypes.TypeMsgSend) - require.False(t, found) -} - -func TestGrantQueue(t *testing.T) { - input := CreateTestInput(t) - - now := input.Ctx.BlockTime() - input.AuthorizationKeeper.InsertGrantQueue(input.Ctx, Addrs[0], Addrs[1], banktypes.TypeMsgSend, now.Add(time.Hour)) - input.AuthorizationKeeper.InsertGrantQueue(input.Ctx, Addrs[0], Addrs[1], banktypes.TypeMsgSend+"2", now.Add(time.Hour)) - - ggmPairs := []types.GGMPair{ - { - GranterAddress: Addrs[0].String(), - GranteeAddress: Addrs[1].String(), - MsgType: banktypes.TypeMsgSend, - }, - { - GranterAddress: Addrs[0].String(), - GranteeAddress: Addrs[1].String(), - MsgType: banktypes.TypeMsgSend + "2", - }, - } - - timeSlice := input.AuthorizationKeeper.GetGrantQueueTimeSlice(input.Ctx, now) - require.Equal(t, 0, len(timeSlice.Pairs)) - - timeSlice = input.AuthorizationKeeper.GetGrantQueueTimeSlice(input.Ctx, now.Add(time.Hour)) - require.Equal(t, ggmPairs, timeSlice.Pairs) - - allPairs := input.AuthorizationKeeper.DequeueAllMatureGrantQueue(input.Ctx.WithBlockTime(now)) - require.Equal(t, 0, len(allPairs.Pairs)) - - allPairs = input.AuthorizationKeeper.DequeueAllMatureGrantQueue(input.Ctx.WithBlockTime(now.Add(time.Hour))) - require.Equal(t, ggmPairs, allPairs.Pairs) - - input.AuthorizationKeeper.InsertGrantQueue(input.Ctx, Addrs[0], Addrs[1], banktypes.TypeMsgSend, now.Add(time.Hour)) - input.AuthorizationKeeper.RevokeFromGrantQueue(input.Ctx, Addrs[0], Addrs[1], banktypes.TypeMsgSend, now.Add(time.Hour)) - timeSlice = input.AuthorizationKeeper.GetGrantQueueTimeSlice(input.Ctx, now.Add(time.Hour)) - require.Equal(t, 0, len(timeSlice.Pairs)) -} diff --git a/x/msgauth/keeper/legacy_querier.go b/x/msgauth/keeper/legacy_querier.go deleted file mode 100644 index 0c1bc7749..000000000 --- a/x/msgauth/keeper/legacy_querier.go +++ /dev/null @@ -1,59 +0,0 @@ -package keeper - -import ( - "github.com/cosmos/cosmos-sdk/codec" - - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - - abci "github.com/tendermint/tendermint/abci/types" - - "github.com/terra-project/core/x/msgauth/types" -) - -// NewLegacyQuerier is the module level router for state queries -func NewLegacyQuerier(keeper Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { - return func(ctx sdk.Context, path []string, req abci.RequestQuery) (res []byte, err error) { - switch path[0] { - case types.QueryGrants: - return queryGrants(ctx, req, keeper, legacyQuerierCdc) - case types.QueryAllGrants: - return queryAllGrants(ctx, req, keeper, legacyQuerierCdc) - default: - return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unknown %s query endpoint: %s", types.ModuleName, path[0]) - } - } -} - -func queryGrants(ctx sdk.Context, req abci.RequestQuery, keeper Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { - var params types.QueryGrantsParams - err := legacyQuerierCdc.UnmarshalJSON(req.Data, ¶ms) - if err != nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrJSONUnmarshal, err.Error()) - } - - grants := keeper.GetGrants(ctx, params.Granter, params.Grantee) - - bz, err := codec.MarshalJSONIndent(legacyQuerierCdc, grants) - if err != nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrJSONMarshal, err.Error()) - } - - return bz, nil -} - -func queryAllGrants(ctx sdk.Context, req abci.RequestQuery, keeper Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { - var params types.QueryAllGrantsParams - err := legacyQuerierCdc.UnmarshalJSON(req.Data, ¶ms) - if err != nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrJSONUnmarshal, err.Error()) - } - - allGrants := keeper.GetAllGrants(ctx, params.Granter) - bz, err := codec.MarshalJSONIndent(legacyQuerierCdc, allGrants) - if err != nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrJSONMarshal, err.Error()) - } - - return bz, nil -} diff --git a/x/msgauth/keeper/legacy_querier_test.go b/x/msgauth/keeper/legacy_querier_test.go deleted file mode 100644 index fd525a231..000000000 --- a/x/msgauth/keeper/legacy_querier_test.go +++ /dev/null @@ -1,87 +0,0 @@ -package keeper - -import ( - "testing" - - "github.com/stretchr/testify/require" - - abci "github.com/tendermint/tendermint/abci/types" - - sdk "github.com/cosmos/cosmos-sdk/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - - "github.com/terra-project/core/x/msgauth/types" -) - -func TestLegacyNewLegacyQuerier(t *testing.T) { - input := CreateTestInput(t) - querier := NewLegacyQuerier(input.AuthorizationKeeper, input.Cdc) - - query := abci.RequestQuery{ - Path: "", - Data: []byte{}, - } - - _, err := querier(input.Ctx, []string{"INVALID_PATH"}, query) - require.Error(t, err) -} - -func TestLegacyQueryGrants(t *testing.T) { - input := CreateTestInput(t) - querier := NewLegacyQuerier(input.AuthorizationKeeper, input.Cdc) - now := input.Ctx.BlockHeader().Time - - // register grant - grant, err := types.NewAuthorizationGrant(types.NewSendAuthorization(sdk.NewCoins(sdk.NewCoin("foo", sdk.NewInt(123)))), now) - require.NoError(t, err) - - input.AuthorizationKeeper.SetGrant(input.Ctx, Addrs[0], Addrs[1], banktypes.TypeMsgSend, grant) - - params := types.NewQueryGrantsParams(Addrs[0], Addrs[1]) - bz, err := input.Cdc.MarshalJSON(params) - require.NoError(t, err) - - query := abci.RequestQuery{ - Path: "", - Data: bz, - } - - res, err := querier(input.Ctx, []string{types.QueryGrants}, query) - require.NoError(t, err) - - var resGrant types.AuthorizationGrants - input.Cdc.MustUnmarshalJSON(res, &resGrant) - require.Equal(t, types.AuthorizationGrants{grant}, resGrant) -} - -func TestLegacyQueryAllGrants(t *testing.T) { - input := CreateTestInput(t) - querier := NewLegacyQuerier(input.AuthorizationKeeper, input.Cdc) - now := input.Ctx.BlockHeader().Time - - // register grants - grant, err := types.NewAuthorizationGrant(types.NewSendAuthorization(sdk.NewCoins(sdk.NewCoin("foo", sdk.NewInt(123)))), now) - require.NoError(t, err) - - grant2, err := types.NewAuthorizationGrant(types.NewGenericAuthorization(banktypes.TypeMsgSend+"2"), now) - require.NoError(t, err) - - input.AuthorizationKeeper.SetGrant(input.Ctx, Addrs[0], Addrs[1], banktypes.TypeMsgSend, grant) - input.AuthorizationKeeper.SetGrant(input.Ctx, Addrs[0], Addrs[1], banktypes.TypeMsgSend+"2", grant2) - - params := types.NewQueryGrantsParams(Addrs[0], Addrs[1]) - bz, err := input.Cdc.MarshalJSON(params) - require.NoError(t, err) - - query := abci.RequestQuery{ - Path: "", - Data: bz, - } - - res, err := querier(input.Ctx, []string{types.QueryAllGrants}, query) - require.NoError(t, err) - - var resGrants types.AuthorizationGrants - input.Cdc.MustUnmarshalJSON(res, &resGrants) - require.Equal(t, types.AuthorizationGrants{grant, grant2}, resGrants) -} diff --git a/x/msgauth/keeper/msg_server.go b/x/msgauth/keeper/msg_server.go deleted file mode 100644 index 9d382fef7..000000000 --- a/x/msgauth/keeper/msg_server.go +++ /dev/null @@ -1,130 +0,0 @@ -package keeper - -import ( - "context" - - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - - "github.com/terra-project/core/x/msgauth/types" -) - -type msgServer struct { - Keeper -} - -// NewMsgServerImpl returns an implementation of the bank MsgServer interface -// for the provided Keeper. -func NewMsgServerImpl(keeper Keeper) types.MsgServer { - return &msgServer{Keeper: keeper} -} - -func (k msgServer) GrantAuthorization(goCtx context.Context, msg *types.MsgGrantAuthorization) (*types.MsgGrantAuthorizationResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - expiration := ctx.BlockTime().Add(msg.Period) - - authorization := msg.GetAuthorization() - if !types.IsGrantableMsgType(authorization.MsgType()) { - return nil, types.ErrInvalidMsgType - } - - granter, err := sdk.AccAddressFromBech32(msg.Granter) - if err != nil { - return nil, err - } - - grantee, err := sdk.AccAddressFromBech32(msg.Grantee) - if err != nil { - return nil, err - } - - grant, err := types.NewAuthorizationGrant(authorization, expiration) - if err != nil { - return nil, err - } - - _, found := k.GetGrant(ctx, granter, grantee, authorization.MsgType()) - if found { - return nil, sdkerrors.Wrap(types.ErrGrantExists, "cannot regrant existing authorization") - } - - k.SetGrant(ctx, granter, grantee, authorization.MsgType(), grant) - k.InsertGrantQueue(ctx, granter, grantee, authorization.MsgType(), expiration) - - ctx.EventManager().EmitEvents(sdk.Events{ - sdk.NewEvent( - types.EventGrantAuthorization, - sdk.NewAttribute(types.AttributeKeyGrantType, authorization.MsgType()), - sdk.NewAttribute(types.AttributeKeyGranterAddress, msg.Granter), - sdk.NewAttribute(types.AttributeKeyGranteeAddress, msg.Grantee), - ), - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - ), - }) - - return &types.MsgGrantAuthorizationResponse{}, nil -} - -func (k msgServer) RevokeAuthorization(goCtx context.Context, msg *types.MsgRevokeAuthorization) (*types.MsgRevokeAuthorizationResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - granter, err := sdk.AccAddressFromBech32(msg.Granter) - if err != nil { - return nil, err - } - - grantee, err := sdk.AccAddressFromBech32(msg.Grantee) - if err != nil { - return nil, err - } - - grant, found := k.GetGrant(ctx, granter, grantee, msg.AuthorizationMsgType) - if !found { - return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "grant is not found") - } - - k.RevokeGrant(ctx, granter, grantee, msg.AuthorizationMsgType) - k.RevokeFromGrantQueue(ctx, granter, grantee, msg.AuthorizationMsgType, grant.Expiration) - - ctx.EventManager().EmitEvents(sdk.Events{ - sdk.NewEvent( - types.EventRevokeAuthorization, - sdk.NewAttribute(types.AttributeKeyGrantType, msg.AuthorizationMsgType), - sdk.NewAttribute(types.AttributeKeyGranterAddress, msg.Granter), - sdk.NewAttribute(types.AttributeKeyGranteeAddress, msg.Grantee), - ), - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - ), - }) - - return &types.MsgRevokeAuthorizationResponse{}, nil -} - -func (k msgServer) ExecAuthorized(goCtx context.Context, msg *types.MsgExecAuthorized) (*types.MsgExecAuthorizedResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - grantee, err := sdk.AccAddressFromBech32(msg.Grantee) - if err != nil { - return nil, err - } - - err = k.DispatchActions(ctx, grantee, msg.GetMsgs()) - if err != nil { - return nil, err - } - - ctx.EventManager().EmitEvents(sdk.Events{ - sdk.NewEvent( - types.EventExecuteAuthorization, - sdk.NewAttribute(types.AttributeKeyGranteeAddress, msg.Grantee), - ), - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - ), - }) - - return &types.MsgExecAuthorizedResponse{}, nil -} diff --git a/x/msgauth/keeper/querier.go b/x/msgauth/keeper/querier.go deleted file mode 100644 index 4d7a22aa6..000000000 --- a/x/msgauth/keeper/querier.go +++ /dev/null @@ -1,64 +0,0 @@ -package keeper - -import ( - "context" - - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/terra-project/core/x/msgauth/types" -) - -// querier is used as Keeper will have duplicate methods if used directly, and gRPC names take precedence over q -type querier struct { - Keeper -} - -// NewQuerier returns an implementation of the market QueryServer interface -// for the provided Keeper. -func NewQuerier(keeper Keeper) types.QueryServer { - return &querier{Keeper: keeper} -} - -var _ types.QueryServer = querier{} - -// Grants queries for grants between a granter-grantee pair -func (q querier) Grants(c context.Context, req *types.QueryGrantsRequest) (*types.QueryGrantsResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - - granterAddr, err := sdk.AccAddressFromBech32(req.Granter) - if err != nil { - return nil, status.Error(codes.InvalidArgument, err.Error()) - } - - granteeAddr, err := sdk.AccAddressFromBech32(req.Grantee) - if err != nil { - return nil, status.Error(codes.InvalidArgument, err.Error()) - } - - ctx := sdk.UnwrapSDKContext(c) - grants := q.GetGrants(ctx, granterAddr, granteeAddr) - - return &types.QueryGrantsResponse{Grants: grants}, nil -} - -// AllGrants queries for all grants of a granter -func (q querier) AllGrants(c context.Context, req *types.QueryAllGrantsRequest) (*types.QueryAllGrantsResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - - granterAddr, err := sdk.AccAddressFromBech32(req.Granter) - if err != nil { - return nil, status.Error(codes.InvalidArgument, err.Error()) - } - - ctx := sdk.UnwrapSDKContext(c) - grants := q.GetAllGrants(ctx, granterAddr) - - return &types.QueryAllGrantsResponse{Grants: grants}, nil -} diff --git a/x/msgauth/keeper/querier_test.go b/x/msgauth/keeper/querier_test.go deleted file mode 100644 index b21d5e714..000000000 --- a/x/msgauth/keeper/querier_test.go +++ /dev/null @@ -1,60 +0,0 @@ -package keeper - -import ( - "testing" - - "github.com/stretchr/testify/require" - - sdk "github.com/cosmos/cosmos-sdk/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - - "github.com/terra-project/core/x/msgauth/types" -) - -func TestQueryGrants(t *testing.T) { - input := CreateTestInput(t) - ctx := sdk.WrapSDKContext(input.Ctx) - - querier := NewQuerier(input.AuthorizationKeeper) - - now := input.Ctx.BlockHeader().Time - - // register grant - grant, err := types.NewAuthorizationGrant(types.NewSendAuthorization(sdk.NewCoins(sdk.NewCoin("foo", sdk.NewInt(123)))), now) - require.NoError(t, err) - - input.AuthorizationKeeper.SetGrant(input.Ctx, Addrs[0], Addrs[1], banktypes.TypeMsgSend, grant) - - // query grants - res, err := querier.Grants(ctx, &types.QueryGrantsRequest{ - Granter: Addrs[0].String(), - Grantee: Addrs[1].String(), - }) - require.NoError(t, err) - require.Equal(t, &types.QueryGrantsResponse{Grants: types.AuthorizationGrants{grant}}, res) -} - -func TestQueryAllGrants(t *testing.T) { - input := CreateTestInput(t) - ctx := sdk.WrapSDKContext(input.Ctx) - - querier := NewQuerier(input.AuthorizationKeeper) - now := input.Ctx.BlockHeader().Time - - // register grants - grant, err := types.NewAuthorizationGrant(types.NewSendAuthorization(sdk.NewCoins(sdk.NewCoin("foo", sdk.NewInt(123)))), now) - require.NoError(t, err) - - grant2, err := types.NewAuthorizationGrant(types.NewGenericAuthorization(banktypes.TypeMsgSend+"2"), now) - require.NoError(t, err) - - input.AuthorizationKeeper.SetGrant(input.Ctx, Addrs[0], Addrs[1], banktypes.TypeMsgSend, grant) - input.AuthorizationKeeper.SetGrant(input.Ctx, Addrs[0], Addrs[1], banktypes.TypeMsgSend+"2", grant2) - - res, err := querier.Grants(ctx, &types.QueryGrantsRequest{ - Granter: Addrs[0].String(), - Grantee: Addrs[1].String(), - }) - require.NoError(t, err) - require.Equal(t, &types.QueryGrantsResponse{Grants: types.AuthorizationGrants{grant, grant2}}, res) -} diff --git a/x/msgauth/keeper/test_utils.go b/x/msgauth/keeper/test_utils.go deleted file mode 100644 index 670f122db..000000000 --- a/x/msgauth/keeper/test_utils.go +++ /dev/null @@ -1,157 +0,0 @@ -//nolint:deadcode,unused -//DONTCOVER -package keeper - -import ( - "testing" - "time" - - "github.com/stretchr/testify/require" - - customauth "github.com/terra-project/core/custom/auth" - custombank "github.com/terra-project/core/custom/bank" - customparams "github.com/terra-project/core/custom/params" - core "github.com/terra-project/core/types" - "github.com/terra-project/core/x/msgauth/types" - - "github.com/tendermint/tendermint/crypto" - "github.com/tendermint/tendermint/crypto/secp256k1" - "github.com/tendermint/tendermint/libs/log" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - dbm "github.com/tendermint/tm-db" - - "github.com/cosmos/cosmos-sdk/baseapp" - "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - simparams "github.com/cosmos/cosmos-sdk/simapp/params" - "github.com/cosmos/cosmos-sdk/std" - "github.com/cosmos/cosmos-sdk/store" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" - authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" - "github.com/cosmos/cosmos-sdk/x/auth/tx" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/cosmos/cosmos-sdk/x/bank" - bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" - paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" -) - -// ModuleBasics nolint -var ModuleBasics = module.NewBasicManager( - customauth.AppModuleBasic{}, - custombank.AppModuleBasic{}, - customparams.AppModuleBasic{}, -) - -// MakeTestCodec nolint -func MakeTestCodec(t *testing.T) codec.Marshaler { - return MakeEncodingConfig(t).Marshaler -} - -// MakeEncodingConfig nolint -func MakeEncodingConfig(_ *testing.T) simparams.EncodingConfig { - amino := codec.NewLegacyAmino() - interfaceRegistry := codectypes.NewInterfaceRegistry() - marshaler := codec.NewProtoCodec(interfaceRegistry) - txCfg := tx.NewTxConfig(marshaler, tx.DefaultSignModes) - - std.RegisterInterfaces(interfaceRegistry) - std.RegisterLegacyAminoCodec(amino) - - ModuleBasics.RegisterLegacyAminoCodec(amino) - ModuleBasics.RegisterInterfaces(interfaceRegistry) - types.RegisterLegacyAminoCodec(amino) - types.RegisterInterfaces(interfaceRegistry) - - return simparams.EncodingConfig{ - InterfaceRegistry: interfaceRegistry, - Marshaler: marshaler, - TxConfig: txCfg, - Amino: amino, - } -} - -// TestInput nolint -var ( - PubKeys = []crypto.PubKey{ - secp256k1.GenPrivKey().PubKey(), - secp256k1.GenPrivKey().PubKey(), - secp256k1.GenPrivKey().PubKey(), - } - - Addrs = []sdk.AccAddress{ - sdk.AccAddress(PubKeys[0].Address()), - sdk.AccAddress(PubKeys[1].Address()), - sdk.AccAddress(PubKeys[2].Address()), - } - - InitTokens = sdk.TokensFromConsensusPower(200) - InitCoins = sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, InitTokens)) -) - -// TestInput nolint -type TestInput struct { - Ctx sdk.Context - Cdc *codec.LegacyAmino - AccountKeeper authkeeper.AccountKeeper - BankKeeper bankkeeper.Keeper - AuthorizationKeeper Keeper -} - -// CreateTestInput nolint -func CreateTestInput(t *testing.T) TestInput { - keyAcc := sdk.NewKVStoreKey(authtypes.StoreKey) - keyBank := sdk.NewKVStoreKey(banktypes.StoreKey) - keyParams := sdk.NewKVStoreKey(paramstypes.StoreKey) - tKeyParams := sdk.NewTransientStoreKey(paramstypes.TStoreKey) - keyAuthorization := sdk.NewKVStoreKey(types.StoreKey) - - db := dbm.NewMemDB() - ms := store.NewCommitMultiStore(db) - ctx := sdk.NewContext(ms, tmproto.Header{Time: time.Now().UTC()}, false, log.NewNopLogger()) - encodingConfig := MakeEncodingConfig(t) - appCodec, legacyAmino := encodingConfig.Marshaler, encodingConfig.Amino - - ms.MountStoreWithDB(keyAcc, sdk.StoreTypeIAVL, db) - ms.MountStoreWithDB(keyBank, sdk.StoreTypeIAVL, db) - ms.MountStoreWithDB(tKeyParams, sdk.StoreTypeTransient, db) - ms.MountStoreWithDB(keyParams, sdk.StoreTypeIAVL, db) - ms.MountStoreWithDB(keyAuthorization, sdk.StoreTypeIAVL, db) - - require.NoError(t, ms.LoadLatestVersion()) - - blackListAddrs := map[string]bool{ - authtypes.FeeCollectorName: true, - } - - maccPerms := map[string][]string{ - authtypes.FeeCollectorName: nil, - } - - paramsKeeper := paramskeeper.NewKeeper(appCodec, legacyAmino, keyParams, tKeyParams) - accountKeeper := authkeeper.NewAccountKeeper(appCodec, keyAcc, paramsKeeper.Subspace(authtypes.ModuleName), authtypes.ProtoBaseAccount, maccPerms) - bankKeeper := bankkeeper.NewBaseKeeper(appCodec, keyBank, accountKeeper, paramsKeeper.Subspace(banktypes.ModuleName), blackListAddrs) - - totalSupply := sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, InitTokens.MulRaw(int64(len(Addrs))))) - bankKeeper.SetSupply(ctx, banktypes.NewSupply(totalSupply)) - - feeCollectorAcc := authtypes.NewEmptyModuleAccount(authtypes.FeeCollectorName) - accountKeeper.SetModuleAccount(ctx, feeCollectorAcc) - - for _, addr := range Addrs { - accountKeeper.SetAccount(ctx, authtypes.NewBaseAccountWithAddress(addr)) - err := bankKeeper.AddCoins(ctx, addr, InitCoins) - require.NoError(t, err) - } - - router := baseapp.NewRouter() - router.AddRoute(sdk.NewRoute(banktypes.ModuleName, bank.NewHandler(bankKeeper))) - - authorizationKeeper := NewKeeper(appCodec, keyAuthorization, router) - accountKeeper.SetParams(ctx, authtypes.DefaultParams()) - bankKeeper.SetParams(ctx, banktypes.DefaultParams()) - - return TestInput{ctx, legacyAmino, accountKeeper, bankKeeper, authorizationKeeper} -} diff --git a/x/msgauth/legacy/v05/migrate.go b/x/msgauth/legacy/v05/migrate.go deleted file mode 100644 index 7d5d5216b..000000000 --- a/x/msgauth/legacy/v05/migrate.go +++ /dev/null @@ -1,65 +0,0 @@ -package v05 - -import ( - "fmt" - - proto "github.com/gogo/protobuf/proto" - - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - - v04msgauth "github.com/terra-project/core/x/msgauth/legacy/v04" - v05msgauth "github.com/terra-project/core/x/msgauth/types" -) - -func migrateAuthorization(oldAuthorization v04msgauth.Authorization) *codectypes.Any { - var protoAuthorization proto.Message - - switch oldAuthorization := oldAuthorization.(type) { - case v04msgauth.GenericAuthorization: - { - protoAuthorization = &v05msgauth.GenericAuthorization{ - GrantMsgType: oldAuthorization.GrantMsgType, - } - } - case v04msgauth.SendAuthorization: - { - protoAuthorization = &v05msgauth.SendAuthorization{ - SpendLimit: oldAuthorization.SpendLimit, - } - } - - default: - panic(fmt.Errorf("%T is not a valid proposal content type", oldAuthorization)) - } - - // Convert the Authorization into Any. - authorizationAny, err := codectypes.NewAnyWithValue(protoAuthorization) - if err != nil { - panic(err) - } - - return authorizationAny -} - -// Migrate accepts exported v0.4 x/msgauth genesis state and migrates it to -// v0.5 x/msgauth genesis state. The migration includes: -// -// - Convert vote option & proposal status from byte to enum. -// - Migrate proposal content to Any. -// - Convert addresses from bytes to bech32 strings. -// - Re-encode in v0.40 GenesisState. -func Migrate(msgauthGenState v04msgauth.GenesisState) *v05msgauth.GenesisState { - entries := make([]v05msgauth.AuthorizationEntry, len(msgauthGenState.AuthorizationEntries)) - for i, e := range msgauthGenState.AuthorizationEntries { - entries[i] = v05msgauth.AuthorizationEntry{ - Granter: e.Granter.String(), - Grantee: e.Grantee.String(), - Authorization: migrateAuthorization(e.Authorization), - Expiration: e.Expiration, - } - } - - return &v05msgauth.GenesisState{ - AuthorizationEntries: entries, - } -} diff --git a/x/msgauth/legacy/v05/types.go b/x/msgauth/legacy/v05/types.go deleted file mode 100644 index 0e252e481..000000000 --- a/x/msgauth/legacy/v05/types.go +++ /dev/null @@ -1,6 +0,0 @@ -package v05 - -const ( - // ModuleName nolint - ModuleName = "msgauth" -) diff --git a/x/msgauth/module.go b/x/msgauth/module.go deleted file mode 100644 index b6bba2abf..000000000 --- a/x/msgauth/module.go +++ /dev/null @@ -1,194 +0,0 @@ -package msgauth - -import ( - "context" - "encoding/json" - "fmt" - "math/rand" - - "github.com/gorilla/mux" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/spf13/cobra" - - abci "github.com/tendermint/tendermint/abci/types" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - - "github.com/terra-project/core/x/msgauth/client/cli" - "github.com/terra-project/core/x/msgauth/client/rest" - "github.com/terra-project/core/x/msgauth/keeper" - "github.com/terra-project/core/x/msgauth/simulation" - "github.com/terra-project/core/x/msgauth/types" -) - -var ( - _ module.AppModule = AppModule{} - _ module.AppModuleBasic = AppModuleBasic{} -) - -// AppModuleBasic defines the basic application module used by the msgauth module. -type AppModuleBasic struct { - cdc codec.Marshaler -} - -// Name returns the ModuleName -func (AppModuleBasic) Name() string { - return types.ModuleName -} - -// RegisterLegacyAminoCodec registers the module's types on the given LegacyAmino codec. -func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - types.RegisterLegacyAminoCodec(cdc) -} - -// RegisterInterfaces registers the module's interface types -func (b AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) { - types.RegisterInterfaces(registry) -} - -// DefaultGenesis returns default genesis state as raw bytes for the msgauth -// module. -func (AppModuleBasic) DefaultGenesis(cdc codec.JSONMarshaler) json.RawMessage { - return cdc.MustMarshalJSON(types.DefaultGenesisState()) -} - -// ValidateGenesis performs genesis state validation for the msgauth module. -func (AppModuleBasic) ValidateGenesis(cdc codec.JSONMarshaler, config client.TxEncodingConfig, bz json.RawMessage) error { - var data types.GenesisState - if err := cdc.UnmarshalJSON(bz, &data); err != nil { - return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) - } - - return types.ValidateGenesis(&data) -} - -// RegisterRESTRoutes registers the REST routes for the msgauth module. -func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) { - rest.RegisterRoutes(clientCtx, rtr) -} - -// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the oracle module. -func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { - _ = types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) -} - -// GetTxCmd returns the root tx command for the oracle module. -func (AppModuleBasic) GetTxCmd() *cobra.Command { - return cli.GetTxCmd() -} - -// GetQueryCmd returns no root query command for the oracle module. -func (AppModuleBasic) GetQueryCmd() *cobra.Command { - return cli.GetQueryCmd() -} - -// AppModule implements the sdk.AppModule interface -type AppModule struct { - AppModuleBasic - keeper keeper.Keeper - accountKeeper types.AccountKeeper - bankKeeper types.BankKeeper -} - -// NewAppModule creates a new AppModule object -func NewAppModule( - cdc codec.Marshaler, - keeper keeper.Keeper, - accountKeeper types.AccountKeeper, - bankKeeper types.BankKeeper) AppModule { - return AppModule{ - AppModuleBasic: AppModuleBasic{cdc}, - keeper: keeper, - accountKeeper: accountKeeper, - bankKeeper: bankKeeper, - } -} - -// Name returns the msgauth module's name. -func (AppModule) Name() string { return types.ModuleName } - -// RegisterInvariants performs a no-op. -func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} - -// Route returns the message routing key for the msgauth module. -func (am AppModule) Route() sdk.Route { - return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper)) -} - -// QuerierRoute returns the msgauth module's querier route name. -func (AppModule) QuerierRoute() string { return types.QuerierRoute } - -// LegacyQuerierHandler returns the msgauth module sdk.Querier. -func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { - return keeper.NewLegacyQuerier(am.keeper, legacyQuerierCdc) -} - -// RegisterServices registers module services. -func (am AppModule) RegisterServices(cfg module.Configurator) { - types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) - querier := keeper.NewQuerier(am.keeper) - types.RegisterQueryServer(cfg.QueryServer(), querier) -} - -// InitGenesis performs genesis initialization for the msgauth module. It returns -// no validator updates. -func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONMarshaler, data json.RawMessage) []abci.ValidatorUpdate { - var genesisState types.GenesisState - cdc.MustUnmarshalJSON(data, &genesisState) - InitGenesis(ctx, am.keeper, &genesisState) - - return nil -} - -// ExportGenesis returns the exported genesis state as raw bytes for the msgauth -// module. -func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONMarshaler) json.RawMessage { - gs := ExportGenesis(ctx, am.keeper) - return cdc.MustMarshalJSON(gs) -} - -// BeginBlock returns the begin blocker for the msgauth module. -func (AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {} - -// EndBlock returns the end blocker for the msgauth module. -func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { - EndBlocker(ctx, am.keeper) - return []abci.ValidatorUpdate{} -} - -//____________________________________________________________________________ - -// AppModuleSimulation functions - -// GenerateGenesisState creates a randomized GenState of the msgauth module. -func (AppModule) GenerateGenesisState(simState *module.SimulationState) {} - -// ProposalContents returns all the msgauth content functions used to -// simulate governance proposals. -func (am AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalContent { - return nil -} - -// RandomizedParams creates randomized msgauth param changes for the simulator. -func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.ParamChange { - return nil -} - -// RegisterStoreDecoder registers a decoder for msgauth module's types -func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) { - sdr[types.StoreKey] = simulation.NewDecodeStore(am.cdc) -} - -// WeightedOperations returns the all the msgauth module operations with their respective weights. -func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation { - return simulation.WeightedOperations( - simState.AppParams, simState.Cdc, - am.accountKeeper, am.bankKeeper, - am.keeper, - ) -} diff --git a/x/msgauth/simulation/decoder.go b/x/msgauth/simulation/decoder.go deleted file mode 100644 index 89d4cbdbf..000000000 --- a/x/msgauth/simulation/decoder.go +++ /dev/null @@ -1,31 +0,0 @@ -package simulation - -import ( - "bytes" - "fmt" - - "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/types/kv" - - "github.com/terra-project/core/x/msgauth/types" -) - -// NewDecodeStore unmarshals the KVPair's Value to the corresponding distribution type -func NewDecodeStore(cdc codec.Marshaler) func(kvA, kvB kv.Pair) string { - return func(kvA, kvB kv.Pair) string { - switch { - case bytes.Equal(kvA.Key[:1], types.GrantKey): - var grantA, grantB types.AuthorizationGrant - cdc.MustUnmarshalBinaryBare(kvA.Value, &grantA) - cdc.MustUnmarshalBinaryBare(kvB.Value, &grantB) - return fmt.Sprintf("%v\n%v", grantA, grantB) - case bytes.Equal(kvA.Key[:1], types.GrantQueueKey): - var pairsA, pairsB types.GGMPairs - cdc.MustUnmarshalBinaryBare(kvA.Value, &pairsA) - cdc.MustUnmarshalBinaryBare(kvB.Value, &pairsB) - return fmt.Sprintf("%v\n%v", pairsA, pairsB) - default: - panic(fmt.Sprintf("invalid msgauth key prefix %X", kvA.Key[:1])) - } - } -} diff --git a/x/msgauth/simulation/decoder_test.go b/x/msgauth/simulation/decoder_test.go deleted file mode 100644 index c7592dc0e..000000000 --- a/x/msgauth/simulation/decoder_test.go +++ /dev/null @@ -1,63 +0,0 @@ -package simulation - -import ( - "fmt" - "testing" - "time" - - "github.com/stretchr/testify/require" - - "github.com/cosmos/cosmos-sdk/types/kv" - - "github.com/terra-project/core/x/msgauth/keeper" - "github.com/terra-project/core/x/msgauth/types" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -func TestDecodeMsgAuthStore(t *testing.T) { - cdc := keeper.MakeTestCodec(t) - dec := NewDecodeStore(cdc) - - grant, err := types.NewAuthorizationGrant(types.NewSendAuthorization(sdk.NewCoins(sdk.NewInt64Coin("foo", 123))), time.Now().UTC()) - require.NoError(t, err) - - pairs := types.GGMPairs{ - Pairs: []types.GGMPair{ - { - GranteeAddress: "abc", - GranterAddress: "cba", - MsgType: "send", - }, - }, - } - - kvPairs := kv.Pairs{ - Pairs: []kv.Pair{ - {Key: types.GrantKey, Value: cdc.MustMarshalBinaryBare(&grant)}, - {Key: types.GrantQueueKey, Value: cdc.MustMarshalBinaryBare(&pairs)}, - {Key: []byte{0x99}, Value: []byte{0x99}}, - }, - } - - tests := []struct { - name string - expectedLog string - }{ - {"Grant", fmt.Sprintf("%v\n%v", grant, grant)}, - {"GGMPair", fmt.Sprintf("%v\n%v", pairs, pairs)}, - {"other", ""}, - } - - for i, tt := range tests { - i, tt := i, tt - t.Run(tt.name, func(t *testing.T) { - switch i { - case len(tests) - 1: - require.Panics(t, func() { dec(kvPairs.Pairs[i], kvPairs.Pairs[i]) }, tt.name) - default: - require.Equal(t, tt.expectedLog, dec(kvPairs.Pairs[i], kvPairs.Pairs[i]), tt.name) - } - }) - } -} diff --git a/x/msgauth/simulation/operations.go b/x/msgauth/simulation/operations.go deleted file mode 100644 index d2c45e5e3..000000000 --- a/x/msgauth/simulation/operations.go +++ /dev/null @@ -1,287 +0,0 @@ -package simulation - -//DONTCOVER - -import ( - "math/rand" - "strings" - "time" - - "github.com/cosmos/cosmos-sdk/baseapp" - "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/simapp/helpers" - simappparams "github.com/cosmos/cosmos-sdk/simapp/params" - sdk "github.com/cosmos/cosmos-sdk/types" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/cosmos/cosmos-sdk/x/simulation" - - "github.com/terra-project/core/x/msgauth/keeper" - "github.com/terra-project/core/x/msgauth/types" -) - -// Simulation operation weights constants -const ( - OpWeightMsgGrantAuthorization = "op_weight_msg_grant_authorization" - OpWeightRevokeAuthorization = "op_weight_msg_revoke_authorization" - OpWeightExecAuthorized = "op_weight_msg_execute_authorized" -) - -// WeightedOperations returns all the operations from the module with their respective weights -func WeightedOperations( - appParams simtypes.AppParams, - cdc codec.JSONMarshaler, - ak types.AccountKeeper, - bk types.BankKeeper, - k keeper.Keeper, -) simulation.WeightedOperations { - - var ( - weightMsgGrantAuthorization int - weightRevokeAuthorization int - weightExecAuthorized int - ) - - appParams.GetOrGenerate(cdc, OpWeightMsgGrantAuthorization, &weightMsgGrantAuthorization, nil, - func(_ *rand.Rand) { - weightMsgGrantAuthorization = simappparams.DefaultWeightMsgDelegate - }, - ) - - appParams.GetOrGenerate(cdc, OpWeightRevokeAuthorization, &weightRevokeAuthorization, nil, - func(_ *rand.Rand) { - weightRevokeAuthorization = simappparams.DefaultWeightMsgUndelegate - }, - ) - - appParams.GetOrGenerate(cdc, OpWeightExecAuthorized, &weightExecAuthorized, nil, - func(_ *rand.Rand) { - weightExecAuthorized = simappparams.DefaultWeightMsgSend - }, - ) - - return simulation.WeightedOperations{ - simulation.NewWeightedOperation( - weightMsgGrantAuthorization, - SimulateMsgGrantAuthorization(ak, bk, k), - ), - simulation.NewWeightedOperation( - weightRevokeAuthorization, - SimulateMsgRevokeAuthorization(ak, bk, k), - ), - simulation.NewWeightedOperation( - weightExecAuthorized, - SimulateMsgExecuteAuthorized(ak, bk, k), - ), - } -} - -// SimulateMsgGrantAuthorization generates a MsgGrantAuthorization with random values. -// nolint: funlen -func SimulateMsgGrantAuthorization( - ak types.AccountKeeper, - bk types.BankKeeper, - k keeper.Keeper) simtypes.Operation { - return func( - r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, - ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { - - granter, _ := simtypes.RandomAcc(r, accs) - grantee, _ := simtypes.RandomAcc(r, accs) - if granter.Address.Equals(grantee.Address) { - return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgGrantAuthorization, "unable to grant to self"), nil, nil - } - - if _, hasGrant := k.GetGrant(ctx, granter.Address, grantee.Address, banktypes.TypeMsgSend); hasGrant { - return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgGrantAuthorization, "grant already exists"), nil, nil - } - - account := ak.GetAccount(ctx, granter.Address) - spendableCoins := bk.SpendableCoins(ctx, granter.Address) - fees, err := simtypes.RandomFees(r, ctx, spendableCoins) - if err != nil { - return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgGrantAuthorization, "unable to generate fees"), nil, err - } - - msg, err := types.NewMsgGrantAuthorization(granter.Address, grantee.Address, - types.NewSendAuthorization(spendableCoins.Sub(fees)), time.Hour) - if err != nil { - return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgGrantAuthorization, "unable to generate grant msg"), nil, err - } - - txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( - txGen, - []sdk.Msg{msg}, - fees, - helpers.DefaultGenTxGas, - chainID, - []uint64{account.GetAccountNumber()}, - []uint64{account.GetSequence()}, - granter.PrivKey, - ) - - if err != nil { - return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "unable to generate mock tx"), nil, err - } - - _, _, err = app.Deliver(txGen.TxEncoder(), tx) - if err != nil { - return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "unable to deliver tx"), nil, err - } - - return simtypes.NewOperationMsg(msg, true, ""), nil, nil - } -} - -// SimulateMsgRevokeAuthorization generates a MsgRevokeAuthorization with random values. -// nolint: funlen -func SimulateMsgRevokeAuthorization( - ak types.AccountKeeper, - bk types.BankKeeper, - k keeper.Keeper, -) simtypes.Operation { - return func( - r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, - ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { - - hasGrant := false - var targetGrant types.AuthorizationGrant - var granterAddr sdk.AccAddress - var granteeAddr sdk.AccAddress - k.IterateGrants(ctx, func(granter, grantee sdk.AccAddress, grant types.AuthorizationGrant) bool { - targetGrant = grant - granterAddr = granter - granteeAddr = grantee - hasGrant = true - return true - }) - - if !hasGrant { - return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgExecAuthorized, "no grant exist"), nil, nil - } - - granter, _ := simtypes.FindAccount(accs, granterAddr) - account := ak.GetAccount(ctx, granter.Address) - - spendableCoins := bk.SpendableCoins(ctx, granterAddr) - fees, err := simtypes.RandomFees(r, ctx, spendableCoins) - if err != nil { - return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgRevokeAuthorization, "failed to generate fees"), nil, err - } - - msg := types.NewMsgRevokeAuthorization(granterAddr, granteeAddr, targetGrant.GetAuthorization().MsgType()) - - txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( - txGen, - []sdk.Msg{msg}, - fees, - helpers.DefaultGenTxGas, - chainID, - []uint64{account.GetAccountNumber()}, - []uint64{account.GetSequence()}, - granter.PrivKey, - ) - - if err != nil { - return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "unable to generate mock tx"), nil, err - } - - _, _, err = app.Deliver(txGen.TxEncoder(), tx) - if err != nil { - return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "unable to deliver tx"), nil, err - } - - return simtypes.NewOperationMsg(msg, true, ""), nil, nil - } -} - -// SimulateMsgExecuteAuthorized generates a MsgExecuteAuthorized with random values. -// nolint: funlen -func SimulateMsgExecuteAuthorized( - ak types.AccountKeeper, - bk types.BankKeeper, - k keeper.Keeper, -) simtypes.Operation { - return func( - r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, - ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { - hasGrant := false - var targetGrant types.AuthorizationGrant - var granterAddr sdk.AccAddress - var granteeAddr sdk.AccAddress - k.IterateGrants(ctx, func(granter, grantee sdk.AccAddress, grant types.AuthorizationGrant) bool { - targetGrant = grant - granterAddr = granter - granteeAddr = grantee - hasGrant = true - return true - }) - - if !hasGrant { - return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgExecAuthorized, "no grant exists"), nil, nil - } - - grantee, _ := simtypes.FindAccount(accs, granteeAddr) - granteeAccount := ak.GetAccount(ctx, granteeAddr) - - granterSpendableCoins := bk.SpendableCoins(ctx, granterAddr) - if granterSpendableCoins.Empty() { - return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgExecAuthorized, "no spendable coins"), nil, nil - } - - granteeSpendableCoins := bk.SpendableCoins(ctx, granteeAddr) - fees, err := simtypes.RandomFees(r, ctx, granteeSpendableCoins) - if err != nil { - return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgExecAuthorized, "failed to generate fees"), nil, err - } - - coins := simtypes.RandSubsetCoins(r, granterSpendableCoins) - if err := bk.SendEnabledCoins(ctx, coins...); err != nil { - return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgExecAuthorized, err.Error()), nil, nil - } - - execMsg := banktypes.NewMsgSend( - granterAddr, - granteeAddr, - coins, - ) - - msg, err := types.NewMsgExecAuthorized(grantee.Address, []sdk.Msg{execMsg}) - if err != nil { - return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgExecAuthorized, "failed to create msg"), nil, err - } - - allow, _, _ := targetGrant.GetAuthorization().Accept(execMsg, ctx.BlockHeader()) - if !allow { - return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgExecAuthorized, "not allowed"), nil, nil - } - - txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( - txGen, - []sdk.Msg{msg}, - fees, - helpers.DefaultGenTxGas, - chainID, - []uint64{granteeAccount.GetAccountNumber()}, - []uint64{granteeAccount.GetSequence()}, - grantee.PrivKey, - ) - - if err != nil { - if strings.Contains(err.Error(), "insufficient fee") { - return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgExecAuthorized, "skip low fee due to tax"), nil, nil - } - return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "unable to generate mock tx"), nil, err - } - - _, _, err = app.Deliver(txGen.TxEncoder(), tx) - if err != nil { - return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "unable to deliver tx"), nil, err - } - - return simtypes.NewOperationMsg(msg, true, ""), nil, nil - } -} diff --git a/x/msgauth/spec/01_events.md b/x/msgauth/spec/01_events.md deleted file mode 100644 index b35aad617..000000000 --- a/x/msgauth/spec/01_events.md +++ /dev/null @@ -1,40 +0,0 @@ - - -# Events - -The market module emits the following events: - -## Handlers - -### MsgGrantAuthorization - -| Type | Attribute Key | Attribute Value | -|---------------------|---------------|---------------------| -| grant_authorization | grant_type | {msgType} | -| grant_authorization | granter | {granterAddress} | -| grant_authorization | grantee | {granteeAddress} | -| message | module | msgauth | -| message | action | grant_authorization | -| message | sender | {senderAddress} | - -### MsgRevokeAuthorization - -| Type | Attribute Key | Attribute Value | -|----------------------|---------------|----------------------| -| revoke_authorization | grant_type | {msgType} | -| revoke_authorization | granter | {granterAddress} | -| revoke_authorization | grantee | {granteeAddress} | -| message | module | msgauth | -| message | action | revoke_authorization | -| message | sender | {senderAddress} | - -### MsgExecAuthorized - -| Type | Attribute Key | Attribute Value | -|-----------------------|-----------------|-----------------------| -| execute_authorization | grantee_address | {granteeAddress} | -| message | module | msgauth | -| message | action | execute_authorization | -| message | sender | {senderAddress} | diff --git a/x/msgauth/types/authorization.go b/x/msgauth/types/authorization.go deleted file mode 100644 index 6ba38166f..000000000 --- a/x/msgauth/types/authorization.go +++ /dev/null @@ -1,102 +0,0 @@ -package types - -import ( - fmt "fmt" - "time" - - proto "github.com/gogo/protobuf/proto" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -var _ codectypes.UnpackInterfacesMessage = AuthorizationGrant{} -var _ codectypes.UnpackInterfacesMessage = AuthorizationGrants{} - -// AuthorizationI represents the interface of various Authorization instances -type AuthorizationI interface { - MsgType() string - Accept(msg sdk.Msg, blocktime tmproto.Header) (allow bool, updated AuthorizationI, delete bool) -} - -// NewAuthorizationGrant returns new AuthorizationGrant instance -func NewAuthorizationGrant(authorization AuthorizationI, expiration time.Time) (AuthorizationGrant, error) { - msg, ok := authorization.(proto.Message) - if !ok { - return AuthorizationGrant{}, fmt.Errorf("%T does not implement proto.Message", authorization) - } - - any, err := codectypes.NewAnyWithValue(msg) - if err != nil { - return AuthorizationGrant{}, err - } - - return AuthorizationGrant{Authorization: any, Expiration: expiration}, nil -} - -// GetAuthorization returns the grant Authorization -func (g AuthorizationGrant) GetAuthorization() AuthorizationI { - authorization, ok := g.Authorization.GetCachedValue().(AuthorizationI) - if !ok { - return nil - } - return authorization -} - -// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces -func (g AuthorizationGrant) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { - var authorization AuthorizationI - return unpacker.UnpackAny(g.Authorization, &authorization) -} - -// AuthorizationGrants array of grant -type AuthorizationGrants []AuthorizationGrant - -// Equal returns true if two slices (order-dependant) of grants are equal. -func (grants AuthorizationGrants) Equal(other AuthorizationGrants) bool { - if len(grants) != len(other) { - return false - } - - for i, grant := range grants { - if !grant.Equal(other[i]) { - return false - } - } - - return true -} - -// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces -func (grants AuthorizationGrants) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { - for _, grant := range grants { - err := grant.UnpackInterfaces(unpacker) - if err != nil { - return err - } - } - - return nil -} - -var grantableMsgTypes = map[string]struct{}{} - -// RegisterGrantableMsgType registers a grantable msg type. It will panic if the type is -// already registered. -func RegisterGrantableMsgType(ty string) { - if _, ok := grantableMsgTypes[ty]; ok { - panic(fmt.Sprintf("already registered proposal type: %s", ty)) - } - - grantableMsgTypes[ty] = struct{}{} -} - -// IsGrantableMsgType returns a boolean determining if the msg type is -// grantable. -// -// NOTE: Modules with their own proposal types must register them. -func IsGrantableMsgType(ty string) bool { - _, ok := grantableMsgTypes[ty] - return ok -} diff --git a/x/msgauth/types/codec.go b/x/msgauth/types/codec.go deleted file mode 100644 index 0ecc31edb..000000000 --- a/x/msgauth/types/codec.go +++ /dev/null @@ -1,62 +0,0 @@ -package types - -import ( - "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/codec/types" - cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/msgservice" -) - -// RegisterLegacyAminoCodec registers the necessary x/msgauth interfaces and concrete types -// on the provided LegacyAmino codec. These types are used for Amino JSON serialization. -func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - cdc.RegisterInterface((*AuthorizationI)(nil), nil) - - cdc.RegisterConcrete(&MsgGrantAuthorization{}, "msgauth/MsgGrantAuthorization", nil) - cdc.RegisterConcrete(&MsgRevokeAuthorization{}, "msgauth/MsgRevokeAuthorization", nil) - cdc.RegisterConcrete(&MsgExecAuthorized{}, "msgauth/MsgExecAuthorized", nil) - cdc.RegisterConcrete(&SendAuthorization{}, "msgauth/SendAuthorization", nil) - cdc.RegisterConcrete(&GenericAuthorization{}, "msgauth/GenericAuthorization", nil) -} - -// RegisterInterfaces registers the x/msgauth interfaces types with the interface registry -func RegisterInterfaces(registry types.InterfaceRegistry) { - registry.RegisterImplementations((*sdk.Msg)(nil), - &MsgGrantAuthorization{}, - &MsgRevokeAuthorization{}, - &MsgExecAuthorized{}, - ) - registry.RegisterInterface( - "terra.msgauth.v1beta1.AuthorizationI", - (*AuthorizationI)(nil), - &SendAuthorization{}, - &GenericAuthorization{}, - ) - - msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) -} - -// RegisterMsgAuthTypeCodec registers an external msg type defined -// in another module for the internal ModuleCdc. This allows the MsgExecAuthorized -// to be correctly Amino encoded and decoded. -func RegisterMsgAuthTypeCodec(o interface{}, name string) { - ModuleCdc.RegisterConcrete(o, name, nil) -} - -var ( - amino = codec.NewLegacyAmino() - - // ModuleCdc references the global x/gov module codec. Note, the codec should - // ONLY be used in certain instances of tests and for JSON encoding as Amino is - // still used for that purpose. - // - // The actual codec used for serialization should be provided to x/gov and - // defined at the application level. - ModuleCdc = codec.NewAminoCodec(amino) -) - -func init() { - RegisterLegacyAminoCodec(amino) - cryptocodec.RegisterCrypto(amino) -} diff --git a/x/msgauth/types/errors.go b/x/msgauth/types/errors.go deleted file mode 100644 index ba8d225b0..000000000 --- a/x/msgauth/types/errors.go +++ /dev/null @@ -1,14 +0,0 @@ -package types - -import ( - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -) - -// x/msgauth module sentinel errors -var ( - ErrInvalidPeriod = sdkerrors.Register(ModuleName, 2, "period of authorization should be positive time duration") - ErrInvalidMsgType = sdkerrors.Register(ModuleName, 3, "given msg type is not grantable") - ErrInvalidAuthorization = sdkerrors.Register(ModuleName, 4, "given authorization is not valid") - ErrInvalidMsg = sdkerrors.Register(ModuleName, 5, "given msg is not valid") - ErrGrantExists = sdkerrors.Register(ModuleName, 6, "grant already exists") -) diff --git a/x/msgauth/types/events.go b/x/msgauth/types/events.go deleted file mode 100644 index 578fe41c3..000000000 --- a/x/msgauth/types/events.go +++ /dev/null @@ -1,14 +0,0 @@ -package types - -// msgauth module events -const ( - EventGrantAuthorization = "grant_authorization" - EventRevokeAuthorization = "revoke_authorization" - EventExecuteAuthorization = "execute_authorization" - - AttributeKeyGrantType = "grant_type" - AttributeKeyGranteeAddress = "grantee" - AttributeKeyGranterAddress = "granter" - - AttributeValueCategory = ModuleName -) diff --git a/x/msgauth/types/expected_keeper.go b/x/msgauth/types/expected_keeper.go deleted file mode 100644 index ac6ccb5c6..000000000 --- a/x/msgauth/types/expected_keeper.go +++ /dev/null @@ -1,21 +0,0 @@ -package types - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" -) - -// AccountKeeper is expected keeper for auth module -type AccountKeeper interface { - // only used for simulation - GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI -} - -// BankKeeper defines expected supply keeper -type BankKeeper interface { - // only used for simulation - SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins - GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin - SendEnabledCoin(ctx sdk.Context, coin sdk.Coin) bool - SendEnabledCoins(ctx sdk.Context, coins ...sdk.Coin) error -} diff --git a/x/msgauth/types/generic_authorization.go b/x/msgauth/types/generic_authorization.go deleted file mode 100644 index ced10f20a..000000000 --- a/x/msgauth/types/generic_authorization.go +++ /dev/null @@ -1,22 +0,0 @@ -package types - -import ( - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// NewGenericAuthorization returns new GenericAuthorization instance -func NewGenericAuthorization(msgType string) *GenericAuthorization { - return &GenericAuthorization{GrantMsgType: msgType} -} - -// MsgType implement Authorization -func (ga GenericAuthorization) MsgType() string { - return ga.GrantMsgType -} - -// Accept implement Authorization -func (ga GenericAuthorization) Accept(msg sdk.Msg, blocktime tmproto.Header) (allow bool, updated AuthorizationI, delete bool) { - return true, &ga, false -} diff --git a/x/msgauth/types/generic_authorization_test.go b/x/msgauth/types/generic_authorization_test.go deleted file mode 100644 index b450ced3a..000000000 --- a/x/msgauth/types/generic_authorization_test.go +++ /dev/null @@ -1,19 +0,0 @@ -package types - -import ( - "testing" - - "github.com/stretchr/testify/require" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - - "github.com/cosmos/cosmos-sdk/testutil/testdata" -) - -func TestGenericAuthorization(t *testing.T) { - generic := NewGenericAuthorization("delegate") - - allow, updated, delete := generic.Accept(testdata.NewTestMsg(), tmproto.Header{}) - require.True(t, allow) - require.Equal(t, NewGenericAuthorization("delegate"), updated) - require.False(t, delete) -} diff --git a/x/msgauth/types/genesis.go b/x/msgauth/types/genesis.go deleted file mode 100644 index 6b498b8ab..000000000 --- a/x/msgauth/types/genesis.go +++ /dev/null @@ -1,54 +0,0 @@ -package types - -import ( - codectypes "github.com/cosmos/cosmos-sdk/codec/types" -) - -var _ codectypes.UnpackInterfacesMessage = AuthorizationEntry{} -var _ codectypes.UnpackInterfacesMessage = GenesisState{} - -// NewGenesisState creates a new GenesisState object -func NewGenesisState(entries []AuthorizationEntry) *GenesisState { - return &GenesisState{ - AuthorizationEntries: entries, - } -} - -// ValidateGenesis check the given genesis state has no integrity issues -func ValidateGenesis(data *GenesisState) error { - return nil -} - -// DefaultGenesisState gets raw genesis raw message for testing -func DefaultGenesisState() *GenesisState { - return &GenesisState{ - AuthorizationEntries: []AuthorizationEntry{}, - } -} - -// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces -func (entry AuthorizationEntry) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { - var authorization AuthorizationI - return unpacker.UnpackAny(entry.Authorization, &authorization) -} - -// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces -func (data GenesisState) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { - for _, a := range data.AuthorizationEntries { - err := a.UnpackInterfaces(unpacker) - if err != nil { - return err - } - } - - return nil -} - -// GetAuthorization returns the grant Authorization -func (entry AuthorizationEntry) GetAuthorization() AuthorizationI { - authorization, ok := entry.Authorization.GetCachedValue().(AuthorizationI) - if !ok { - return nil - } - return authorization -} diff --git a/x/msgauth/types/genesis.pb.go b/x/msgauth/types/genesis.pb.go deleted file mode 100644 index aa268672e..000000000 --- a/x/msgauth/types/genesis.pb.go +++ /dev/null @@ -1,654 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: terra/msgauth/v1beta1/genesis.proto - -package types - -import ( - fmt "fmt" - types "github.com/cosmos/cosmos-sdk/codec/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - _ "github.com/golang/protobuf/ptypes/timestamp" - _ "github.com/regen-network/cosmos-proto" - io "io" - math "math" - math_bits "math/bits" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// GenesisState defines the msgauth module's genesis state. -type GenesisState struct { - AuthorizationEntries []AuthorizationEntry `protobuf:"bytes,1,rep,name=authorization_entries,json=authorizationEntries,proto3" json:"authorization_entries"` -} - -func (m *GenesisState) Reset() { *m = GenesisState{} } -func (m *GenesisState) String() string { return proto.CompactTextString(m) } -func (*GenesisState) ProtoMessage() {} -func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_0c8d21091fc5125a, []int{0} -} -func (m *GenesisState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GenesisState) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisState.Merge(m, src) -} -func (m *GenesisState) XXX_Size() int { - return m.Size() -} -func (m *GenesisState) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisState.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisState proto.InternalMessageInfo - -func (m *GenesisState) GetAuthorizationEntries() []AuthorizationEntry { - if m != nil { - return m.AuthorizationEntries - } - return nil -} - -// AuthorizationEntry hold each authorization information -type AuthorizationEntry struct { - Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` - Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` - Authorization *types.Any `protobuf:"bytes,3,opt,name=authorization,proto3" json:"authorization,omitempty"` - Expiration time.Time `protobuf:"bytes,4,opt,name=expiration,proto3,stdtime" json:"expiration"` -} - -func (m *AuthorizationEntry) Reset() { *m = AuthorizationEntry{} } -func (m *AuthorizationEntry) String() string { return proto.CompactTextString(m) } -func (*AuthorizationEntry) ProtoMessage() {} -func (*AuthorizationEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_0c8d21091fc5125a, []int{1} -} -func (m *AuthorizationEntry) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthorizationEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthorizationEntry.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthorizationEntry) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthorizationEntry.Merge(m, src) -} -func (m *AuthorizationEntry) XXX_Size() int { - return m.Size() -} -func (m *AuthorizationEntry) XXX_DiscardUnknown() { - xxx_messageInfo_AuthorizationEntry.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthorizationEntry proto.InternalMessageInfo - -func init() { - proto.RegisterType((*GenesisState)(nil), "terra.msgauth.v1beta1.GenesisState") - proto.RegisterType((*AuthorizationEntry)(nil), "terra.msgauth.v1beta1.AuthorizationEntry") -} - -func init() { - proto.RegisterFile("terra/msgauth/v1beta1/genesis.proto", fileDescriptor_0c8d21091fc5125a) -} - -var fileDescriptor_0c8d21091fc5125a = []byte{ - // 378 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xbd, 0x0e, 0xd3, 0x30, - 0x10, 0xc7, 0x63, 0x5a, 0xf1, 0xe1, 0x02, 0x43, 0xd4, 0x4a, 0xa1, 0x43, 0x52, 0x95, 0xa5, 0x0c, - 0xb5, 0xd5, 0xb2, 0xb1, 0x35, 0x02, 0x55, 0x2c, 0x0c, 0x81, 0x89, 0xa5, 0x72, 0xc2, 0xe1, 0x1a, - 0x91, 0x38, 0xb2, 0xaf, 0xa8, 0xe1, 0x09, 0x18, 0xfb, 0x08, 0x3c, 0x04, 0x0f, 0x51, 0x31, 0x75, - 0x64, 0x02, 0xd4, 0xf2, 0x20, 0xa8, 0xf9, 0x80, 0x7e, 0xc0, 0xe6, 0xd3, 0xff, 0xf7, 0xff, 0xdf, - 0xf9, 0x8e, 0x3e, 0x44, 0x30, 0x46, 0xf0, 0xd4, 0x4a, 0xb1, 0xc2, 0x25, 0xff, 0x30, 0x89, 0x01, - 0xc5, 0x84, 0x4b, 0xc8, 0xc0, 0x2a, 0xcb, 0x72, 0xa3, 0x51, 0xbb, 0xbd, 0x12, 0x62, 0x35, 0xc4, - 0x6a, 0xa8, 0xdf, 0x95, 0x5a, 0xea, 0x92, 0xe0, 0xc7, 0x57, 0x05, 0xf7, 0x03, 0xa9, 0xb5, 0x7c, - 0x0f, 0xbc, 0xac, 0xe2, 0xd5, 0x5b, 0x8e, 0x2a, 0x05, 0x8b, 0x22, 0xcd, 0x6b, 0xe0, 0xc1, 0x25, - 0x20, 0xb2, 0xa2, 0x91, 0x12, 0x6d, 0x53, 0x6d, 0x17, 0x55, 0x68, 0x55, 0xd4, 0xd2, 0x7f, 0x06, - 0x6d, 0x66, 0x2a, 0xa1, 0x21, 0xd2, 0xbb, 0xf3, 0x6a, 0xf2, 0x97, 0x28, 0x10, 0xdc, 0x37, 0xb4, - 0x77, 0x54, 0xb5, 0x51, 0x1f, 0x05, 0x2a, 0x9d, 0x2d, 0x20, 0x43, 0xa3, 0xc0, 0x7a, 0x64, 0xd0, - 0x1a, 0x75, 0xa6, 0x8f, 0xd8, 0x3f, 0x3f, 0xc6, 0x66, 0xa7, 0x9e, 0x67, 0x19, 0x9a, 0x22, 0x6c, - 0x6f, 0xbf, 0x07, 0x4e, 0xd4, 0x15, 0x97, 0x8a, 0x02, 0x3b, 0xfc, 0x45, 0xa8, 0x7b, 0x6d, 0x71, - 0x3d, 0x7a, 0x4b, 0x1a, 0x91, 0x21, 0x18, 0x8f, 0x0c, 0xc8, 0xe8, 0x4e, 0xd4, 0x94, 0x7f, 0x15, - 0xf0, 0x6e, 0x9c, 0x2a, 0xe0, 0xbe, 0xa0, 0xf7, 0xce, 0x5a, 0x78, 0xad, 0x01, 0x19, 0x75, 0xa6, - 0x5d, 0x56, 0xed, 0x8c, 0x35, 0x3b, 0x63, 0xb3, 0xac, 0x08, 0xdd, 0xaf, 0x5f, 0xc6, 0xf7, 0xcf, - 0x1a, 0x3f, 0x8f, 0xce, 0xed, 0xee, 0x53, 0x4a, 0x61, 0x9d, 0x2b, 0x53, 0x85, 0xb5, 0xcb, 0xb0, - 0xfe, 0x55, 0xd8, 0xab, 0xe6, 0x42, 0xe1, 0xed, 0xe3, 0x37, 0x37, 0x3f, 0x02, 0x12, 0x9d, 0xf8, - 0x9e, 0xb4, 0x3f, 0x7d, 0x0e, 0x9c, 0x70, 0xbe, 0xdd, 0xfb, 0x64, 0xb7, 0xf7, 0xc9, 0xcf, 0xbd, - 0x4f, 0x36, 0x07, 0xdf, 0xd9, 0x1d, 0x7c, 0xe7, 0xdb, 0xc1, 0x77, 0x5e, 0x8f, 0xa5, 0xc2, 0xe5, - 0x2a, 0x66, 0x89, 0x4e, 0x79, 0xb9, 0xd1, 0x71, 0x6e, 0xf4, 0x3b, 0x48, 0x90, 0x27, 0xda, 0x00, - 0x5f, 0xff, 0xb9, 0x1a, 0x16, 0x39, 0xd8, 0xf8, 0x66, 0xd9, 0xf8, 0xf1, 0xef, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x3e, 0xfd, 0x4d, 0x35, 0x7c, 0x02, 0x00, 0x00, -} - -func (m *GenesisState) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AuthorizationEntries) > 0 { - for iNdEx := len(m.AuthorizationEntries) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AuthorizationEntries[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *AuthorizationEntry) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthorizationEntry) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthorizationEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Expiration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Expiration):]) - if err1 != nil { - return 0, err1 - } - i -= n1 - i = encodeVarintGenesis(dAtA, i, uint64(n1)) - i-- - dAtA[i] = 0x22 - if m.Authorization != nil { - { - size, err := m.Authorization.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Grantee) > 0 { - i -= len(m.Grantee) - copy(dAtA[i:], m.Grantee) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Grantee))) - i-- - dAtA[i] = 0x12 - } - if len(m.Granter) > 0 { - i -= len(m.Granter) - copy(dAtA[i:], m.Granter) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Granter))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { - offset -= sovGenesis(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *GenesisState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.AuthorizationEntries) > 0 { - for _, e := range m.AuthorizationEntries { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - return n -} - -func (m *AuthorizationEntry) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Granter) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.Grantee) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - if m.Authorization != nil { - l = m.Authorization.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Expiration) - n += 1 + l + sovGenesis(uint64(l)) - return n -} - -func sovGenesis(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenesis(x uint64) (n int) { - return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *GenesisState) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthorizationEntries", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AuthorizationEntries = append(m.AuthorizationEntries, AuthorizationEntry{}) - if err := m.AuthorizationEntries[len(m.AuthorizationEntries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthorizationEntry) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthorizationEntry: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthorizationEntry: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Granter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Grantee = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authorization", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Authorization == nil { - m.Authorization = &types.Any{} - } - if err := m.Authorization.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Expiration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Expiration, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenesis(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenesis - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenesis - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenesis - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/msgauth/types/keys.go b/x/msgauth/types/keys.go deleted file mode 100644 index 3b71e66d0..000000000 --- a/x/msgauth/types/keys.go +++ /dev/null @@ -1,70 +0,0 @@ -package types - -import ( - "time" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -const ( - // ModuleName is the module name constant used in many places - ModuleName = "msgauth" - - // StoreKey is the store key string for msgauth - StoreKey = ModuleName - - // RouterKey is the message route for msgauth - RouterKey = ModuleName - - // QuerierRoute is the querier route for msgauth - QuerierRoute = ModuleName -) - -// Keys for msgauth store -// Items are stored with the following key: values -// -// - 0x01: Grant -// - 0x02: []GGMPair -var ( - // Keys for store prefixes - GrantKey = []byte{0x01} // prefix for each key to a prevote - GrantQueueKey = []byte{0x02} // prefix for the timestamps in grants queue -) - -// GetGrantKey - return grant store key -func GetGrantKey(granterAddr sdk.AccAddress, granteeAddr sdk.AccAddress, msgType string) []byte { - return append(append(append(GrantKey, granterAddr.Bytes()...), granteeAddr.Bytes()...), []byte(msgType)...) -} - -// GetGrantsKey - return grants store key -func GetGrantsKey(granterAddr sdk.AccAddress, granteeAddr sdk.AccAddress) []byte { - return append(append(GrantKey, granterAddr.Bytes()...), granteeAddr.Bytes()...) -} - -// GetAllGrantsKey - return all grants store key -func GetAllGrantsKey(granterAddr sdk.AccAddress) []byte { - return append(GrantKey, granterAddr.Bytes()...) -} - -// GetGranterGranteePrefixKey - return grant store prefix key -func GetGranterGranteePrefixKey(granterAddr sdk.AccAddress, granteeAddr sdk.AccAddress) []byte { - return append(append(GrantKey, granterAddr.Bytes()...), granteeAddr.Bytes()...) -} - -// GetGranterPrefixKey - return grant store prefix key -func GetGranterPrefixKey(granterAddr sdk.AccAddress) []byte { - return append(GrantKey, granterAddr.Bytes()...) -} - -// GetGrantTimeKey - return grant queue store key -func GetGrantTimeKey(timestamp time.Time) []byte { - bz := sdk.FormatTimeBytes(timestamp) - return append(GrantQueueKey, bz...) -} - -// ExtractAddressesFromGrantKey - split granter & grantee address from the authorization key -func ExtractAddressesFromGrantKey(key []byte) (granterAddr, granteeAddr sdk.AccAddress) { - granterAddr = sdk.AccAddress(key[1 : sdk.AddrLen+1]) - granteeAddr = sdk.AccAddress(key[sdk.AddrLen+1 : sdk.AddrLen*2+1]) - return -} diff --git a/x/msgauth/types/msgauth.pb.go b/x/msgauth/types/msgauth.pb.go deleted file mode 100644 index 278ca3ff1..000000000 --- a/x/msgauth/types/msgauth.pb.go +++ /dev/null @@ -1,1354 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: terra/msgauth/v1beta1/msgauth.proto - -package types - -import ( - fmt "fmt" - types "github.com/cosmos/cosmos-sdk/codec/types" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - types1 "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - _ "github.com/golang/protobuf/ptypes/timestamp" - _ "github.com/regen-network/cosmos-proto" - io "io" - math "math" - math_bits "math/bits" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// AuthorizationGrant represent the stored grant instance in the keeper store -type AuthorizationGrant struct { - Authorization *types.Any `protobuf:"bytes,1,opt,name=authorization,proto3" json:"authorization,omitempty" yaml:"authorization"` - Expiration time.Time `protobuf:"bytes,2,opt,name=expiration,proto3,stdtime" json:"expiration" yaml:"expiration"` -} - -func (m *AuthorizationGrant) Reset() { *m = AuthorizationGrant{} } -func (m *AuthorizationGrant) String() string { return proto.CompactTextString(m) } -func (*AuthorizationGrant) ProtoMessage() {} -func (*AuthorizationGrant) Descriptor() ([]byte, []int) { - return fileDescriptor_e4fb7284372739ab, []int{0} -} -func (m *AuthorizationGrant) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AuthorizationGrant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AuthorizationGrant.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AuthorizationGrant) XXX_Merge(src proto.Message) { - xxx_messageInfo_AuthorizationGrant.Merge(m, src) -} -func (m *AuthorizationGrant) XXX_Size() int { - return m.Size() -} -func (m *AuthorizationGrant) XXX_DiscardUnknown() { - xxx_messageInfo_AuthorizationGrant.DiscardUnknown(m) -} - -var xxx_messageInfo_AuthorizationGrant proto.InternalMessageInfo - -// GenericAuthorization grants the permission to execute any transaction of the provided -// msg type without restrictions -type GenericAuthorization struct { - // GrantMsgType is the type of Msg this capability grant allows - GrantMsgType string `protobuf:"bytes,1,opt,name=grant_msg_type,json=grantMsgType,proto3" json:"grant_msg_type,omitempty" yaml:"grant_msg_type"` -} - -func (m *GenericAuthorization) Reset() { *m = GenericAuthorization{} } -func (m *GenericAuthorization) String() string { return proto.CompactTextString(m) } -func (*GenericAuthorization) ProtoMessage() {} -func (*GenericAuthorization) Descriptor() ([]byte, []int) { - return fileDescriptor_e4fb7284372739ab, []int{1} -} -func (m *GenericAuthorization) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenericAuthorization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenericAuthorization.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GenericAuthorization) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenericAuthorization.Merge(m, src) -} -func (m *GenericAuthorization) XXX_Size() int { - return m.Size() -} -func (m *GenericAuthorization) XXX_DiscardUnknown() { - xxx_messageInfo_GenericAuthorization.DiscardUnknown(m) -} - -var xxx_messageInfo_GenericAuthorization proto.InternalMessageInfo - -func (m *GenericAuthorization) GetGrantMsgType() string { - if m != nil { - return m.GrantMsgType - } - return "" -} - -// SendAuthorization grants the permission to execute send transaction of the provided -// msg type with spend limit -type SendAuthorization struct { - // SpendLimit specifies the maximum amount of tokens that can be spent - // by this authorization and will be updated as tokens are spent. If it is - // empty, there is no spend limit and any amount of coins can be spent. - SpendLimit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=spend_limit,json=spendLimit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"spend_limit"` -} - -func (m *SendAuthorization) Reset() { *m = SendAuthorization{} } -func (m *SendAuthorization) String() string { return proto.CompactTextString(m) } -func (*SendAuthorization) ProtoMessage() {} -func (*SendAuthorization) Descriptor() ([]byte, []int) { - return fileDescriptor_e4fb7284372739ab, []int{2} -} -func (m *SendAuthorization) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SendAuthorization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SendAuthorization.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SendAuthorization) XXX_Merge(src proto.Message) { - xxx_messageInfo_SendAuthorization.Merge(m, src) -} -func (m *SendAuthorization) XXX_Size() int { - return m.Size() -} -func (m *SendAuthorization) XXX_DiscardUnknown() { - xxx_messageInfo_SendAuthorization.DiscardUnknown(m) -} - -var xxx_messageInfo_SendAuthorization proto.InternalMessageInfo - -func (m *SendAuthorization) GetSpendLimit() github_com_cosmos_cosmos_sdk_types.Coins { - if m != nil { - return m.SpendLimit - } - return nil -} - -// GGMPair is struct that just has a granter-grantee-msgtype pair with no other data. -// It is intended to be used as a marshalable pointer. For example, a GGPair can be used to construct the -// key to getting an Grant from state. -type GGMPair struct { - GranterAddress string `protobuf:"bytes,1,opt,name=granter_address,json=granterAddress,proto3" json:"granter_address,omitempty" yaml:"granter_address"` - GranteeAddress string `protobuf:"bytes,2,opt,name=grantee_address,json=granteeAddress,proto3" json:"grantee_address,omitempty" yaml:"grantee_address"` - MsgType string `protobuf:"bytes,3,opt,name=msg_type,json=msgType,proto3" json:"msg_type,omitempty" yaml:"msg_type"` -} - -func (m *GGMPair) Reset() { *m = GGMPair{} } -func (m *GGMPair) String() string { return proto.CompactTextString(m) } -func (*GGMPair) ProtoMessage() {} -func (*GGMPair) Descriptor() ([]byte, []int) { - return fileDescriptor_e4fb7284372739ab, []int{3} -} -func (m *GGMPair) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GGMPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GGMPair.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GGMPair) XXX_Merge(src proto.Message) { - xxx_messageInfo_GGMPair.Merge(m, src) -} -func (m *GGMPair) XXX_Size() int { - return m.Size() -} -func (m *GGMPair) XXX_DiscardUnknown() { - xxx_messageInfo_GGMPair.DiscardUnknown(m) -} - -var xxx_messageInfo_GGMPair proto.InternalMessageInfo - -func (m *GGMPair) GetGranterAddress() string { - if m != nil { - return m.GranterAddress - } - return "" -} - -func (m *GGMPair) GetGranteeAddress() string { - if m != nil { - return m.GranteeAddress - } - return "" -} - -func (m *GGMPair) GetMsgType() string { - if m != nil { - return m.MsgType - } - return "" -} - -// GGMPairs is the array of GGMPair -type GGMPairs struct { - Pairs []GGMPair `protobuf:"bytes,1,rep,name=pairs,proto3" json:"pairs" yaml:"pairs"` -} - -func (m *GGMPairs) Reset() { *m = GGMPairs{} } -func (m *GGMPairs) String() string { return proto.CompactTextString(m) } -func (*GGMPairs) ProtoMessage() {} -func (*GGMPairs) Descriptor() ([]byte, []int) { - return fileDescriptor_e4fb7284372739ab, []int{4} -} -func (m *GGMPairs) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GGMPairs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GGMPairs.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GGMPairs) XXX_Merge(src proto.Message) { - xxx_messageInfo_GGMPairs.Merge(m, src) -} -func (m *GGMPairs) XXX_Size() int { - return m.Size() -} -func (m *GGMPairs) XXX_DiscardUnknown() { - xxx_messageInfo_GGMPairs.DiscardUnknown(m) -} - -var xxx_messageInfo_GGMPairs proto.InternalMessageInfo - -func (m *GGMPairs) GetPairs() []GGMPair { - if m != nil { - return m.Pairs - } - return nil -} - -func init() { - proto.RegisterType((*AuthorizationGrant)(nil), "terra.msgauth.v1beta1.AuthorizationGrant") - proto.RegisterType((*GenericAuthorization)(nil), "terra.msgauth.v1beta1.GenericAuthorization") - proto.RegisterType((*SendAuthorization)(nil), "terra.msgauth.v1beta1.SendAuthorization") - proto.RegisterType((*GGMPair)(nil), "terra.msgauth.v1beta1.GGMPair") - proto.RegisterType((*GGMPairs)(nil), "terra.msgauth.v1beta1.GGMPairs") -} - -func init() { - proto.RegisterFile("terra/msgauth/v1beta1/msgauth.proto", fileDescriptor_e4fb7284372739ab) -} - -var fileDescriptor_e4fb7284372739ab = []byte{ - // 587 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x54, 0xb1, 0x6f, 0xd3, 0x4e, - 0x14, 0xce, 0xb5, 0xfa, 0xfd, 0x5a, 0xae, 0x25, 0x55, 0x4d, 0x8a, 0x9a, 0x48, 0xf8, 0x2a, 0xb3, - 0x44, 0x48, 0xb1, 0x69, 0xd9, 0xb2, 0xa0, 0xb8, 0x43, 0x04, 0xa2, 0x12, 0x32, 0x5d, 0x60, 0x09, - 0x17, 0xe7, 0xea, 0x18, 0x62, 0x9f, 0x75, 0x77, 0x41, 0x0d, 0x7f, 0x01, 0x63, 0x47, 0x16, 0xa4, - 0xcc, 0xcc, 0xfc, 0x11, 0x15, 0x12, 0x52, 0xc5, 0xc4, 0xe4, 0xa2, 0x44, 0x48, 0xcc, 0xf9, 0x0b, - 0x90, 0xef, 0xce, 0x49, 0x4c, 0x2a, 0xa6, 0xdc, 0xbd, 0xf7, 0xbd, 0xef, 0x7b, 0xef, 0x7d, 0x17, - 0xc3, 0xfb, 0x82, 0x30, 0x86, 0x9d, 0x88, 0x07, 0x78, 0x28, 0xfa, 0xce, 0xbb, 0xc3, 0x2e, 0x11, - 0xf8, 0x30, 0xbf, 0xdb, 0x09, 0xa3, 0x82, 0x1a, 0x7b, 0x12, 0x64, 0xe7, 0x41, 0x0d, 0xaa, 0x55, - 0x02, 0x1a, 0x50, 0x89, 0x70, 0xb2, 0x93, 0x02, 0xd7, 0x50, 0x40, 0x69, 0x30, 0x20, 0x8e, 0xbc, - 0x75, 0x87, 0x67, 0x8e, 0x08, 0x23, 0xc2, 0x05, 0x8e, 0x12, 0x0d, 0xa8, 0xfe, 0x0d, 0xc0, 0xf1, - 0x28, 0x4f, 0xf9, 0x94, 0x47, 0x94, 0x77, 0x14, 0xa9, 0xba, 0xe8, 0x94, 0xa9, 0x6e, 0x4e, 0x17, - 0x73, 0x32, 0x6f, 0xd3, 0xa7, 0x61, 0xac, 0xf2, 0xd6, 0x2f, 0x00, 0x8d, 0xd6, 0x50, 0xf4, 0x29, - 0x0b, 0xdf, 0x63, 0x11, 0xd2, 0xb8, 0xcd, 0x70, 0x2c, 0x8c, 0x33, 0x78, 0x1b, 0x2f, 0x47, 0xf7, - 0xc1, 0x01, 0xa8, 0x6f, 0x1d, 0x55, 0x6c, 0xd5, 0x84, 0x9d, 0x37, 0x61, 0xb7, 0xe2, 0x91, 0xfb, - 0x60, 0x96, 0xa2, 0xca, 0x08, 0x47, 0x83, 0xa6, 0x55, 0x28, 0xb2, 0xbe, 0x7e, 0x69, 0x94, 0x0b, - 0xe4, 0x4f, 0xbc, 0x22, 0xad, 0xf1, 0x12, 0x42, 0x72, 0x9e, 0x84, 0x4c, 0x89, 0xac, 0x49, 0x91, - 0xda, 0x8a, 0xc8, 0x69, 0xbe, 0x0a, 0xf7, 0xde, 0x65, 0x8a, 0x4a, 0xb3, 0x14, 0xed, 0x2a, 0xb9, - 0x45, 0xad, 0x75, 0x71, 0x8d, 0x80, 0xb7, 0x44, 0xd6, 0xdc, 0xfe, 0x30, 0x46, 0xa5, 0x8f, 0x63, - 0x04, 0x7e, 0x8f, 0x11, 0xb0, 0x38, 0xac, 0xb4, 0x49, 0x4c, 0x58, 0xe8, 0x17, 0x1a, 0x32, 0x1e, - 0xc3, 0x72, 0x90, 0x4d, 0xdc, 0x89, 0x78, 0xd0, 0x11, 0xa3, 0x84, 0xc8, 0x49, 0x6f, 0xb9, 0xd5, - 0x59, 0x8a, 0xf6, 0x94, 0x48, 0x31, 0x6f, 0x79, 0xdb, 0x32, 0x70, 0xc2, 0x83, 0xd3, 0x51, 0x42, - 0x9a, 0xb5, 0x5c, 0xe2, 0xfb, 0xca, 0xb0, 0xd6, 0x27, 0x00, 0x77, 0x5f, 0x90, 0xb8, 0x57, 0x94, - 0x1c, 0xc0, 0x2d, 0x9e, 0x90, 0xb8, 0xd7, 0x19, 0x84, 0x51, 0x28, 0xf6, 0xc1, 0xc1, 0x7a, 0x7d, - 0xeb, 0xa8, 0x6a, 0x6b, 0xdb, 0x32, 0xa3, 0xf2, 0xa7, 0x62, 0x1f, 0xd3, 0x30, 0x76, 0x1f, 0x66, - 0x33, 0x7f, 0xbe, 0x46, 0xf5, 0x20, 0x14, 0xfd, 0x61, 0xd7, 0xf6, 0x69, 0xa4, 0x3d, 0xd6, 0x3f, - 0x0d, 0xde, 0x7b, 0xeb, 0x64, 0xbd, 0x71, 0x59, 0xc0, 0x3d, 0x28, 0xf9, 0x9f, 0x65, 0xf4, 0xff, - 0xec, 0xef, 0x1b, 0x80, 0x1b, 0xed, 0xf6, 0xc9, 0x73, 0x1c, 0x32, 0xe3, 0x18, 0xee, 0xc8, 0xb9, - 0x08, 0xeb, 0xe0, 0x5e, 0x8f, 0x11, 0xce, 0xf5, 0x26, 0x6a, 0xb3, 0x14, 0xdd, 0x5d, 0xda, 0xc4, - 0x02, 0x60, 0x79, 0x65, 0x1d, 0x69, 0xa9, 0xc0, 0x82, 0x84, 0xcc, 0x49, 0xd6, 0x6e, 0x26, 0x21, - 0x2b, 0x24, 0x24, 0x27, 0xb1, 0xe1, 0xe6, 0xdc, 0x8c, 0x75, 0x59, 0x7d, 0x67, 0x96, 0xa2, 0x1d, - 0x55, 0xbd, 0xb0, 0x61, 0x23, 0xd2, 0x0e, 0x6c, 0xce, 0x4d, 0x7e, 0x0d, 0x37, 0xf5, 0x38, 0xdc, - 0x78, 0x0a, 0xff, 0x4b, 0xb2, 0x83, 0xde, 0xaf, 0x69, 0xdf, 0xf8, 0x67, 0xb4, 0x35, 0xde, 0xad, - 0xe8, 0x87, 0xb5, 0xad, 0x64, 0x64, 0xa9, 0xe5, 0x29, 0x8a, 0x85, 0x82, 0xdb, 0xbe, 0x9c, 0x98, - 0xe0, 0x6a, 0x62, 0x82, 0x9f, 0x13, 0x13, 0x5c, 0x4c, 0xcd, 0xd2, 0xd5, 0xd4, 0x2c, 0xfd, 0x98, - 0x9a, 0xa5, 0x57, 0x8d, 0x25, 0x77, 0xa4, 0x54, 0x23, 0x61, 0xf4, 0x0d, 0xf1, 0x85, 0xe3, 0x53, - 0x46, 0x9c, 0xf3, 0xf9, 0xb7, 0x42, 0x1a, 0xd5, 0xfd, 0x5f, 0x3e, 0xee, 0x47, 0x7f, 0x02, 0x00, - 0x00, 0xff, 0xff, 0x18, 0xae, 0x3c, 0x27, 0x49, 0x04, 0x00, 0x00, -} - -func (this *AuthorizationGrant) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*AuthorizationGrant) - if !ok { - that2, ok := that.(AuthorizationGrant) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Authorization.Equal(that1.Authorization) { - return false - } - if !this.Expiration.Equal(that1.Expiration) { - return false - } - return true -} -func (this *GenericAuthorization) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*GenericAuthorization) - if !ok { - that2, ok := that.(GenericAuthorization) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.GrantMsgType != that1.GrantMsgType { - return false - } - return true -} -func (this *SendAuthorization) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*SendAuthorization) - if !ok { - that2, ok := that.(SendAuthorization) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.SpendLimit) != len(that1.SpendLimit) { - return false - } - for i := range this.SpendLimit { - if !this.SpendLimit[i].Equal(&that1.SpendLimit[i]) { - return false - } - } - return true -} -func (this *GGMPair) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*GGMPair) - if !ok { - that2, ok := that.(GGMPair) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.GranterAddress != that1.GranterAddress { - return false - } - if this.GranteeAddress != that1.GranteeAddress { - return false - } - if this.MsgType != that1.MsgType { - return false - } - return true -} -func (this *GGMPairs) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*GGMPairs) - if !ok { - that2, ok := that.(GGMPairs) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Pairs) != len(that1.Pairs) { - return false - } - for i := range this.Pairs { - if !this.Pairs[i].Equal(&that1.Pairs[i]) { - return false - } - } - return true -} -func (m *AuthorizationGrant) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthorizationGrant) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AuthorizationGrant) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Expiration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Expiration):]) - if err1 != nil { - return 0, err1 - } - i -= n1 - i = encodeVarintMsgauth(dAtA, i, uint64(n1)) - i-- - dAtA[i] = 0x12 - if m.Authorization != nil { - { - size, err := m.Authorization.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMsgauth(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GenericAuthorization) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GenericAuthorization) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenericAuthorization) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.GrantMsgType) > 0 { - i -= len(m.GrantMsgType) - copy(dAtA[i:], m.GrantMsgType) - i = encodeVarintMsgauth(dAtA, i, uint64(len(m.GrantMsgType))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SendAuthorization) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SendAuthorization) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SendAuthorization) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SpendLimit) > 0 { - for iNdEx := len(m.SpendLimit) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.SpendLimit[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMsgauth(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *GGMPair) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GGMPair) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GGMPair) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.MsgType) > 0 { - i -= len(m.MsgType) - copy(dAtA[i:], m.MsgType) - i = encodeVarintMsgauth(dAtA, i, uint64(len(m.MsgType))) - i-- - dAtA[i] = 0x1a - } - if len(m.GranteeAddress) > 0 { - i -= len(m.GranteeAddress) - copy(dAtA[i:], m.GranteeAddress) - i = encodeVarintMsgauth(dAtA, i, uint64(len(m.GranteeAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.GranterAddress) > 0 { - i -= len(m.GranterAddress) - copy(dAtA[i:], m.GranterAddress) - i = encodeVarintMsgauth(dAtA, i, uint64(len(m.GranterAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GGMPairs) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GGMPairs) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GGMPairs) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Pairs) > 0 { - for iNdEx := len(m.Pairs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Pairs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMsgauth(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintMsgauth(dAtA []byte, offset int, v uint64) int { - offset -= sovMsgauth(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *AuthorizationGrant) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Authorization != nil { - l = m.Authorization.Size() - n += 1 + l + sovMsgauth(uint64(l)) - } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Expiration) - n += 1 + l + sovMsgauth(uint64(l)) - return n -} - -func (m *GenericAuthorization) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.GrantMsgType) - if l > 0 { - n += 1 + l + sovMsgauth(uint64(l)) - } - return n -} - -func (m *SendAuthorization) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.SpendLimit) > 0 { - for _, e := range m.SpendLimit { - l = e.Size() - n += 1 + l + sovMsgauth(uint64(l)) - } - } - return n -} - -func (m *GGMPair) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.GranterAddress) - if l > 0 { - n += 1 + l + sovMsgauth(uint64(l)) - } - l = len(m.GranteeAddress) - if l > 0 { - n += 1 + l + sovMsgauth(uint64(l)) - } - l = len(m.MsgType) - if l > 0 { - n += 1 + l + sovMsgauth(uint64(l)) - } - return n -} - -func (m *GGMPairs) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Pairs) > 0 { - for _, e := range m.Pairs { - l = e.Size() - n += 1 + l + sovMsgauth(uint64(l)) - } - } - return n -} - -func sovMsgauth(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozMsgauth(x uint64) (n int) { - return sovMsgauth(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *AuthorizationGrant) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgauth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthorizationGrant: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthorizationGrant: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authorization", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgauth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMsgauth - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMsgauth - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Authorization == nil { - m.Authorization = &types.Any{} - } - if err := m.Authorization.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Expiration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgauth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMsgauth - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMsgauth - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Expiration, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMsgauth(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMsgauth - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GenericAuthorization) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgauth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GenericAuthorization: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenericAuthorization: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GrantMsgType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgauth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMsgauth - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMsgauth - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GrantMsgType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMsgauth(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMsgauth - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SendAuthorization) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgauth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SendAuthorization: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SendAuthorization: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpendLimit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgauth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMsgauth - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMsgauth - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpendLimit = append(m.SpendLimit, types1.Coin{}) - if err := m.SpendLimit[len(m.SpendLimit)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMsgauth(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMsgauth - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GGMPair) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgauth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GGMPair: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GGMPair: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GranterAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgauth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMsgauth - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMsgauth - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GranterAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GranteeAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgauth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMsgauth - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMsgauth - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GranteeAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MsgType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgauth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMsgauth - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMsgauth - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MsgType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMsgauth(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMsgauth - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GGMPairs) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgauth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GGMPairs: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GGMPairs: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pairs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMsgauth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMsgauth - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMsgauth - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Pairs = append(m.Pairs, GGMPair{}) - if err := m.Pairs[len(m.Pairs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMsgauth(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMsgauth - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMsgauth(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMsgauth - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMsgauth - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMsgauth - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthMsgauth - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupMsgauth - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthMsgauth - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthMsgauth = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMsgauth = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupMsgauth = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/msgauth/types/msgs.go b/x/msgauth/types/msgs.go deleted file mode 100644 index ea42c4ac9..000000000 --- a/x/msgauth/types/msgs.go +++ /dev/null @@ -1,241 +0,0 @@ -package types - -import ( - fmt "fmt" - "time" - - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - - "github.com/gogo/protobuf/proto" -) - -// ensure Msg interface compliance at compile time -var ( - _ sdk.Msg = &MsgGrantAuthorization{} - _ sdk.Msg = &MsgRevokeAuthorization{} - _ sdk.Msg = &MsgExecAuthorized{} -) - -var _ codectypes.UnpackInterfacesMessage = MsgGrantAuthorization{} - -// msgauth message types -const ( - TypeMsgGrantAuthorization = "grant_authorization" - TypeMsgRevokeAuthorization = "revoke_authorization" - TypeMsgExecAuthorized = "exec_authorized" -) - -// NewMsgGrantAuthorization returns new MsgGrantAuthorization instance -func NewMsgGrantAuthorization(granter sdk.AccAddress, grantee sdk.AccAddress, authorization AuthorizationI, period time.Duration) (*MsgGrantAuthorization, error) { - msg, ok := authorization.(proto.Message) - if !ok { - return nil, fmt.Errorf("%T does not implement proto.Message", authorization) - } - - any, err := codectypes.NewAnyWithValue(msg) - if err != nil { - return nil, err - } - - return &MsgGrantAuthorization{ - Granter: granter.String(), - Grantee: grantee.String(), - Authorization: any, - Period: period, - }, nil -} - -// Route implements sdk.Msg -func (msg MsgGrantAuthorization) Route() string { return RouterKey } - -// Type implements sdk.Msg -func (msg MsgGrantAuthorization) Type() string { return TypeMsgGrantAuthorization } - -// GetSigners implements sdk.Msg -func (msg MsgGrantAuthorization) GetSigners() []sdk.AccAddress { - granter, err := sdk.AccAddressFromBech32(msg.Granter) - if err != nil { - panic(err) - } - - return []sdk.AccAddress{granter} -} - -// GetSignBytes implements sdk.Msg -func (msg MsgGrantAuthorization) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) -} - -// ValidateBasic implements sdk.Msg -func (msg MsgGrantAuthorization) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(msg.Granter) - if err != nil { - return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid granter address (%s)", err) - } - - _, err = sdk.AccAddressFromBech32(msg.Grantee) - if err != nil { - return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid grantee address (%s)", err) - } - - if msg.Granter == msg.Grantee { - return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "can not be grantee == granter") - } - - if msg.Period <= 0 { - return ErrInvalidPeriod - } - - authorization := msg.GetAuthorization() - if authorization == nil { - return sdkerrors.Wrap(ErrInvalidAuthorization, "missing authorization") - } - - if !IsGrantableMsgType(authorization.MsgType()) { - return sdkerrors.Wrap(ErrInvalidMsgType, authorization.MsgType()) - } - - return nil -} - -// GetAuthorization returns the grant Authorization -func (msg MsgGrantAuthorization) GetAuthorization() AuthorizationI { - return msg.Authorization.GetCachedValue().(AuthorizationI) -} - -// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces -func (msg MsgGrantAuthorization) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { - var authorization AuthorizationI - return unpacker.UnpackAny(msg.Authorization, &authorization) -} - -// NewMsgRevokeAuthorization returns new MsgRevokeAuthorization instance -func NewMsgRevokeAuthorization(granter sdk.AccAddress, grantee sdk.AccAddress, authorizationMsgType string) *MsgRevokeAuthorization { - return &MsgRevokeAuthorization{ - Granter: granter.String(), - Grantee: grantee.String(), - AuthorizationMsgType: authorizationMsgType, - } -} - -// Route implements sdk.Msg -func (msg MsgRevokeAuthorization) Route() string { return RouterKey } - -// Type implements sdk.Msg -func (msg MsgRevokeAuthorization) Type() string { return TypeMsgRevokeAuthorization } - -// GetSigners implements sdk.Msg -func (msg MsgRevokeAuthorization) GetSigners() []sdk.AccAddress { - granter, err := sdk.AccAddressFromBech32(msg.Granter) - if err != nil { - panic(err) - } - - return []sdk.AccAddress{granter} -} - -// GetSignBytes implements sdk.Msg -func (msg MsgRevokeAuthorization) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) -} - -// ValidateBasic implements sdk.Msg -func (msg MsgRevokeAuthorization) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(msg.Granter) - if err != nil { - return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid granter address (%s)", err) - } - - _, err = sdk.AccAddressFromBech32(msg.Grantee) - if err != nil { - return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid grantee address (%s)", err) - } - - return nil -} - -// NewMsgExecAuthorized returns new MsgExecAuthorized instance -func NewMsgExecAuthorized(grantee sdk.AccAddress, msgs []sdk.Msg) (*MsgExecAuthorized, error) { - anys := make([]*codectypes.Any, len(msgs)) - - for i, msg := range msgs { - var err error - anys[i], err = codectypes.NewAnyWithValue(msg) - if err != nil { - return nil, fmt.Errorf("%T does not implement proto.Message", msg) - } - } - - return &MsgExecAuthorized{ - Grantee: grantee.String(), - Msgs: anys, - }, nil -} - -// Route implements sdk.Msg -func (msg MsgExecAuthorized) Route() string { return RouterKey } - -// Type implements sdk.Msg -func (msg MsgExecAuthorized) Type() string { return TypeMsgExecAuthorized } - -// GetSigners implements sdk.Msg -func (msg MsgExecAuthorized) GetSigners() []sdk.AccAddress { - grantee, err := sdk.AccAddressFromBech32(msg.Grantee) - if err != nil { - panic(err) - } - - return []sdk.AccAddress{grantee} -} - -// GetSignBytes implements sdk.Msg -func (msg MsgExecAuthorized) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) -} - -// ValidateBasic implements sdk.Msg -func (msg MsgExecAuthorized) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(msg.Grantee) - if err != nil { - return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid grantee address (%s)", err) - } - - if len(msg.Msgs) == 0 { - return sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "cannot execute empty msgs") - } - - sdkMsgs := msg.GetMsgs() - for _, sdkMsg := range sdkMsgs { - if sdkMsg == nil { - return sdkerrors.Wrap(ErrInvalidMsg, "missing msg") - } - } - - return nil -} - -// GetMsgs returns the grant Authorization -func (msg MsgExecAuthorized) GetMsgs() []sdk.Msg { - var sdkMsgs []sdk.Msg - for _, msg := range msg.Msgs { - sdkMsgs = append(sdkMsgs, msg.GetCachedValue().(sdk.Msg)) - } - - return sdkMsgs -} - -// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces -func (msg MsgExecAuthorized) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { - for _, msg := range msg.Msgs { - var sdkMsg sdk.Msg - err := unpacker.UnpackAny(msg, &sdkMsg) - - if err != nil { - return err - } - } - - return nil -} diff --git a/x/msgauth/types/msgs_test.go b/x/msgauth/types/msgs_test.go deleted file mode 100644 index ac3535cfa..000000000 --- a/x/msgauth/types/msgs_test.go +++ /dev/null @@ -1,98 +0,0 @@ -package types - -import ( - "testing" - "time" - - "github.com/stretchr/testify/require" - - "github.com/cosmos/cosmos-sdk/testutil/testdata" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -func TestMsgGrantAuthorization(t *testing.T) { - addrs := []sdk.AccAddress{ - sdk.AccAddress([]byte("addr1_______________")), - sdk.AccAddress([]byte("addr2_______________")), - } - - RegisterGrantableMsgType("swap") - - tests := []struct { - granter sdk.AccAddress - grantee sdk.AccAddress - authorization AuthorizationI - period time.Duration - expectedErr string - }{ - {addrs[0], addrs[1], NewGenericAuthorization("swap"), 100, ""}, - {addrs[0], addrs[0], NewGenericAuthorization("swap"), 100, "can not be grantee == granter: invalid request"}, - {sdk.AccAddress{}, addrs[1], NewGenericAuthorization("swap"), 100, "Invalid granter address (empty address string is not allowed): invalid address"}, - {addrs[0], sdk.AccAddress{}, NewGenericAuthorization("swap"), 100, "Invalid grantee address (empty address string is not allowed): invalid address"}, - {addrs[0], addrs[1], NewGenericAuthorization("swap"), 0, "period of authorization should be positive time duration"}, - } - - for _, tc := range tests { - msg, err := NewMsgGrantAuthorization(tc.granter, tc.grantee, tc.authorization, tc.period) - require.NoError(t, err) - - if tc.expectedErr == "" { - require.NoError(t, msg.ValidateBasic()) - } else { - require.EqualError(t, msg.ValidateBasic(), tc.expectedErr) - } - } -} - -func TestMsgRevokeAuthorization(t *testing.T) { - addrs := []sdk.AccAddress{ - sdk.AccAddress([]byte("addr1_______________")), - sdk.AccAddress([]byte("addr2_______________")), - } - - tests := []struct { - granter sdk.AccAddress - grantee sdk.AccAddress - expectedErr string - }{ - {addrs[0], addrs[1], ""}, - {sdk.AccAddress{}, addrs[1], "Invalid granter address (empty address string is not allowed): invalid address"}, - {addrs[0], sdk.AccAddress{}, "Invalid grantee address (empty address string is not allowed): invalid address"}, - } - - for _, tc := range tests { - msg := NewMsgRevokeAuthorization(tc.granter, tc.grantee, "") - if tc.expectedErr == "" { - require.Nil(t, msg.ValidateBasic()) - } else { - require.EqualError(t, msg.ValidateBasic(), tc.expectedErr) - } - } -} - -func TestMsgExecAuthorization(t *testing.T) { - addrs := []sdk.AccAddress{ - sdk.AccAddress([]byte("addr2_______________")), - } - - tests := []struct { - grantee sdk.AccAddress - msgs []sdk.Msg - expectedErr string - }{ - {addrs[0], []sdk.Msg{testdata.NewTestMsg(addrs[0])}, ""}, - {sdk.AccAddress{}, []sdk.Msg{testdata.NewTestMsg(addrs[0])}, "Invalid grantee address (empty address string is not allowed): invalid address"}, - {addrs[0], []sdk.Msg{}, "cannot execute empty msgs: invalid request"}, - } - - for _, tc := range tests { - msg, err := NewMsgExecAuthorized(tc.grantee, tc.msgs) - require.NoError(t, err) - - if tc.expectedErr == "" { - require.NoError(t, msg.ValidateBasic()) - } else { - require.EqualError(t, msg.ValidateBasic(), tc.expectedErr) - } - } -} diff --git a/x/msgauth/types/querier.go b/x/msgauth/types/querier.go deleted file mode 100644 index 79afdb17d..000000000 --- a/x/msgauth/types/querier.go +++ /dev/null @@ -1,34 +0,0 @@ -package types - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// Defines the prefix of each query path -const ( - QueryGrants = "grants" - QueryAllGrants = "all_grants" -) - -// QueryGrantsParams defines the params for the following queries: -// - 'custom/msgauth/grants' -type QueryGrantsParams struct { - Granter sdk.AccAddress `json:"granter"` - Grantee sdk.AccAddress `json:"grantee"` -} - -// NewQueryGrantsParams returns params for grant query -func NewQueryGrantsParams(granter sdk.AccAddress, grantee sdk.AccAddress) QueryGrantsParams { - return QueryGrantsParams{Granter: granter, Grantee: grantee} -} - -// QueryAllGrantsParams defines the params for the following queries: -// - 'custom/msgauth/all_grants' -type QueryAllGrantsParams struct { - Granter sdk.AccAddress `json:"granter"` -} - -// NewQueryAllGrantsParams returns params for grant query -func NewQueryAllGrantsParams(granter sdk.AccAddress) QueryAllGrantsParams { - return QueryAllGrantsParams{Granter: granter} -} diff --git a/x/msgauth/types/query.pb.go b/x/msgauth/types/query.pb.go deleted file mode 100644 index e356db8a9..000000000 --- a/x/msgauth/types/query.pb.go +++ /dev/null @@ -1,1023 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: terra/msgauth/v1beta1/query.proto - -package types - -import ( - context "context" - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// QueryGrantsRequest is the request type for the Query/Grants RPC method. -type QueryGrantsRequest struct { - Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` - Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` -} - -func (m *QueryGrantsRequest) Reset() { *m = QueryGrantsRequest{} } -func (m *QueryGrantsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryGrantsRequest) ProtoMessage() {} -func (*QueryGrantsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9aa48243379ba280, []int{0} -} -func (m *QueryGrantsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGrantsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGrantsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryGrantsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGrantsRequest.Merge(m, src) -} -func (m *QueryGrantsRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryGrantsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGrantsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGrantsRequest proto.InternalMessageInfo - -// QueryGrantsResponse is the response type for the Query/Grants RPC method. -type QueryGrantsResponse struct { - Grants []AuthorizationGrant `protobuf:"bytes,1,rep,name=grants,proto3" json:"grants"` -} - -func (m *QueryGrantsResponse) Reset() { *m = QueryGrantsResponse{} } -func (m *QueryGrantsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryGrantsResponse) ProtoMessage() {} -func (*QueryGrantsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9aa48243379ba280, []int{1} -} -func (m *QueryGrantsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGrantsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGrantsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryGrantsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGrantsResponse.Merge(m, src) -} -func (m *QueryGrantsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryGrantsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGrantsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGrantsResponse proto.InternalMessageInfo - -func (m *QueryGrantsResponse) GetGrants() []AuthorizationGrant { - if m != nil { - return m.Grants - } - return nil -} - -// QueryAllGrantsRequest is the request type for the Query/AllGrants RPC method. -type QueryAllGrantsRequest struct { - Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` -} - -func (m *QueryAllGrantsRequest) Reset() { *m = QueryAllGrantsRequest{} } -func (m *QueryAllGrantsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryAllGrantsRequest) ProtoMessage() {} -func (*QueryAllGrantsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9aa48243379ba280, []int{2} -} -func (m *QueryAllGrantsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAllGrantsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAllGrantsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryAllGrantsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAllGrantsRequest.Merge(m, src) -} -func (m *QueryAllGrantsRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryAllGrantsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAllGrantsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAllGrantsRequest proto.InternalMessageInfo - -// QueryAllGrantsResponse is the response type for the Query/AllGrants RPC method. -type QueryAllGrantsResponse struct { - Grants []AuthorizationGrant `protobuf:"bytes,1,rep,name=grants,proto3" json:"grants"` -} - -func (m *QueryAllGrantsResponse) Reset() { *m = QueryAllGrantsResponse{} } -func (m *QueryAllGrantsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryAllGrantsResponse) ProtoMessage() {} -func (*QueryAllGrantsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9aa48243379ba280, []int{3} -} -func (m *QueryAllGrantsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAllGrantsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAllGrantsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryAllGrantsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAllGrantsResponse.Merge(m, src) -} -func (m *QueryAllGrantsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryAllGrantsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAllGrantsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAllGrantsResponse proto.InternalMessageInfo - -func (m *QueryAllGrantsResponse) GetGrants() []AuthorizationGrant { - if m != nil { - return m.Grants - } - return nil -} - -func init() { - proto.RegisterType((*QueryGrantsRequest)(nil), "terra.msgauth.v1beta1.QueryGrantsRequest") - proto.RegisterType((*QueryGrantsResponse)(nil), "terra.msgauth.v1beta1.QueryGrantsResponse") - proto.RegisterType((*QueryAllGrantsRequest)(nil), "terra.msgauth.v1beta1.QueryAllGrantsRequest") - proto.RegisterType((*QueryAllGrantsResponse)(nil), "terra.msgauth.v1beta1.QueryAllGrantsResponse") -} - -func init() { proto.RegisterFile("terra/msgauth/v1beta1/query.proto", fileDescriptor_9aa48243379ba280) } - -var fileDescriptor_9aa48243379ba280 = []byte{ - // 412 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2c, 0x49, 0x2d, 0x2a, - 0x4a, 0xd4, 0xcf, 0x2d, 0x4e, 0x4f, 0x2c, 0x2d, 0xc9, 0xd0, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, - 0x34, 0xd4, 0x2f, 0x2c, 0x4d, 0x2d, 0xaa, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x05, - 0x2b, 0xd1, 0x83, 0x2a, 0xd1, 0x83, 0x2a, 0x91, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0xab, 0xd0, - 0x07, 0xb1, 0x20, 0x8a, 0xa5, 0x64, 0xd2, 0xf3, 0xf3, 0xd3, 0x73, 0x52, 0xf5, 0x13, 0x0b, 0x32, - 0xf5, 0x13, 0xf3, 0xf2, 0xf2, 0x4b, 0x12, 0x4b, 0x32, 0xf3, 0xf3, 0x8a, 0xa1, 0xb2, 0xca, 0xd8, - 0x6d, 0x83, 0x19, 0x0d, 0x56, 0xa4, 0x14, 0xc4, 0x25, 0x14, 0x08, 0xb2, 0xde, 0xbd, 0x28, 0x31, - 0xaf, 0xa4, 0x38, 0x28, 0xb5, 0xb0, 0x34, 0xb5, 0xb8, 0x44, 0x48, 0x82, 0x8b, 0x3d, 0x1d, 0x24, - 0x90, 0x5a, 0x24, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x19, 0x04, 0xe3, 0x22, 0x64, 0x52, 0x25, 0x98, - 0x90, 0x65, 0x52, 0xad, 0x38, 0x3a, 0x16, 0xc8, 0x33, 0xbc, 0x58, 0x20, 0xcf, 0xa0, 0x14, 0xc7, - 0x25, 0x8c, 0x62, 0x66, 0x71, 0x41, 0x7e, 0x5e, 0x71, 0xaa, 0x90, 0x3b, 0x17, 0x1b, 0x58, 0x6d, - 0xb1, 0x04, 0xa3, 0x02, 0xb3, 0x06, 0xb7, 0x91, 0xa6, 0x1e, 0x56, 0xbf, 0xea, 0x39, 0x96, 0x96, - 0x64, 0xe4, 0x17, 0x65, 0x56, 0x81, 0x3d, 0x03, 0x36, 0xc3, 0x89, 0xe5, 0xc4, 0x3d, 0x79, 0x86, - 0x20, 0xa8, 0x76, 0x25, 0x6b, 0x2e, 0x51, 0xb0, 0xf9, 0x8e, 0x39, 0x39, 0x44, 0x3a, 0x1b, 0xc9, - 0x71, 0x89, 0x5c, 0x62, 0xe8, 0x9a, 0xa9, 0xec, 0x3e, 0xa3, 0x5b, 0x4c, 0x5c, 0xac, 0x60, 0x3b, - 0x84, 0xd6, 0x30, 0x72, 0xb1, 0x41, 0x6c, 0x11, 0xc2, 0x65, 0x1a, 0x66, 0xe8, 0x4b, 0x69, 0x11, - 0xa3, 0x14, 0xe2, 0x68, 0x25, 0xef, 0xa6, 0xcb, 0x4f, 0x26, 0x33, 0xb9, 0x0a, 0x39, 0xeb, 0x63, - 0x8f, 0x6d, 0x68, 0x00, 0x14, 0xeb, 0x57, 0x43, 0x59, 0xb5, 0x50, 0xa1, 0x54, 0xb8, 0x50, 0x2a, - 0x54, 0xa8, 0x58, 0x68, 0x21, 0x23, 0x17, 0x27, 0x3c, 0x5c, 0x84, 0x74, 0xf0, 0x39, 0x03, 0x3d, - 0xec, 0xa5, 0x74, 0x89, 0x54, 0x0d, 0x75, 0xb7, 0x39, 0xd8, 0xdd, 0x86, 0x42, 0xfa, 0x30, 0x77, - 0x27, 0x16, 0x65, 0xa7, 0x96, 0x10, 0x74, 0x76, 0xb1, 0x93, 0xfb, 0x89, 0x47, 0x72, 0x8c, 0x17, - 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, - 0x37, 0x1e, 0xcb, 0x31, 0x44, 0xe9, 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, - 0x42, 0x0c, 0xd5, 0x2d, 0x28, 0xca, 0xcf, 0x4a, 0x4d, 0x2e, 0xd1, 0x4f, 0xce, 0x2f, 0x4a, 0xd5, - 0xaf, 0x80, 0x87, 0x4d, 0x49, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, 0x38, 0x03, 0x18, 0x03, 0x02, - 0x00, 0x00, 0xff, 0xff, 0x98, 0x0c, 0x1f, 0x7c, 0x95, 0x03, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryClient interface { - // Grants returns grants between a granter and a grantee - Grants(ctx context.Context, in *QueryGrantsRequest, opts ...grpc.CallOption) (*QueryGrantsResponse, error) - // AllGrants returns all grants of a granter - AllGrants(ctx context.Context, in *QueryAllGrantsRequest, opts ...grpc.CallOption) (*QueryAllGrantsResponse, error) -} - -type queryClient struct { - cc grpc1.ClientConn -} - -func NewQueryClient(cc grpc1.ClientConn) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Grants(ctx context.Context, in *QueryGrantsRequest, opts ...grpc.CallOption) (*QueryGrantsResponse, error) { - out := new(QueryGrantsResponse) - err := c.cc.Invoke(ctx, "/terra.msgauth.v1beta1.Query/Grants", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) AllGrants(ctx context.Context, in *QueryAllGrantsRequest, opts ...grpc.CallOption) (*QueryAllGrantsResponse, error) { - out := new(QueryAllGrantsResponse) - err := c.cc.Invoke(ctx, "/terra.msgauth.v1beta1.Query/AllGrants", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -type QueryServer interface { - // Grants returns grants between a granter and a grantee - Grants(context.Context, *QueryGrantsRequest) (*QueryGrantsResponse, error) - // AllGrants returns all grants of a granter - AllGrants(context.Context, *QueryAllGrantsRequest) (*QueryAllGrantsResponse, error) -} - -// UnimplementedQueryServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (*UnimplementedQueryServer) Grants(ctx context.Context, req *QueryGrantsRequest) (*QueryGrantsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Grants not implemented") -} -func (*UnimplementedQueryServer) AllGrants(ctx context.Context, req *QueryAllGrantsRequest) (*QueryAllGrantsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AllGrants not implemented") -} - -func RegisterQueryServer(s grpc1.Server, srv QueryServer) { - s.RegisterService(&_Query_serviceDesc, srv) -} - -func _Query_Grants_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGrantsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Grants(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/terra.msgauth.v1beta1.Query/Grants", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Grants(ctx, req.(*QueryGrantsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_AllGrants_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllGrantsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).AllGrants(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/terra.msgauth.v1beta1.Query/AllGrants", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).AllGrants(ctx, req.(*QueryAllGrantsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "terra.msgauth.v1beta1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Grants", - Handler: _Query_Grants_Handler, - }, - { - MethodName: "AllGrants", - Handler: _Query_AllGrants_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "terra/msgauth/v1beta1/query.proto", -} - -func (m *QueryGrantsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryGrantsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGrantsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Grantee) > 0 { - i -= len(m.Grantee) - copy(dAtA[i:], m.Grantee) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Grantee))) - i-- - dAtA[i] = 0x12 - } - if len(m.Granter) > 0 { - i -= len(m.Granter) - copy(dAtA[i:], m.Granter) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Granter))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryGrantsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryGrantsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGrantsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Grants) > 0 { - for iNdEx := len(m.Grants) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Grants[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryAllGrantsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryAllGrantsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAllGrantsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Granter) > 0 { - i -= len(m.Granter) - copy(dAtA[i:], m.Granter) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Granter))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryAllGrantsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryAllGrantsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAllGrantsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Grants) > 0 { - for iNdEx := len(m.Grants) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Grants[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *QueryGrantsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Granter) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Grantee) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryGrantsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Grants) > 0 { - for _, e := range m.Grants { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - -func (m *QueryAllGrantsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Granter) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryAllGrantsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Grants) > 0 { - for _, e := range m.Grants { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *QueryGrantsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryGrantsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGrantsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Granter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Grantee = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryGrantsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryGrantsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGrantsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Grants", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Grants = append(m.Grants, AuthorizationGrant{}) - if err := m.Grants[len(m.Grants)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryAllGrantsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryAllGrantsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllGrantsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Granter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryAllGrantsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryAllGrantsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllGrantsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Grants", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Grants = append(m.Grants, AuthorizationGrant{}) - if err := m.Grants[len(m.Grants)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipQuery(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthQuery - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupQuery - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthQuery - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/msgauth/types/query.pb.gw.go b/x/msgauth/types/query.pb.gw.go deleted file mode 100644 index ce8d103b6..000000000 --- a/x/msgauth/types/query.pb.gw.go +++ /dev/null @@ -1,304 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: terra/msgauth/v1beta1/query.proto - -/* -Package types is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package types - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage - -func request_Query_Grants_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGrantsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["granter"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "granter") - } - - protoReq.Granter, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "granter", err) - } - - val, ok = pathParams["grantee"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "grantee") - } - - protoReq.Grantee, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "grantee", err) - } - - msg, err := client.Grants(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_Grants_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGrantsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["granter"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "granter") - } - - protoReq.Granter, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "granter", err) - } - - val, ok = pathParams["grantee"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "grantee") - } - - protoReq.Grantee, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "grantee", err) - } - - msg, err := server.Grants(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_AllGrants_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAllGrantsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["granter"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "granter") - } - - protoReq.Granter, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "granter", err) - } - - msg, err := client.AllGrants(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_AllGrants_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAllGrantsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["granter"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "granter") - } - - protoReq.Granter, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "granter", err) - } - - msg, err := server.AllGrants(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". -// UnaryRPC :call QueryServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. -func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { - - mux.Handle("GET", pattern_Query_Grants_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_Grants_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Grants_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_AllGrants_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_AllGrants_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_AllGrants_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterQueryHandler(ctx, mux, conn) -} - -// RegisterQueryHandler registers the http handlers for service Query to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) -} - -// RegisterQueryHandlerClient registers the http handlers for service Query -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "QueryClient" to call the correct interceptors. -func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { - - mux.Handle("GET", pattern_Query_Grants_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_Grants_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Grants_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_AllGrants_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_AllGrants_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_AllGrants_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_Query_Grants_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7}, []string{"terra", "msgauth", "v1beta1", "granters", "granter", "grantees", "grantee", "grants"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_Query_AllGrants_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"terra", "market", "v1beta1", "granters", "granter", "grants"}, "", runtime.AssumeColonVerbOpt(true))) -) - -var ( - forward_Query_Grants_0 = runtime.ForwardResponseMessage - - forward_Query_AllGrants_0 = runtime.ForwardResponseMessage -) diff --git a/x/msgauth/types/send_authorization.go b/x/msgauth/types/send_authorization.go deleted file mode 100644 index 7532da27e..000000000 --- a/x/msgauth/types/send_authorization.go +++ /dev/null @@ -1,36 +0,0 @@ -package types - -import ( - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - - sdk "github.com/cosmos/cosmos-sdk/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" -) - -// NewSendAuthorization return new SendAuthorization instance -func NewSendAuthorization(spendLimit sdk.Coins) *SendAuthorization { - return &SendAuthorization{SpendLimit: spendLimit} -} - -// MsgType return msg type of the authorization -func (authorization SendAuthorization) MsgType() string { - return banktypes.TypeMsgSend -} - -// Accept return whether the operation is allowed or not, and also -// returns the updated authorization. -func (authorization SendAuthorization) Accept(msg sdk.Msg, block tmproto.Header) (allow bool, updated AuthorizationI, delete bool) { - switch msg := msg.(type) { - case *banktypes.MsgSend: - limitLeft, isNegative := authorization.SpendLimit.SafeSub(msg.Amount) - if isNegative { - return false, nil, false - } - if limitLeft.IsZero() { - return true, nil, true - } - - return true, &SendAuthorization{SpendLimit: limitLeft}, false - } - return false, nil, false -} diff --git a/x/msgauth/types/send_authorization_test.go b/x/msgauth/types/send_authorization_test.go deleted file mode 100644 index 38741f5a0..000000000 --- a/x/msgauth/types/send_authorization_test.go +++ /dev/null @@ -1,40 +0,0 @@ -package types - -import ( - "testing" - - "github.com/stretchr/testify/require" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - - "github.com/cosmos/cosmos-sdk/testutil/testdata" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/bank/types" - - core "github.com/terra-project/core/types" -) - -func TestSendAuthorization(t *testing.T) { - addrs := []sdk.AccAddress{ - sdk.AccAddress([]byte("addr1_______________")), - sdk.AccAddress([]byte("addr2_______________")), - } - - halfCoins := sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, sdk.NewInt(50))) - coins := sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, sdk.NewInt(100))) - sendAuthorization := NewSendAuthorization(coins) - - allow, _, _ := sendAuthorization.Accept(testdata.NewTestMsg(addrs[0]), tmproto.Header{}) - require.False(t, allow) - - allow, _, deleted := sendAuthorization.Accept(types.NewMsgSend(addrs[0], addrs[1], coins), tmproto.Header{}) - require.True(t, allow) - require.True(t, deleted) - - allow, updated, deleted := sendAuthorization.Accept(types.NewMsgSend(addrs[0], addrs[1], halfCoins), tmproto.Header{}) - require.True(t, allow) - require.False(t, deleted) - require.Equal(t, updated, NewSendAuthorization(halfCoins)) - - allow, _, _ = sendAuthorization.Accept(types.NewMsgSend(addrs[0], addrs[1], coins.Add(coins...)), tmproto.Header{}) - require.False(t, allow) -} diff --git a/x/msgauth/types/tx.pb.go b/x/msgauth/types/tx.pb.go deleted file mode 100644 index b4abc9530..000000000 --- a/x/msgauth/types/tx.pb.go +++ /dev/null @@ -1,1487 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: terra/msgauth/v1beta1/tx.proto - -package types - -import ( - context "context" - fmt "fmt" - types "github.com/cosmos/cosmos-sdk/codec/types" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - _ "github.com/golang/protobuf/ptypes/duration" - _ "github.com/regen-network/cosmos-proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// MsgGrantAuthorization represents a message to grant msg execute authorization -type MsgGrantAuthorization struct { - Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty" yaml:"granter"` - Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty" yaml:"grantee"` - Authorization *types.Any `protobuf:"bytes,3,opt,name=authorization,proto3" json:"authorization,omitempty" yaml:"authorization"` - Period time.Duration `protobuf:"bytes,4,opt,name=period,proto3,stdduration" json:"period" yaml:"period"` -} - -func (m *MsgGrantAuthorization) Reset() { *m = MsgGrantAuthorization{} } -func (m *MsgGrantAuthorization) String() string { return proto.CompactTextString(m) } -func (*MsgGrantAuthorization) ProtoMessage() {} -func (*MsgGrantAuthorization) Descriptor() ([]byte, []int) { - return fileDescriptor_f4983f5c2c3085c2, []int{0} -} -func (m *MsgGrantAuthorization) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgGrantAuthorization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgGrantAuthorization.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgGrantAuthorization) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgGrantAuthorization.Merge(m, src) -} -func (m *MsgGrantAuthorization) XXX_Size() int { - return m.Size() -} -func (m *MsgGrantAuthorization) XXX_DiscardUnknown() { - xxx_messageInfo_MsgGrantAuthorization.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgGrantAuthorization proto.InternalMessageInfo - -// MsgGrantAuthorizationResponse defines the Msg/GrantAuthorization response type. -type MsgGrantAuthorizationResponse struct { -} - -func (m *MsgGrantAuthorizationResponse) Reset() { *m = MsgGrantAuthorizationResponse{} } -func (m *MsgGrantAuthorizationResponse) String() string { return proto.CompactTextString(m) } -func (*MsgGrantAuthorizationResponse) ProtoMessage() {} -func (*MsgGrantAuthorizationResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f4983f5c2c3085c2, []int{1} -} -func (m *MsgGrantAuthorizationResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgGrantAuthorizationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgGrantAuthorizationResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgGrantAuthorizationResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgGrantAuthorizationResponse.Merge(m, src) -} -func (m *MsgGrantAuthorizationResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgGrantAuthorizationResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgGrantAuthorizationResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgGrantAuthorizationResponse proto.InternalMessageInfo - -// MsgRevokeAuthorization represents a message to revoke a grant -type MsgRevokeAuthorization struct { - Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty" yaml:"granter"` - Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty" yaml:"grantee"` - AuthorizationMsgType string `protobuf:"bytes,3,opt,name=authorization_msg_type,json=authorizationMsgType,proto3" json:"authorization_msg_type,omitempty" yaml:"authorization_msg_type"` -} - -func (m *MsgRevokeAuthorization) Reset() { *m = MsgRevokeAuthorization{} } -func (m *MsgRevokeAuthorization) String() string { return proto.CompactTextString(m) } -func (*MsgRevokeAuthorization) ProtoMessage() {} -func (*MsgRevokeAuthorization) Descriptor() ([]byte, []int) { - return fileDescriptor_f4983f5c2c3085c2, []int{2} -} -func (m *MsgRevokeAuthorization) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRevokeAuthorization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRevokeAuthorization.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgRevokeAuthorization) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRevokeAuthorization.Merge(m, src) -} -func (m *MsgRevokeAuthorization) XXX_Size() int { - return m.Size() -} -func (m *MsgRevokeAuthorization) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRevokeAuthorization.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRevokeAuthorization proto.InternalMessageInfo - -// MsgRevokeAuthorizationResponse defines the Msg/RevokeAuthorization response type. -type MsgRevokeAuthorizationResponse struct { -} - -func (m *MsgRevokeAuthorizationResponse) Reset() { *m = MsgRevokeAuthorizationResponse{} } -func (m *MsgRevokeAuthorizationResponse) String() string { return proto.CompactTextString(m) } -func (*MsgRevokeAuthorizationResponse) ProtoMessage() {} -func (*MsgRevokeAuthorizationResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f4983f5c2c3085c2, []int{3} -} -func (m *MsgRevokeAuthorizationResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRevokeAuthorizationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRevokeAuthorizationResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgRevokeAuthorizationResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRevokeAuthorizationResponse.Merge(m, src) -} -func (m *MsgRevokeAuthorizationResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgRevokeAuthorizationResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRevokeAuthorizationResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRevokeAuthorizationResponse proto.InternalMessageInfo - -// MsgExecAuthorized represents a message to execute granted msg -type MsgExecAuthorized struct { - Grantee string `protobuf:"bytes,1,opt,name=grantee,proto3" json:"grantee,omitempty" yaml:"grantee"` - Msgs []*types.Any `protobuf:"bytes,2,rep,name=msgs,proto3" json:"msgs,omitempty" yaml:"msgs"` -} - -func (m *MsgExecAuthorized) Reset() { *m = MsgExecAuthorized{} } -func (m *MsgExecAuthorized) String() string { return proto.CompactTextString(m) } -func (*MsgExecAuthorized) ProtoMessage() {} -func (*MsgExecAuthorized) Descriptor() ([]byte, []int) { - return fileDescriptor_f4983f5c2c3085c2, []int{4} -} -func (m *MsgExecAuthorized) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgExecAuthorized) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgExecAuthorized.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgExecAuthorized) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgExecAuthorized.Merge(m, src) -} -func (m *MsgExecAuthorized) XXX_Size() int { - return m.Size() -} -func (m *MsgExecAuthorized) XXX_DiscardUnknown() { - xxx_messageInfo_MsgExecAuthorized.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgExecAuthorized proto.InternalMessageInfo - -// MsgExecAuthorizedResponse defines the Msg/ExecAuthorized response type. -type MsgExecAuthorizedResponse struct { -} - -func (m *MsgExecAuthorizedResponse) Reset() { *m = MsgExecAuthorizedResponse{} } -func (m *MsgExecAuthorizedResponse) String() string { return proto.CompactTextString(m) } -func (*MsgExecAuthorizedResponse) ProtoMessage() {} -func (*MsgExecAuthorizedResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f4983f5c2c3085c2, []int{5} -} -func (m *MsgExecAuthorizedResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgExecAuthorizedResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgExecAuthorizedResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgExecAuthorizedResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgExecAuthorizedResponse.Merge(m, src) -} -func (m *MsgExecAuthorizedResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgExecAuthorizedResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgExecAuthorizedResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgExecAuthorizedResponse proto.InternalMessageInfo - -func init() { - proto.RegisterType((*MsgGrantAuthorization)(nil), "terra.msgauth.v1beta1.MsgGrantAuthorization") - proto.RegisterType((*MsgGrantAuthorizationResponse)(nil), "terra.msgauth.v1beta1.MsgGrantAuthorizationResponse") - proto.RegisterType((*MsgRevokeAuthorization)(nil), "terra.msgauth.v1beta1.MsgRevokeAuthorization") - proto.RegisterType((*MsgRevokeAuthorizationResponse)(nil), "terra.msgauth.v1beta1.MsgRevokeAuthorizationResponse") - proto.RegisterType((*MsgExecAuthorized)(nil), "terra.msgauth.v1beta1.MsgExecAuthorized") - proto.RegisterType((*MsgExecAuthorizedResponse)(nil), "terra.msgauth.v1beta1.MsgExecAuthorizedResponse") -} - -func init() { proto.RegisterFile("terra/msgauth/v1beta1/tx.proto", fileDescriptor_f4983f5c2c3085c2) } - -var fileDescriptor_f4983f5c2c3085c2 = []byte{ - // 555 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x94, 0x3f, 0x6f, 0xd3, 0x4e, - 0x18, 0xc7, 0x7d, 0x49, 0xd5, 0xdf, 0xaf, 0x57, 0x35, 0x08, 0x93, 0x56, 0x49, 0x50, 0x7d, 0xc1, - 0x53, 0x84, 0x88, 0x4d, 0x0b, 0x0c, 0x74, 0x6b, 0x04, 0xaa, 0x90, 0xf0, 0x62, 0x21, 0x21, 0xb1, - 0x44, 0x8e, 0x73, 0xbd, 0x04, 0x62, 0x9f, 0x75, 0x77, 0xae, 0x62, 0xd8, 0x11, 0x23, 0x23, 0x63, - 0xdf, 0x03, 0xbc, 0x88, 0x8a, 0xa9, 0x1b, 0x4c, 0x06, 0x25, 0x0b, 0x62, 0xf4, 0x2b, 0x40, 0xf1, - 0x3f, 0xe2, 0xd6, 0x11, 0x74, 0x61, 0xcb, 0xe5, 0xfb, 0xb9, 0xef, 0xf3, 0x7c, 0x9f, 0x7b, 0x12, - 0xa8, 0x08, 0xcc, 0x98, 0xa5, 0x3b, 0x9c, 0x58, 0xbe, 0x18, 0xe9, 0x27, 0x7b, 0x03, 0x2c, 0xac, - 0x3d, 0x5d, 0x4c, 0x35, 0x8f, 0x51, 0x41, 0xe5, 0xed, 0x58, 0xd7, 0x52, 0x5d, 0x4b, 0xf5, 0x56, - 0x9d, 0x50, 0x42, 0x63, 0x42, 0x5f, 0x7c, 0x4a, 0xe0, 0x96, 0x42, 0x28, 0x25, 0x13, 0xac, 0xc7, - 0xa7, 0x81, 0x7f, 0xac, 0x0f, 0x7d, 0x66, 0x89, 0x31, 0x75, 0x53, 0xbd, 0x79, 0x51, 0xb7, 0xdc, - 0x20, 0x93, 0x6c, 0xca, 0x1d, 0xca, 0xfb, 0x89, 0x67, 0x72, 0x48, 0x24, 0xf5, 0x63, 0x05, 0x6e, - 0x1b, 0x9c, 0x1c, 0x31, 0xcb, 0x15, 0x87, 0xbe, 0x18, 0x51, 0x36, 0x7e, 0x1d, 0xbb, 0xca, 0x77, - 0xe0, 0x7f, 0x64, 0xf1, 0x2d, 0x66, 0x0d, 0xd0, 0x06, 0x9d, 0x8d, 0x9e, 0x1c, 0x85, 0xa8, 0x16, - 0x58, 0xce, 0xe4, 0x40, 0x4d, 0x05, 0xd5, 0xcc, 0x90, 0xdf, 0x34, 0x6e, 0x54, 0xca, 0x69, 0x9c, - 0xd3, 0x58, 0x3e, 0x86, 0x5b, 0xd6, 0x72, 0xb1, 0x46, 0xb5, 0x0d, 0x3a, 0x9b, 0xfb, 0x75, 0x2d, - 0xc9, 0xa0, 0x65, 0x19, 0xb4, 0x43, 0x37, 0xe8, 0xdd, 0x8e, 0x42, 0x54, 0x4f, 0x9c, 0x0a, 0x97, - 0xd4, 0xcf, 0x9f, 0xba, 0xb5, 0x42, 0xcf, 0x4f, 0xcc, 0xa2, 0xad, 0xfc, 0x14, 0xae, 0x7b, 0x98, - 0x8d, 0xe9, 0xb0, 0xb1, 0x16, 0x17, 0x68, 0x5e, 0x2a, 0xf0, 0x28, 0x1d, 0x62, 0xaf, 0x79, 0x16, - 0x22, 0x29, 0x0a, 0xd1, 0x56, 0x52, 0x29, 0xb9, 0xa6, 0x7e, 0xf8, 0x86, 0x80, 0x99, 0x7a, 0x1c, - 0xfc, 0xff, 0xee, 0x14, 0x49, 0x3f, 0x4e, 0x91, 0xa4, 0x22, 0xb8, 0x5b, 0x3a, 0x34, 0x13, 0x73, - 0x8f, 0xba, 0x1c, 0xab, 0x5f, 0x00, 0xdc, 0x31, 0x38, 0x31, 0xf1, 0x09, 0x7d, 0x85, 0xff, 0xdd, - 0x5c, 0x9f, 0xc3, 0x9d, 0xc2, 0x00, 0xfa, 0x0e, 0x27, 0x7d, 0x11, 0x78, 0x38, 0x1e, 0xf0, 0x46, - 0xef, 0x56, 0x14, 0xa2, 0xdd, 0x92, 0x51, 0xe6, 0x9c, 0x6a, 0xd6, 0x0b, 0x82, 0xc1, 0xc9, 0xb3, - 0xc0, 0xc3, 0x4b, 0xd1, 0xdb, 0x50, 0x29, 0x0f, 0x96, 0x67, 0x7f, 0x0b, 0xe0, 0x75, 0x83, 0x93, - 0xc7, 0x53, 0x6c, 0x67, 0x00, 0x1e, 0x2e, 0x07, 0x01, 0x7f, 0x0e, 0xf2, 0x10, 0xae, 0x39, 0x9c, - 0xf0, 0x46, 0xa5, 0x5d, 0x5d, 0xb9, 0x17, 0xd7, 0xa2, 0x10, 0x6d, 0x26, 0x06, 0x0b, 0x56, 0x35, - 0xe3, 0x2b, 0x4b, 0xad, 0xde, 0x84, 0xcd, 0x4b, 0x7d, 0x64, 0x5d, 0xee, 0xff, 0xac, 0xc0, 0xaa, - 0xc1, 0x89, 0x3c, 0x85, 0x72, 0xd9, 0xf2, 0x6b, 0xa5, 0x3f, 0x4d, 0xad, 0xf4, 0xd5, 0x5b, 0xf7, - 0xaf, 0x42, 0x67, 0x1d, 0xc8, 0x6f, 0xe0, 0x8d, 0xb2, 0xfd, 0xe8, 0xae, 0x36, 0x2b, 0xc1, 0x5b, - 0x0f, 0xae, 0x84, 0xe7, 0xc5, 0x27, 0xb0, 0x76, 0xe1, 0x81, 0x3a, 0xab, 0x8d, 0x8a, 0x64, 0xeb, - 0xee, 0xdf, 0x92, 0x59, 0xb5, 0xde, 0xd1, 0xd9, 0x4c, 0x01, 0xe7, 0x33, 0x05, 0x7c, 0x9f, 0x29, - 0xe0, 0xfd, 0x5c, 0x91, 0xce, 0xe7, 0x8a, 0xf4, 0x75, 0xae, 0x48, 0x2f, 0xba, 0x64, 0x2c, 0x46, - 0xfe, 0x40, 0xb3, 0xa9, 0xa3, 0xc7, 0xae, 0x5d, 0x8f, 0xd1, 0x97, 0xd8, 0x16, 0xba, 0x4d, 0x19, - 0xd6, 0xa7, 0xf9, 0x9f, 0xe7, 0x62, 0x3b, 0xf9, 0x60, 0x3d, 0xde, 0x80, 0x7b, 0xbf, 0x02, 0x00, - 0x00, 0xff, 0xff, 0xc2, 0xe1, 0x11, 0xe8, 0x5a, 0x05, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type MsgClient interface { - // GrantAuthorization defines a method for granting the provided - // authorization to the grantee on the granter's - // account during the provided period time. - GrantAuthorization(ctx context.Context, in *MsgGrantAuthorization, opts ...grpc.CallOption) (*MsgGrantAuthorizationResponse, error) - // RevokeAuthorization defines a method for revoking any authorization - // with the provided sdk.Msg type on the granter's account with - // that has been granted to the grantee. - RevokeAuthorization(ctx context.Context, in *MsgRevokeAuthorization, opts ...grpc.CallOption) (*MsgRevokeAuthorizationResponse, error) - // ExecAuthorized defines a method for revoking any authorization - // with the provided sdk.Msg type on the granter's account with - // that has been granted to the grantee. - ExecAuthorized(ctx context.Context, in *MsgExecAuthorized, opts ...grpc.CallOption) (*MsgExecAuthorizedResponse, error) -} - -type msgClient struct { - cc grpc1.ClientConn -} - -func NewMsgClient(cc grpc1.ClientConn) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) GrantAuthorization(ctx context.Context, in *MsgGrantAuthorization, opts ...grpc.CallOption) (*MsgGrantAuthorizationResponse, error) { - out := new(MsgGrantAuthorizationResponse) - err := c.cc.Invoke(ctx, "/terra.msgauth.v1beta1.Msg/GrantAuthorization", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) RevokeAuthorization(ctx context.Context, in *MsgRevokeAuthorization, opts ...grpc.CallOption) (*MsgRevokeAuthorizationResponse, error) { - out := new(MsgRevokeAuthorizationResponse) - err := c.cc.Invoke(ctx, "/terra.msgauth.v1beta1.Msg/RevokeAuthorization", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) ExecAuthorized(ctx context.Context, in *MsgExecAuthorized, opts ...grpc.CallOption) (*MsgExecAuthorizedResponse, error) { - out := new(MsgExecAuthorizedResponse) - err := c.cc.Invoke(ctx, "/terra.msgauth.v1beta1.Msg/ExecAuthorized", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -type MsgServer interface { - // GrantAuthorization defines a method for granting the provided - // authorization to the grantee on the granter's - // account during the provided period time. - GrantAuthorization(context.Context, *MsgGrantAuthorization) (*MsgGrantAuthorizationResponse, error) - // RevokeAuthorization defines a method for revoking any authorization - // with the provided sdk.Msg type on the granter's account with - // that has been granted to the grantee. - RevokeAuthorization(context.Context, *MsgRevokeAuthorization) (*MsgRevokeAuthorizationResponse, error) - // ExecAuthorized defines a method for revoking any authorization - // with the provided sdk.Msg type on the granter's account with - // that has been granted to the grantee. - ExecAuthorized(context.Context, *MsgExecAuthorized) (*MsgExecAuthorizedResponse, error) -} - -// UnimplementedMsgServer can be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (*UnimplementedMsgServer) GrantAuthorization(ctx context.Context, req *MsgGrantAuthorization) (*MsgGrantAuthorizationResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GrantAuthorization not implemented") -} -func (*UnimplementedMsgServer) RevokeAuthorization(ctx context.Context, req *MsgRevokeAuthorization) (*MsgRevokeAuthorizationResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RevokeAuthorization not implemented") -} -func (*UnimplementedMsgServer) ExecAuthorized(ctx context.Context, req *MsgExecAuthorized) (*MsgExecAuthorizedResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ExecAuthorized not implemented") -} - -func RegisterMsgServer(s grpc1.Server, srv MsgServer) { - s.RegisterService(&_Msg_serviceDesc, srv) -} - -func _Msg_GrantAuthorization_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgGrantAuthorization) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).GrantAuthorization(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/terra.msgauth.v1beta1.Msg/GrantAuthorization", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).GrantAuthorization(ctx, req.(*MsgGrantAuthorization)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_RevokeAuthorization_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgRevokeAuthorization) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).RevokeAuthorization(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/terra.msgauth.v1beta1.Msg/RevokeAuthorization", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RevokeAuthorization(ctx, req.(*MsgRevokeAuthorization)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_ExecAuthorized_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgExecAuthorized) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).ExecAuthorized(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/terra.msgauth.v1beta1.Msg/ExecAuthorized", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).ExecAuthorized(ctx, req.(*MsgExecAuthorized)) - } - return interceptor(ctx, in, info, handler) -} - -var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "terra.msgauth.v1beta1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GrantAuthorization", - Handler: _Msg_GrantAuthorization_Handler, - }, - { - MethodName: "RevokeAuthorization", - Handler: _Msg_RevokeAuthorization_Handler, - }, - { - MethodName: "ExecAuthorized", - Handler: _Msg_ExecAuthorized_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "terra/msgauth/v1beta1/tx.proto", -} - -func (m *MsgGrantAuthorization) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgGrantAuthorization) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgGrantAuthorization) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - n1, err1 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.Period, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.Period):]) - if err1 != nil { - return 0, err1 - } - i -= n1 - i = encodeVarintTx(dAtA, i, uint64(n1)) - i-- - dAtA[i] = 0x22 - if m.Authorization != nil { - { - size, err := m.Authorization.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Grantee) > 0 { - i -= len(m.Grantee) - copy(dAtA[i:], m.Grantee) - i = encodeVarintTx(dAtA, i, uint64(len(m.Grantee))) - i-- - dAtA[i] = 0x12 - } - if len(m.Granter) > 0 { - i -= len(m.Granter) - copy(dAtA[i:], m.Granter) - i = encodeVarintTx(dAtA, i, uint64(len(m.Granter))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgGrantAuthorizationResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgGrantAuthorizationResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgGrantAuthorizationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgRevokeAuthorization) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgRevokeAuthorization) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgRevokeAuthorization) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AuthorizationMsgType) > 0 { - i -= len(m.AuthorizationMsgType) - copy(dAtA[i:], m.AuthorizationMsgType) - i = encodeVarintTx(dAtA, i, uint64(len(m.AuthorizationMsgType))) - i-- - dAtA[i] = 0x1a - } - if len(m.Grantee) > 0 { - i -= len(m.Grantee) - copy(dAtA[i:], m.Grantee) - i = encodeVarintTx(dAtA, i, uint64(len(m.Grantee))) - i-- - dAtA[i] = 0x12 - } - if len(m.Granter) > 0 { - i -= len(m.Granter) - copy(dAtA[i:], m.Granter) - i = encodeVarintTx(dAtA, i, uint64(len(m.Granter))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgRevokeAuthorizationResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgRevokeAuthorizationResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgRevokeAuthorizationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgExecAuthorized) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgExecAuthorized) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgExecAuthorized) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Msgs) > 0 { - for iNdEx := len(m.Msgs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Msgs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Grantee) > 0 { - i -= len(m.Grantee) - copy(dAtA[i:], m.Grantee) - i = encodeVarintTx(dAtA, i, uint64(len(m.Grantee))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgExecAuthorizedResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgExecAuthorizedResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgExecAuthorizedResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func encodeVarintTx(dAtA []byte, offset int, v uint64) int { - offset -= sovTx(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *MsgGrantAuthorization) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Granter) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Grantee) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if m.Authorization != nil { - l = m.Authorization.Size() - n += 1 + l + sovTx(uint64(l)) - } - l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.Period) - n += 1 + l + sovTx(uint64(l)) - return n -} - -func (m *MsgGrantAuthorizationResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgRevokeAuthorization) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Granter) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Grantee) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.AuthorizationMsgType) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgRevokeAuthorizationResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgExecAuthorized) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Grantee) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if len(m.Msgs) > 0 { - for _, e := range m.Msgs { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } - } - return n -} - -func (m *MsgExecAuthorizedResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func sovTx(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTx(x uint64) (n int) { - return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *MsgGrantAuthorization) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgGrantAuthorization: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgGrantAuthorization: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Granter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Grantee = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authorization", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Authorization == nil { - m.Authorization = &types.Any{} - } - if err := m.Authorization.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.Period, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgGrantAuthorizationResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgGrantAuthorizationResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgGrantAuthorizationResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgRevokeAuthorization) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgRevokeAuthorization: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRevokeAuthorization: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Granter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Grantee = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthorizationMsgType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AuthorizationMsgType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgRevokeAuthorizationResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgRevokeAuthorizationResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRevokeAuthorizationResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgExecAuthorized) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgExecAuthorized: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgExecAuthorized: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Grantee = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Msgs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Msgs = append(m.Msgs, &types.Any{}) - if err := m.Msgs[len(m.Msgs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgExecAuthorizedResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgExecAuthorizedResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgExecAuthorizedResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTx(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTx - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTx - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTx - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/oracle/abci.go b/x/oracle/abci.go index 1ef93b1d2..70a10bf45 100644 --- a/x/oracle/abci.go +++ b/x/oracle/abci.go @@ -29,6 +29,8 @@ func EndBlocker(ctx sdk.Context, k keeper.Keeper) { iterator := k.StakingKeeper.ValidatorsPowerStoreIterator(ctx) defer iterator.Close() + powerReduction := k.StakingKeeper.PowerReduction(ctx) + i := 0 for ; iterator.Valid() && i < int(maxValidators); iterator.Next() { validator := k.StakingKeeper.Validator(ctx, iterator.Value()) @@ -36,7 +38,7 @@ func EndBlocker(ctx sdk.Context, k keeper.Keeper) { // Exclude not bonded validator if validator.IsBonded() { valAddr := validator.GetOperator() - validatorClaimMap[valAddr.String()] = types.NewClaim(validator.GetConsensusPower(), 0, 0, valAddr) + validatorClaimMap[valAddr.String()] = types.NewClaim(validator.GetConsensusPower(powerReduction), 0, 0, valAddr) i++ } } diff --git a/x/oracle/abci_test.go b/x/oracle/abci_test.go index 013c7f2f9..2d11050d2 100644 --- a/x/oracle/abci_test.go +++ b/x/oracle/abci_test.go @@ -161,7 +161,7 @@ func TestOracleTally(t *testing.T) { validatorClaimMap := make(map[string]types.Claim) for _, valAddr := range valAddrs { validatorClaimMap[valAddr.String()] = types.Claim{ - Power: stakingKeeper.Validator(input.Ctx, valAddr).GetConsensusPower(), + Power: stakingKeeper.Validator(input.Ctx, valAddr).GetConsensusPower(sdk.DefaultPowerReduction), Weight: int64(0), WinCount: int64(0), Recipient: valAddr, @@ -178,7 +178,7 @@ func TestOracleTally(t *testing.T) { expectedValidatorClaimMap := make(map[string]types.Claim) for _, valAddr := range valAddrs { expectedValidatorClaimMap[valAddr.String()] = types.Claim{ - Power: stakingKeeper.Validator(input.Ctx, valAddr).GetConsensusPower(), + Power: stakingKeeper.Validator(input.Ctx, valAddr).GetConsensusPower(sdk.DefaultPowerReduction), Weight: int64(0), WinCount: int64(0), Recipient: valAddr, @@ -237,8 +237,7 @@ func TestOracleRewardDistribution(t *testing.T) { makeAggregatePrevoteAndVote(t, input, h, 0, sdk.DecCoins{{Denom: core.MicroSDRDenom, Amount: randomExchangeRate}}, 1) rewardsAmt := sdk.NewInt(100000000) - moduleAcc := input.AccountKeeper.GetModuleAccount(input.Ctx.WithBlockHeight(1), types.ModuleName) - err := input.BankKeeper.SetBalances(input.Ctx, moduleAcc.GetAddress(), sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, rewardsAmt))) + err := input.BankKeeper.MintCoins(input.Ctx, types.ModuleName, sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, rewardsAmt))) require.NoError(t, err) oracle.EndBlocker(input.Ctx.WithBlockHeight(1), input.OracleKeeper) @@ -311,8 +310,7 @@ func TestOracleMultiRewardDistribution(t *testing.T) { makeAggregatePrevoteAndVote(t, input, h, 0, sdk.DecCoins{{Denom: core.MicroKRWDenom, Amount: randomExchangeRate}}, 2) rewardAmt := sdk.NewInt(100000000) - moduleAcc := input.AccountKeeper.GetModuleAccount(input.Ctx.WithBlockHeight(1), types.ModuleName) - err := input.BankKeeper.SetBalances(input.Ctx, moduleAcc.GetAddress(), sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, rewardAmt))) + err := input.BankKeeper.MintCoins(input.Ctx, types.ModuleName, sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, rewardAmt))) require.NoError(t, err) oracle.EndBlocker(input.Ctx.WithBlockHeight(1), input.OracleKeeper) @@ -348,8 +346,7 @@ func TestOracleExchangeRate(t *testing.T) { makeAggregatePrevoteAndVote(t, input, h, 0, sdk.DecCoins{{Denom: core.MicroKRWDenom, Amount: krwRandomExchangeRate}, {Denom: core.MicroSDRDenom, Amount: randomExchangeRate}}, 2) rewardAmt := sdk.NewInt(100000000) - moduleAcc := input.AccountKeeper.GetModuleAccount(input.Ctx.WithBlockHeight(1), types.ModuleName) - err := input.BankKeeper.SetBalances(input.Ctx, moduleAcc.GetAddress(), sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, rewardAmt))) + err := input.BankKeeper.MintCoins(input.Ctx, types.ModuleName, sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, rewardAmt))) require.NoError(t, err) oracle.EndBlocker(input.Ctx.WithBlockHeight(1), input.OracleKeeper) @@ -390,8 +387,7 @@ func TestOracleExchangeRateVal5(t *testing.T) { makeAggregatePrevoteAndVote(t, input, h, 0, sdk.DecCoins{{Denom: core.MicroKRWDenom, Amount: krwExchangeRateWithErr}, {Denom: core.MicroUSDDenom, Amount: usdExchangeRateWithErr}}, 4) rewardAmt := sdk.NewInt(100000000) - moduleAcc := input.AccountKeeper.GetModuleAccount(input.Ctx.WithBlockHeight(1), types.ModuleName) - err := input.BankKeeper.SetBalances(input.Ctx, moduleAcc.GetAddress(), sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, rewardAmt))) + err := input.BankKeeper.MintCoins(input.Ctx, types.ModuleName, sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, rewardAmt))) require.NoError(t, err) oracle.EndBlocker(input.Ctx.WithBlockHeight(1), input.OracleKeeper) diff --git a/x/oracle/common_test.go b/x/oracle/common_test.go index 9f6380038..4db37c848 100644 --- a/x/oracle/common_test.go +++ b/x/oracle/common_test.go @@ -15,7 +15,7 @@ import ( var ( uSDRAmt = sdk.NewInt(1005 * core.MicroUnit) - stakingAmt = sdk.TokensFromConsensusPower(10) + stakingAmt = sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) randomExchangeRate = sdk.NewDec(1700) anotherRandomExchangeRate = sdk.NewDecWithPrec(4882, 2) // swap rate @@ -31,7 +31,7 @@ func setupWithSmallVotingPower(t *testing.T) (keeper.TestInput, sdk.Handler) { h := oracle.NewHandler(input.OracleKeeper) sh := staking.NewHandler(input.StakingKeeper) - _, err := sh(input.Ctx, keeper.NewTestMsgCreateValidator(keeper.ValAddrs[0], keeper.ValPubKeys[0], sdk.TokensFromConsensusPower(1))) + _, err := sh(input.Ctx, keeper.NewTestMsgCreateValidator(keeper.ValAddrs[0], keeper.ValPubKeys[0], sdk.TokensFromConsensusPower(1, sdk.DefaultPowerReduction))) require.NoError(t, err) staking.EndBlocker(input.Ctx, input.StakingKeeper) diff --git a/x/oracle/keeper/ballot.go b/x/oracle/keeper/ballot.go index 14241bd58..b2c322849 100644 --- a/x/oracle/keeper/ballot.go +++ b/x/oracle/keeper/ballot.go @@ -85,7 +85,7 @@ func (k Keeper) ApplyWhitelist(ctx sdk.Context, whitelist types.DenomList, voteT k.SetTobinTax(ctx, item.Name, item.TobinTax) // Register meta data to bank module - if metadata := k.bankKeeper.GetDenomMetaData(ctx, item.Name); metadata.Base == "" { + if _, ok := k.bankKeeper.GetDenomMetaData(ctx, item.Name); !ok { base := item.Name display := base[1:] diff --git a/x/oracle/keeper/ballot_test.go b/x/oracle/keeper/ballot_test.go index 2e4dd06e1..6117cc144 100644 --- a/x/oracle/keeper/ballot_test.go +++ b/x/oracle/keeper/ballot_test.go @@ -17,7 +17,7 @@ func TestOrganizeAggregate(t *testing.T) { input := CreateTestInput(t) power := int64(100) - amt := sdk.TokensFromConsensusPower(power) + amt := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) sh := staking.NewHandler(input.StakingKeeper) ctx := input.Ctx @@ -82,7 +82,7 @@ func TestClearBallots(t *testing.T) { input := CreateTestInput(t) power := int64(100) - amt := sdk.TokensFromConsensusPower(power) + amt := sdk.TokensFromConsensusPower(power, sdk.DefaultPowerReduction) sh := staking.NewHandler(input.StakingKeeper) ctx := input.Ctx @@ -172,13 +172,15 @@ func TestApplyWhitelist(t *testing.T) { require.NoError(t, err) require.Equal(t, price, sdk.OneDec()) - metadata := input.BankKeeper.GetDenomMetaData(input.Ctx, "uusd") + metadata, ok := input.BankKeeper.GetDenomMetaData(input.Ctx, "uusd") + require.True(t, ok) require.Equal(t, metadata.Base, "uusd") require.Equal(t, metadata.Display, "usd") require.Equal(t, len(metadata.DenomUnits), 3) require.Equal(t, metadata.Description, "The native stable token of the Terra Columbus.") - metadata = input.BankKeeper.GetDenomMetaData(input.Ctx, "ukrw") + metadata, ok = input.BankKeeper.GetDenomMetaData(input.Ctx, "ukrw") + require.True(t, ok) require.Equal(t, metadata.Base, "ukrw") require.Equal(t, metadata.Display, "krw") require.Equal(t, len(metadata.DenomUnits), 3) diff --git a/x/oracle/keeper/keeper.go b/x/oracle/keeper/keeper.go index 840fe5d7d..067b27d8a 100644 --- a/x/oracle/keeper/keeper.go +++ b/x/oracle/keeper/keeper.go @@ -19,7 +19,7 @@ import ( // Keeper of the oracle store type Keeper struct { - cdc codec.BinaryMarshaler + cdc codec.BinaryCodec storeKey sdk.StoreKey paramSpace paramstypes.Subspace @@ -32,7 +32,7 @@ type Keeper struct { } // NewKeeper constructs a new keeper for oracle -func NewKeeper(cdc codec.BinaryMarshaler, storeKey sdk.StoreKey, +func NewKeeper(cdc codec.BinaryCodec, storeKey sdk.StoreKey, paramspace paramstypes.Subspace, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, distrKeeper types.DistributionKeeper, stakingKeeper types.StakingKeeper, distrName string) Keeper { @@ -80,14 +80,14 @@ func (k Keeper) GetLunaExchangeRate(ctx sdk.Context, denom string) (sdk.Dec, err } dp := sdk.DecProto{} - k.cdc.MustUnmarshalBinaryBare(b, &dp) + k.cdc.MustUnmarshal(b, &dp) return dp.Dec, nil } // SetLunaExchangeRate sets the consensus exchange rate of Luna denominated in the denom asset to the store. func (k Keeper) SetLunaExchangeRate(ctx sdk.Context, denom string, exchangeRate sdk.Dec) { store := ctx.KVStore(k.storeKey) - bz := k.cdc.MustMarshalBinaryBare(&sdk.DecProto{Dec: exchangeRate}) + bz := k.cdc.MustMarshal(&sdk.DecProto{Dec: exchangeRate}) store.Set(types.GetExchangeRateKey(denom), bz) } @@ -117,7 +117,7 @@ func (k Keeper) IterateLunaExchangeRates(ctx sdk.Context, handler func(denom str for ; iter.Valid(); iter.Next() { denom := string(iter.Key()[len(types.ExchangeRateKey):]) dp := sdk.DecProto{} - k.cdc.MustUnmarshalBinaryBare(iter.Value(), &dp) + k.cdc.MustUnmarshal(iter.Value(), &dp) if handler(denom, dp.Dec) { break } @@ -175,14 +175,14 @@ func (k Keeper) GetMissCounter(ctx sdk.Context, operator sdk.ValAddress) uint64 } var missCounter gogotypes.UInt64Value - k.cdc.MustUnmarshalBinaryBare(bz, &missCounter) + k.cdc.MustUnmarshal(bz, &missCounter) return missCounter.Value } // SetMissCounter updates the # of vote periods missed in this oracle slash window func (k Keeper) SetMissCounter(ctx sdk.Context, operator sdk.ValAddress, missCounter uint64) { store := ctx.KVStore(k.storeKey) - bz := k.cdc.MustMarshalBinaryBare(&gogotypes.UInt64Value{Value: missCounter}) + bz := k.cdc.MustMarshal(&gogotypes.UInt64Value{Value: missCounter}) store.Set(types.GetMissCounterKey(operator), bz) } @@ -203,7 +203,7 @@ func (k Keeper) IterateMissCounters(ctx sdk.Context, operator := sdk.ValAddress(iter.Key()[len(types.MissCounterKey):]) var missCounter gogotypes.UInt64Value - k.cdc.MustUnmarshalBinaryBare(iter.Value(), &missCounter) + k.cdc.MustUnmarshal(iter.Value(), &missCounter) if handler(operator, missCounter.Value) { break @@ -222,14 +222,14 @@ func (k Keeper) GetAggregateExchangeRatePrevote(ctx sdk.Context, voter sdk.ValAd err = sdkerrors.Wrap(types.ErrNoAggregatePrevote, voter.String()) return } - k.cdc.MustUnmarshalBinaryBare(b, &aggregatePrevote) + k.cdc.MustUnmarshal(b, &aggregatePrevote) return } // SetAggregateExchangeRatePrevote set an oracle aggregate prevote to the store func (k Keeper) SetAggregateExchangeRatePrevote(ctx sdk.Context, voter sdk.ValAddress, prevote types.AggregateExchangeRatePrevote) { store := ctx.KVStore(k.storeKey) - bz := k.cdc.MustMarshalBinaryBare(&prevote) + bz := k.cdc.MustMarshal(&prevote) store.Set(types.GetAggregateExchangeRatePrevoteKey(voter), bz) } @@ -249,7 +249,7 @@ func (k Keeper) IterateAggregateExchangeRatePrevotes(ctx sdk.Context, handler fu voterAddr := sdk.ValAddress(iter.Key()[1:]) var aggregatePrevote types.AggregateExchangeRatePrevote - k.cdc.MustUnmarshalBinaryBare(iter.Value(), &aggregatePrevote) + k.cdc.MustUnmarshal(iter.Value(), &aggregatePrevote) if handler(voterAddr, aggregatePrevote) { break } @@ -267,14 +267,14 @@ func (k Keeper) GetAggregateExchangeRateVote(ctx sdk.Context, voter sdk.ValAddre err = sdkerrors.Wrap(types.ErrNoAggregateVote, voter.String()) return } - k.cdc.MustUnmarshalBinaryBare(b, &aggregateVote) + k.cdc.MustUnmarshal(b, &aggregateVote) return } // SetAggregateExchangeRateVote adds an oracle aggregate prevote to the store func (k Keeper) SetAggregateExchangeRateVote(ctx sdk.Context, voter sdk.ValAddress, vote types.AggregateExchangeRateVote) { store := ctx.KVStore(k.storeKey) - bz := k.cdc.MustMarshalBinaryBare(&vote) + bz := k.cdc.MustMarshal(&vote) store.Set(types.GetAggregateExchangeRateVoteKey(voter), bz) } @@ -293,7 +293,7 @@ func (k Keeper) IterateAggregateExchangeRateVotes(ctx sdk.Context, handler func( voterAddr := sdk.ValAddress(iter.Key()[1:]) var aggregateVote types.AggregateExchangeRateVote - k.cdc.MustUnmarshalBinaryBare(iter.Value(), &aggregateVote) + k.cdc.MustUnmarshal(iter.Value(), &aggregateVote) if handler(voterAddr, aggregateVote) { break } @@ -310,7 +310,7 @@ func (k Keeper) GetTobinTax(ctx sdk.Context, denom string) (sdk.Dec, error) { } tobinTax := sdk.DecProto{} - k.cdc.MustUnmarshalBinaryBare(bz, &tobinTax) + k.cdc.MustUnmarshal(bz, &tobinTax) return tobinTax.Dec, nil } @@ -318,7 +318,7 @@ func (k Keeper) GetTobinTax(ctx sdk.Context, denom string) (sdk.Dec, error) { // SetTobinTax updates tobin tax for the denom func (k Keeper) SetTobinTax(ctx sdk.Context, denom string, tobinTax sdk.Dec) { store := ctx.KVStore(k.storeKey) - bz := k.cdc.MustMarshalBinaryBare(&sdk.DecProto{Dec: tobinTax}) + bz := k.cdc.MustMarshal(&sdk.DecProto{Dec: tobinTax}) store.Set(types.GetTobinTaxKey(denom), bz) } @@ -331,7 +331,7 @@ func (k Keeper) IterateTobinTaxes(ctx sdk.Context, handler func(denom string, to denom := types.ExtractDenomFromTobinTaxKey(iter.Key()) var tobinTax sdk.DecProto - k.cdc.MustUnmarshalBinaryBare(iter.Value(), &tobinTax) + k.cdc.MustUnmarshal(iter.Value(), &tobinTax) if handler(denom, tobinTax.Dec) { break } diff --git a/x/oracle/keeper/keeper_test.go b/x/oracle/keeper/keeper_test.go index 2bf2399de..03c29023b 100644 --- a/x/oracle/keeper/keeper_test.go +++ b/x/oracle/keeper/keeper_test.go @@ -89,7 +89,7 @@ func TestRewardPool(t *testing.T) { fees := sdk.NewCoins(sdk.NewCoin(core.MicroSDRDenom, sdk.NewInt(1000))) acc := input.AccountKeeper.GetModuleAccount(input.Ctx, types.ModuleName) - err := input.BankKeeper.SetBalances(input.Ctx, acc.GetAddress(), fees) + err := FundAccount(input, acc.GetAddress(), fees) if err != nil { panic(err) // never occurs } diff --git a/x/oracle/keeper/params.go b/x/oracle/keeper/params.go index 8d72093f4..4babe8d7a 100644 --- a/x/oracle/keeper/params.go +++ b/x/oracle/keeper/params.go @@ -36,6 +36,13 @@ func (k Keeper) Whitelist(ctx sdk.Context) (res types.DenomList) { return } +// SetWhitelist store new whitelist to param store +// this function is only for test purpose +func (k Keeper) SetWhitelist(ctx sdk.Context, whitelist types.DenomList) { + k.paramSpace.Set(ctx, types.KeyWhitelist, whitelist) + return +} + // SlashFraction returns oracle voting penalty rate func (k Keeper) SlashFraction(ctx sdk.Context) (res sdk.Dec) { k.paramSpace.Get(ctx, types.KeySlashFraction, &res) diff --git a/x/oracle/keeper/reward_test.go b/x/oracle/keeper/reward_test.go index d0bb1e045..8b27e0c72 100644 --- a/x/oracle/keeper/reward_test.go +++ b/x/oracle/keeper/reward_test.go @@ -18,7 +18,7 @@ func TestRewardBallotWinners(t *testing.T) { input := CreateTestInput(t) addr, val := ValAddrs[0], ValPubKeys[0] addr1, val1 := ValAddrs[1], ValPubKeys[1] - amt := sdk.TokensFromConsensusPower(100) + amt := sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) sh := staking.NewHandler(input.StakingKeeper) ctx := input.Ctx @@ -51,7 +51,7 @@ func TestRewardBallotWinners(t *testing.T) { // Prepare reward pool givingAmt := sdk.NewCoins(sdk.NewInt64Coin(core.MicroLunaDenom, 30000000)) acc := input.AccountKeeper.GetModuleAccount(ctx, types.ModuleName) - input.BankKeeper.SetBalances(ctx, acc.GetAddress(), givingAmt) + err = FundAccount(input, acc.GetAddress(), givingAmt) require.NoError(t, err) votePeriodsPerWindow := sdk.NewDec((int64)(input.OracleKeeper.RewardDistributionWindow(input.Ctx))). diff --git a/x/oracle/keeper/slash.go b/x/oracle/keeper/slash.go index 95b22c450..7ff89712c 100644 --- a/x/oracle/keeper/slash.go +++ b/x/oracle/keeper/slash.go @@ -17,6 +17,8 @@ func (k Keeper) SlashAndResetMissCounters(ctx sdk.Context) { ) minValidPerWindow := k.MinValidPerWindow(ctx) slashFraction := k.SlashFraction(ctx) + powerReduction := k.StakingKeeper.PowerReduction(ctx) + k.IterateMissCounters(ctx, func(operator sdk.ValAddress, missCounter uint64) bool { // Calculate valid vote rate; (SlashWindow - MissCounter)/SlashWindow @@ -35,7 +37,7 @@ func (k Keeper) SlashAndResetMissCounters(ctx sdk.Context) { k.StakingKeeper.Slash( ctx, consAddr, - distributionHeight, validator.GetConsensusPower(), slashFraction, + distributionHeight, validator.GetConsensusPower(powerReduction), slashFraction, ) k.StakingKeeper.Jail(ctx, consAddr) } diff --git a/x/oracle/keeper/slash_test.go b/x/oracle/keeper/slash_test.go index a27b1d3d5..6bc8f640d 100644 --- a/x/oracle/keeper/slash_test.go +++ b/x/oracle/keeper/slash_test.go @@ -15,7 +15,7 @@ func TestSlashAndResetMissCounters(t *testing.T) { input := CreateTestInput(t) addr, val := ValAddrs[0], ValPubKeys[0] addr1, val1 := ValAddrs[1], ValPubKeys[1] - amt := sdk.TokensFromConsensusPower(100) + amt := sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) sh := staking.NewHandler(input.StakingKeeper) ctx := input.Ctx diff --git a/x/oracle/keeper/test_utils.go b/x/oracle/keeper/test_utils.go index 8a580aae5..637bc3e29 100644 --- a/x/oracle/keeper/test_utils.go +++ b/x/oracle/keeper/test_utils.go @@ -43,6 +43,8 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) +const faucetAccountName = "faucet" + // ModuleBasics nolint var ModuleBasics = module.NewBasicManager( customauth.AppModuleBasic{}, @@ -53,7 +55,7 @@ var ModuleBasics = module.NewBasicManager( ) // MakeTestCodec nolint -func MakeTestCodec(t *testing.T) codec.Marshaler { +func MakeTestCodec(t *testing.T) codec.Codec { return MakeEncodingConfig(t).Marshaler } @@ -107,7 +109,7 @@ var ( sdk.ValAddress(pubKeys[4].Address()), } - InitTokens = sdk.TokensFromConsensusPower(200) + InitTokens = sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction) InitCoins = sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, InitTokens)) OracleDecPrecision = 8 @@ -117,8 +119,8 @@ var ( type TestInput struct { Ctx sdk.Context Cdc *codec.LegacyAmino - AccountKeeper types.AccountKeeper - BankKeeper types.BankKeeper + AccountKeeper authkeeper.AccountKeeper + BankKeeper bankkeeper.Keeper OracleKeeper Keeper StakingKeeper stakingkeeper.Keeper DistrKeeper distrkeeper.Keeper @@ -155,10 +157,11 @@ func CreateTestInput(t *testing.T) TestInput { stakingtypes.NotBondedPoolName: true, stakingtypes.BondedPoolName: true, distrtypes.ModuleName: true, - types.ModuleName: true, + faucetAccountName: true, } maccPerms := map[string][]string{ + faucetAccountName: {authtypes.Minter}, authtypes.FeeCollectorName: nil, stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking}, stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking}, @@ -170,8 +173,8 @@ func CreateTestInput(t *testing.T) TestInput { accountKeeper := authkeeper.NewAccountKeeper(appCodec, keyAcc, paramsKeeper.Subspace(authtypes.ModuleName), authtypes.ProtoBaseAccount, maccPerms) bankKeeper := bankkeeper.NewBaseKeeper(appCodec, keyBank, accountKeeper, paramsKeeper.Subspace(banktypes.ModuleName), blackListAddrs) - totalSupply := sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, InitTokens.MulRaw(int64(len(Addrs))))) - bankKeeper.SetSupply(ctx, banktypes.NewSupply(totalSupply)) + totalSupply := sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, InitTokens.MulRaw(int64(len(Addrs)*10)))) + bankKeeper.MintCoins(ctx, faucetAccountName, totalSupply) stakingKeeper := stakingkeeper.NewKeeper( appCodec, @@ -205,7 +208,7 @@ func CreateTestInput(t *testing.T) TestInput { distrAcc := authtypes.NewEmptyModuleAccount(distrtypes.ModuleName) oracleAcc := authtypes.NewEmptyModuleAccount(types.ModuleName, authtypes.Minter) - bankKeeper.SetBalances(ctx, notBondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, InitTokens.MulRaw(int64(len(Addrs)))))) + bankKeeper.SendCoinsFromModuleToModule(ctx, faucetAccountName, stakingtypes.NotBondedPoolName, sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, InitTokens.MulRaw(int64(len(Addrs)))))) accountKeeper.SetModuleAccount(ctx, feeCollectorAcc) accountKeeper.SetModuleAccount(ctx, bondPool) @@ -215,7 +218,7 @@ func CreateTestInput(t *testing.T) TestInput { for _, addr := range Addrs { accountKeeper.SetAccount(ctx, authtypes.NewBaseAccountWithAddress(addr)) - err := bankKeeper.AddCoins(ctx, addr, InitCoins) + err := bankKeeper.SendCoinsFromModuleToAccount(ctx, faucetAccountName, addr, InitCoins) require.NoError(t, err) } @@ -250,3 +253,14 @@ func NewTestMsgCreateValidator(address sdk.ValAddress, pubKey cryptotypes.PubKey return msg } + +// FundAccount is a utility function that funds an account by minting and +// sending the coins to the address. This should be used for testing purposes +// only! +func FundAccount(input TestInput, addr sdk.AccAddress, amounts sdk.Coins) error { + if err := input.BankKeeper.MintCoins(input.Ctx, faucetAccountName, amounts); err != nil { + return err + } + + return input.BankKeeper.SendCoinsFromModuleToAccount(input.Ctx, faucetAccountName, addr, amounts) +} diff --git a/x/oracle/legacy/v05/migrate_test.go b/x/oracle/legacy/v05/migrate_test.go index 2844fc9ba..e5892e650 100644 --- a/x/oracle/legacy/v05/migrate_test.go +++ b/x/oracle/legacy/v05/migrate_test.go @@ -24,7 +24,7 @@ func TestMigrate(t *testing.T) { WithInterfaceRegistry(encodingConfig.InterfaceRegistry). WithTxConfig(encodingConfig.TxConfig). WithLegacyAmino(encodingConfig.Amino). - WithJSONMarshaler(encodingConfig.Marshaler) + WithJSONCodec(encodingConfig.Marshaler) voter, err := sdk.ValAddressFromBech32("terravaloper1mx72uukvzqtzhc6gde7shrjqfu5srk22v3yx7a") require.NoError(t, err) @@ -121,7 +121,7 @@ func TestMigrate(t *testing.T) { migrated := v05oracle.Migrate(oracleGenState) - bz, err := clientCtx.JSONMarshaler.MarshalJSON(migrated) + bz, err := clientCtx.JSONCodec.MarshalJSON(migrated) require.NoError(t, err) // Indent the JSON bz correctly. diff --git a/x/oracle/module.go b/x/oracle/module.go index ceba15882..888635c84 100644 --- a/x/oracle/module.go +++ b/x/oracle/module.go @@ -35,7 +35,7 @@ var ( // AppModuleBasic defines the basic application module used by the oracle module. type AppModuleBasic struct { - cdc codec.Marshaler + cdc codec.Codec } // Name returns the module's name @@ -55,12 +55,12 @@ func (b AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry // DefaultGenesis returns default genesis state as raw bytes for the staking // module. -func (AppModuleBasic) DefaultGenesis(cdc codec.JSONMarshaler) json.RawMessage { +func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { return cdc.MustMarshalJSON(types.DefaultGenesisState()) } // ValidateGenesis performs genesis state validation for the oracle module. -func (AppModuleBasic) ValidateGenesis(cdc codec.JSONMarshaler, config client.TxEncodingConfig, bz json.RawMessage) error { +func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { var data types.GenesisState if err := cdc.UnmarshalJSON(bz, &data); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) @@ -101,7 +101,7 @@ type AppModule struct { // NewAppModule creates a new AppModule object func NewAppModule( - cdc codec.Marshaler, + cdc codec.Codec, keeper keeper.Keeper, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper) AppModule { @@ -141,7 +141,7 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { // InitGenesis performs genesis initialization for the oracle module. It returns // no validator updates. -func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONMarshaler, data json.RawMessage) []abci.ValidatorUpdate { +func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { var genesisState types.GenesisState cdc.MustUnmarshalJSON(data, &genesisState) InitGenesis(ctx, am.keeper, &genesisState) @@ -151,11 +151,14 @@ func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONMarshaler, data j // ExportGenesis returns the exported genesis state as raw bytes for the oracle // module. -func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONMarshaler) json.RawMessage { +func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { gs := ExportGenesis(ctx, am.keeper) return cdc.MustMarshalJSON(gs) } +// ConsensusVersion implements AppModule/ConsensusVersion. +func (AppModule) ConsensusVersion() uint64 { return 2 } + // BeginBlock returns the begin blocker for the oracle module. func (AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {} diff --git a/x/oracle/simulation/decoder.go b/x/oracle/simulation/decoder.go index f8be1573e..4c3623b47 100644 --- a/x/oracle/simulation/decoder.go +++ b/x/oracle/simulation/decoder.go @@ -15,35 +15,35 @@ import ( // NewDecodeStore returns a decoder function closure that unmarshals the KVPair's // Value to the corresponding oracle type. -func NewDecodeStore(cdc codec.Marshaler) func(kvA, kvB kv.Pair) string { +func NewDecodeStore(cdc codec.Codec) func(kvA, kvB kv.Pair) string { return func(kvA, kvB kv.Pair) string { switch { case bytes.Equal(kvA.Key[:1], types.ExchangeRateKey): var exchangeRateA, exchangeRateB sdk.DecProto - cdc.MustUnmarshalBinaryBare(kvA.Value, &exchangeRateA) - cdc.MustUnmarshalBinaryBare(kvB.Value, &exchangeRateB) + cdc.MustUnmarshal(kvA.Value, &exchangeRateA) + cdc.MustUnmarshal(kvB.Value, &exchangeRateB) return fmt.Sprintf("%v\n%v", exchangeRateA, exchangeRateB) case bytes.Equal(kvA.Key[:1], types.FeederDelegationKey): return fmt.Sprintf("%v\n%v", sdk.AccAddress(kvA.Value), sdk.AccAddress(kvB.Value)) case bytes.Equal(kvA.Key[:1], types.MissCounterKey): var counterA, counterB gogotypes.UInt64Value - cdc.MustUnmarshalBinaryBare(kvA.Value, &counterA) - cdc.MustUnmarshalBinaryBare(kvB.Value, &counterB) + cdc.MustUnmarshal(kvA.Value, &counterA) + cdc.MustUnmarshal(kvB.Value, &counterB) return fmt.Sprintf("%v\n%v", counterA.Value, counterB.Value) case bytes.Equal(kvA.Key[:1], types.AggregateExchangeRatePrevoteKey): var prevoteA, prevoteB types.AggregateExchangeRatePrevote - cdc.MustUnmarshalBinaryBare(kvA.Value, &prevoteA) - cdc.MustUnmarshalBinaryBare(kvB.Value, &prevoteB) + cdc.MustUnmarshal(kvA.Value, &prevoteA) + cdc.MustUnmarshal(kvB.Value, &prevoteB) return fmt.Sprintf("%v\n%v", prevoteA, prevoteB) case bytes.Equal(kvA.Key[:1], types.AggregateExchangeRateVoteKey): var voteA, voteB types.AggregateExchangeRateVote - cdc.MustUnmarshalBinaryBare(kvA.Value, &voteA) - cdc.MustUnmarshalBinaryBare(kvB.Value, &voteB) + cdc.MustUnmarshal(kvA.Value, &voteA) + cdc.MustUnmarshal(kvB.Value, &voteB) return fmt.Sprintf("%v\n%v", voteA, voteB) case bytes.Equal(kvA.Key[:1], types.TobinTaxKey): var tobinTaxA, tobinTaxB sdk.DecProto - cdc.MustUnmarshalBinaryBare(kvA.Value, &tobinTaxA) - cdc.MustUnmarshalBinaryBare(kvB.Value, &tobinTaxB) + cdc.MustUnmarshal(kvA.Value, &tobinTaxA) + cdc.MustUnmarshal(kvB.Value, &tobinTaxB) return fmt.Sprintf("%v\n%v", tobinTaxA, tobinTaxB) default: panic(fmt.Sprintf("invalid oracle key prefix %X", kvA.Key[:1])) diff --git a/x/oracle/simulation/decoder_test.go b/x/oracle/simulation/decoder_test.go index 431f48d2d..a0cc56015 100644 --- a/x/oracle/simulation/decoder_test.go +++ b/x/oracle/simulation/decoder_test.go @@ -41,12 +41,12 @@ func TestDecodeDistributionStore(t *testing.T) { kvPairs := kv.Pairs{ Pairs: []kv.Pair{ - {Key: types.ExchangeRateKey, Value: cdc.MustMarshalBinaryBare(&sdk.DecProto{Dec: exchangeRate})}, + {Key: types.ExchangeRateKey, Value: cdc.MustMarshal(&sdk.DecProto{Dec: exchangeRate})}, {Key: types.FeederDelegationKey, Value: feederAddr.Bytes()}, - {Key: types.MissCounterKey, Value: cdc.MustMarshalBinaryBare(&gogotypes.UInt64Value{Value: missCounter})}, - {Key: types.AggregateExchangeRatePrevoteKey, Value: cdc.MustMarshalBinaryBare(&aggregatePrevote)}, - {Key: types.AggregateExchangeRateVoteKey, Value: cdc.MustMarshalBinaryBare(&aggregateVote)}, - {Key: types.TobinTaxKey, Value: cdc.MustMarshalBinaryBare(&sdk.DecProto{Dec: tobinTax})}, + {Key: types.MissCounterKey, Value: cdc.MustMarshal(&gogotypes.UInt64Value{Value: missCounter})}, + {Key: types.AggregateExchangeRatePrevoteKey, Value: cdc.MustMarshal(&aggregatePrevote)}, + {Key: types.AggregateExchangeRateVoteKey, Value: cdc.MustMarshal(&aggregateVote)}, + {Key: types.TobinTaxKey, Value: cdc.MustMarshal(&sdk.DecProto{Dec: tobinTax})}, {Key: []byte{0x99}, Value: []byte{0x99}}, }, } diff --git a/x/oracle/simulation/operations.go b/x/oracle/simulation/operations.go index fe6a8a7b3..200aae606 100644 --- a/x/oracle/simulation/operations.go +++ b/x/oracle/simulation/operations.go @@ -36,7 +36,7 @@ var ( // WeightedOperations returns all the operations from the module with their respective weights func WeightedOperations( appParams simtypes.AppParams, - cdc codec.JSONMarshaler, + cdc codec.JSONCodec, ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simulation.WeightedOperations { @@ -139,7 +139,7 @@ func SimulateMsgAggregateExchangeRatePrevote(ak types.AccountKeeper, bk types.Ba voteHashMap[address.String()] = exchangeRatesStr - return simtypes.NewOperationMsg(msg, true, ""), nil, nil + return simtypes.NewOperationMsg(msg, true, "", nil), nil, nil } } @@ -209,7 +209,7 @@ func SimulateMsgAggregateExchangeRateVote(ak types.AccountKeeper, bk types.BankK return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "unable to deliver tx"), nil, err } - return simtypes.NewOperationMsg(msg, true, ""), nil, nil + return simtypes.NewOperationMsg(msg, true, "", nil), nil, nil } } @@ -267,6 +267,6 @@ func SimulateMsgDelegateFeedConsent(ak types.AccountKeeper, bk types.BankKeeper, return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "unable to deliver tx"), nil, err } - return simtypes.NewOperationMsg(msg, true, ""), nil, nil + return simtypes.NewOperationMsg(msg, true, "", nil), nil, nil } } diff --git a/x/oracle/tally.go b/x/oracle/tally.go index 792d3af85..878894843 100644 --- a/x/oracle/tally.go +++ b/x/oracle/tally.go @@ -43,7 +43,7 @@ func Tally(ctx sdk.Context, pb types.ExchangeRateBallot, rewardBand sdk.Dec, val // ballot for the asset is passing the threshold amount of voting power func ballotIsPassing(ctx sdk.Context, ballot types.ExchangeRateBallot, k keeper.Keeper) (sdk.Int, bool) { - totalBondedPower := sdk.TokensToConsensusPower(k.StakingKeeper.TotalBondedTokens(ctx)) + totalBondedPower := sdk.TokensToConsensusPower(k.StakingKeeper.TotalBondedTokens(ctx), k.StakingKeeper.PowerReduction(ctx)) voteThreshold := k.VoteThreshold(ctx) thresholdVotes := voteThreshold.MulInt64(totalBondedPower).RoundInt() ballotPower := sdk.NewInt(ballot.Power()) diff --git a/x/oracle/types/ballot_test.go b/x/oracle/types/ballot_test.go index 811ca8d76..28fd4f864 100644 --- a/x/oracle/types/ballot_test.go +++ b/x/oracle/types/ballot_test.go @@ -127,7 +127,7 @@ func TestPBPower(t *testing.T) { ballotPower := int64(0) for i := 0; i < len(sk.Validators()); i++ { - power := sk.Validator(ctx, valAccAddrs[i]).GetConsensusPower() + power := sk.Validator(ctx, valAccAddrs[i]).GetConsensusPower(sdk.DefaultPowerReduction) vote := NewVoteForTally( sdk.ZeroDec(), core.MicroSDRDenom, diff --git a/x/oracle/types/expected_keeper.go b/x/oracle/types/expected_keeper.go index 5410af296..feed39e42 100644 --- a/x/oracle/types/expected_keeper.go +++ b/x/oracle/types/expected_keeper.go @@ -3,7 +3,6 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - bankexported "github.com/cosmos/cosmos-sdk/x/bank/exported" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) @@ -16,6 +15,7 @@ type StakingKeeper interface { Jail(sdk.Context, sdk.ConsAddress) // jail a validator ValidatorsPowerStoreIterator(ctx sdk.Context) sdk.Iterator // an iterator for the current validator power store MaxValidators(sdk.Context) uint32 // MaxValidators returns the maximum amount of bonded validators + PowerReduction(ctx sdk.Context) (res sdk.Int) } // DistributionKeeper is expected keeper for distribution module @@ -37,12 +37,10 @@ type AccountKeeper interface { type BankKeeper interface { GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins - GetSupply(ctx sdk.Context) bankexported.SupplyI SendCoinsFromModuleToModule(ctx sdk.Context, senderModule string, recipientModule string, amt sdk.Coins) error - GetDenomMetaData(ctx sdk.Context, denom string) banktypes.Metadata + GetDenomMetaData(ctx sdk.Context, denom string) (banktypes.Metadata, bool) SetDenomMetaData(ctx sdk.Context, denomMetaData banktypes.Metadata) // only used for simulation SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins - SetBalances(ctx sdk.Context, addr sdk.AccAddress, balances sdk.Coins) error } diff --git a/x/oracle/types/genesis.go b/x/oracle/types/genesis.go index e2414e998..4eb6493f7 100644 --- a/x/oracle/types/genesis.go +++ b/x/oracle/types/genesis.go @@ -46,7 +46,7 @@ func ValidateGenesis(data *GenesisState) error { // GetGenesisStateFromAppState returns x/oracle GenesisState given raw application // genesis state. -func GetGenesisStateFromAppState(cdc codec.JSONMarshaler, appState map[string]json.RawMessage) *GenesisState { +func GetGenesisStateFromAppState(cdc codec.JSONCodec, appState map[string]json.RawMessage) *GenesisState { var genesisState GenesisState if appState[ModuleName] != nil { diff --git a/x/oracle/types/keys.go b/x/oracle/types/keys.go index 6929d584d..f64ff784a 100644 --- a/x/oracle/types/keys.go +++ b/x/oracle/types/keys.go @@ -2,6 +2,7 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/address" ) const ( @@ -49,22 +50,22 @@ func GetExchangeRateKey(denom string) []byte { // GetFeederDelegationKey - stored by *Validator* address func GetFeederDelegationKey(v sdk.ValAddress) []byte { - return append(FeederDelegationKey, v.Bytes()...) + return append(FeederDelegationKey, address.MustLengthPrefix(v)...) } // GetMissCounterKey - stored by *Validator* address func GetMissCounterKey(v sdk.ValAddress) []byte { - return append(MissCounterKey, v.Bytes()...) + return append(MissCounterKey, address.MustLengthPrefix(v)...) } // GetAggregateExchangeRatePrevoteKey - stored by *Validator* address func GetAggregateExchangeRatePrevoteKey(v sdk.ValAddress) []byte { - return append(AggregateExchangeRatePrevoteKey, v.Bytes()...) + return append(AggregateExchangeRatePrevoteKey, address.MustLengthPrefix(v)...) } // GetAggregateExchangeRateVoteKey - stored by *Validator* address func GetAggregateExchangeRateVoteKey(v sdk.ValAddress) []byte { - return append(AggregateExchangeRateVoteKey, v.Bytes()...) + return append(AggregateExchangeRateVoteKey, address.MustLengthPrefix(v)...) } // GetTobinTaxKey - stored by *denom* bytes diff --git a/x/oracle/types/test_utils.go b/x/oracle/types/test_utils.go index 87f60a124..b5692bf13 100644 --- a/x/oracle/types/test_utils.go +++ b/x/oracle/types/test_utils.go @@ -93,7 +93,7 @@ func (DummyStakingKeeper) Jail(sdk.Context, sdk.ConsAddress) { // GetLastValidatorPower nolint func (sk DummyStakingKeeper) GetLastValidatorPower(ctx sdk.Context, operator sdk.ValAddress) (power int64) { - return sk.Validator(ctx, operator).GetConsensusPower() + return sk.Validator(ctx, operator).GetConsensusPower(sdk.DefaultPowerReduction) } // MaxValidators returns the maximum amount of bonded validators @@ -101,6 +101,12 @@ func (DummyStakingKeeper) MaxValidators(sdk.Context) uint32 { return 100 } +// PowerReduction - is the amount of staking tokens required for 1 unit of consensus-engine power +func (DummyStakingKeeper) PowerReduction(ctx sdk.Context) (res sdk.Int) { + res = sdk.DefaultPowerReduction + return +} + // MockValidator nolint type MockValidator struct { power int64 @@ -120,18 +126,22 @@ func (MockValidator) ConsPubKey() (cryptotypes.PubKey, error) { return nil, nil func (MockValidator) TmConsPublicKey() (tmprotocrypto.PublicKey, error) { return tmprotocrypto.PublicKey{}, nil } -func (MockValidator) GetConsAddr() (sdk.ConsAddress, error) { return nil, nil } -func (v MockValidator) GetTokens() sdk.Int { return sdk.TokensFromConsensusPower(v.power) } -func (v MockValidator) GetBondedTokens() sdk.Int { return sdk.TokensFromConsensusPower(v.power) } -func (v MockValidator) GetConsensusPower() int64 { return v.power } -func (v *MockValidator) SetConsensusPower(power int64) { v.power = power } -func (v MockValidator) GetCommission() sdk.Dec { return sdk.ZeroDec() } -func (v MockValidator) GetMinSelfDelegation() sdk.Int { return sdk.OneInt() } -func (v MockValidator) GetDelegatorShares() sdk.Dec { return sdk.NewDec(v.power) } -func (v MockValidator) TokensFromShares(sdk.Dec) sdk.Dec { return sdk.ZeroDec() } -func (v MockValidator) TokensFromSharesTruncated(sdk.Dec) sdk.Dec { return sdk.ZeroDec() } -func (v MockValidator) TokensFromSharesRoundUp(sdk.Dec) sdk.Dec { return sdk.ZeroDec() } -func (v MockValidator) SharesFromTokens(amt sdk.Int) (sdk.Dec, error) { return sdk.ZeroDec(), nil } +func (MockValidator) GetConsAddr() (sdk.ConsAddress, error) { return nil, nil } +func (v MockValidator) GetTokens() sdk.Int { + return sdk.TokensFromConsensusPower(v.power, sdk.DefaultPowerReduction) +} +func (v MockValidator) GetBondedTokens() sdk.Int { + return sdk.TokensFromConsensusPower(v.power, sdk.DefaultPowerReduction) +} +func (v MockValidator) GetConsensusPower(powerReduction sdk.Int) int64 { return v.power } +func (v *MockValidator) SetConsensusPower(power int64) { v.power = power } +func (v MockValidator) GetCommission() sdk.Dec { return sdk.ZeroDec() } +func (v MockValidator) GetMinSelfDelegation() sdk.Int { return sdk.OneInt() } +func (v MockValidator) GetDelegatorShares() sdk.Dec { return sdk.NewDec(v.power) } +func (v MockValidator) TokensFromShares(sdk.Dec) sdk.Dec { return sdk.ZeroDec() } +func (v MockValidator) TokensFromSharesTruncated(sdk.Dec) sdk.Dec { return sdk.ZeroDec() } +func (v MockValidator) TokensFromSharesRoundUp(sdk.Dec) sdk.Dec { return sdk.ZeroDec() } +func (v MockValidator) SharesFromTokens(amt sdk.Int) (sdk.Dec, error) { return sdk.ZeroDec(), nil } func (v MockValidator) SharesFromTokensTruncated(amt sdk.Int) (sdk.Dec, error) { return sdk.ZeroDec(), nil } diff --git a/x/treasury/abci_test.go b/x/treasury/abci_test.go index 25e6ba8af..e5e6e92be 100644 --- a/x/treasury/abci_test.go +++ b/x/treasury/abci_test.go @@ -5,9 +5,6 @@ import ( "github.com/stretchr/testify/require" - sdk "github.com/cosmos/cosmos-sdk/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - core "github.com/terra-project/core/types" "github.com/terra-project/core/x/treasury/keeper" "github.com/terra-project/core/x/treasury/types" @@ -23,21 +20,19 @@ func TestBurnAddress(t *testing.T) { require.True(t, input.BankKeeper.GetAllBalances(input.Ctx, burnAddress).IsZero()) } -func TestEndBlockerIssuanceUpdate(t *testing.T) { +func TestEndBlockerIssuanceUpdateWithBurnModule(t *testing.T) { input := keeper.CreateTestInput(t) - // Set total staked luna to prevent divide by zero error when computing TRL - bondedModuleAddr := input.AccountKeeper.GetModuleAddress(stakingtypes.BondedPoolName) - err := input.BankKeeper.SetBalances(input.Ctx, bondedModuleAddr, sdk.NewCoins(sdk.NewInt64Coin(core.MicroLunaDenom, 100000000000))) - require.NoError(t, err) - - supply := input.BankKeeper.GetSupply(input.Ctx) + supply := input.BankKeeper.GetSupply(input.Ctx, core.MicroLunaDenom) input.Ctx = input.Ctx.WithBlockHeight(int64(core.BlocksPerWeek) - 1) EndBlocker(input.Ctx, input.TreasuryKeeper) issuance := input.TreasuryKeeper.GetEpochInitialIssuance(input.Ctx) - require.Equal(t, supply.GetTotal().Sub(keeper.InitCoins), issuance) + require.Equal(t, + // subtract due to burn module account burning + supply.Amount.Sub(keeper.InitCoins.AmountOf(core.MicroLunaDenom)), + issuance.AmountOf(core.MicroLunaDenom)) } func TestUpdate(t *testing.T) { @@ -45,11 +40,6 @@ func TestUpdate(t *testing.T) { windowProbation := input.TreasuryKeeper.WindowProbation(input.Ctx) - // Set total staked luna to prevent divide by zero error when computing TRL - bondedModuleAddr := input.AccountKeeper.GetModuleAddress(stakingtypes.BondedPoolName) - err := input.BankKeeper.SetBalances(input.Ctx, bondedModuleAddr, sdk.NewCoins(sdk.NewInt64Coin(core.MicroLunaDenom, 100000000000))) - require.NoError(t, err) - targetEpoch := int64(windowProbation + 1) for epoch := int64(0); epoch < targetEpoch; epoch++ { input.Ctx = input.Ctx.WithBlockHeight(int64(core.BlocksPerWeek)*epoch - 1) @@ -77,11 +67,6 @@ func TestEmptyIndicator(t *testing.T) { windowProbation := input.TreasuryKeeper.WindowProbation(input.Ctx) - // Set total staked luna to prevent divide by zero error when computing TRL - bondedModuleAddr := input.AccountKeeper.GetModuleAddress(stakingtypes.BondedPoolName) - err := input.BankKeeper.SetBalances(input.Ctx, bondedModuleAddr, sdk.NewCoins(sdk.NewInt64Coin(core.MicroLunaDenom, 100000000000))) - require.NoError(t, err) - targetEpoch := int64(windowProbation + 1) for epoch := int64(0); epoch < targetEpoch; epoch++ { // skip last epoch end blocker diff --git a/x/treasury/client/cli/tx.go b/x/treasury/client/cli/tx.go index c6b2412c5..bf25148f1 100644 --- a/x/treasury/client/cli/tx.go +++ b/x/treasury/client/cli/tx.go @@ -43,7 +43,7 @@ Where proposal.json contains: return err } - proposal, err := ParseTaxRateUpdateProposalWithDeposit(clientCtx.JSONMarshaler, args[0]) + proposal, err := ParseTaxRateUpdateProposalWithDeposit(clientCtx.JSONCodec, args[0]) if err != nil { return err } @@ -104,7 +104,7 @@ Where proposal.json contains: return err } - proposal, err := ParseRewardWeightUpdateProposalWithDeposit(clientCtx.JSONMarshaler, args[0]) + proposal, err := ParseRewardWeightUpdateProposalWithDeposit(clientCtx.JSONCodec, args[0]) if err != nil { return err } diff --git a/x/treasury/client/cli/utils.go b/x/treasury/client/cli/utils.go index 513b42cfb..01126ca29 100644 --- a/x/treasury/client/cli/utils.go +++ b/x/treasury/client/cli/utils.go @@ -9,7 +9,7 @@ import ( ) // ParseTaxRateUpdateProposalWithDeposit reads and parses a TaxRateUpdateProposalJSON from a file. -func ParseTaxRateUpdateProposalWithDeposit(cdc codec.JSONMarshaler, proposalFile string) (types.TaxRateUpdateProposalWithDeposit, error) { +func ParseTaxRateUpdateProposalWithDeposit(cdc codec.JSONCodec, proposalFile string) (types.TaxRateUpdateProposalWithDeposit, error) { proposal := types.TaxRateUpdateProposalWithDeposit{} contents, err := ioutil.ReadFile(proposalFile) @@ -25,7 +25,7 @@ func ParseTaxRateUpdateProposalWithDeposit(cdc codec.JSONMarshaler, proposalFile } // ParseRewardWeightUpdateProposalWithDeposit reads and parses a RewardWeightUpdateProposalJSON from a file. -func ParseRewardWeightUpdateProposalWithDeposit(cdc codec.JSONMarshaler, proposalFile string) (types.RewardWeightUpdateProposalWithDeposit, error) { +func ParseRewardWeightUpdateProposalWithDeposit(cdc codec.JSONCodec, proposalFile string) (types.RewardWeightUpdateProposalWithDeposit, error) { proposal := types.RewardWeightUpdateProposalWithDeposit{} contents, err := ioutil.ReadFile(proposalFile) diff --git a/x/treasury/keeper/burn_account.go b/x/treasury/keeper/burn_account.go index 44584636e..523b4822c 100644 --- a/x/treasury/keeper/burn_account.go +++ b/x/treasury/keeper/burn_account.go @@ -1,8 +1,6 @@ package keeper import ( - "fmt" - "github.com/terra-project/core/x/treasury/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -12,7 +10,6 @@ import ( func (k Keeper) BurnCoinsFromBurnAccount(ctx sdk.Context) { burnAddress := k.accountKeeper.GetModuleAddress(types.BurnModuleName) if coins := k.bankKeeper.GetAllBalances(ctx, burnAddress); !coins.IsZero() { - fmt.Println(coins) err := k.bankKeeper.BurnCoins(ctx, types.BurnModuleName, coins) if err != nil { panic(err) diff --git a/x/treasury/keeper/indicator_test.go b/x/treasury/keeper/indicator_test.go index ea7ec4b00..96a3c866f 100644 --- a/x/treasury/keeper/indicator_test.go +++ b/x/treasury/keeper/indicator_test.go @@ -26,7 +26,7 @@ func TestFeeRewardsForEpoch(t *testing.T) { sdk.NewCoin(core.MicroKRWDenom, taxAmount), sdk.NewCoin(core.MicroGBPDenom, taxAmount), sdk.NewCoin(core.MicroCNYDenom, taxAmount), - }) + }.Sort()) // Update Indicators input.TreasuryKeeper.UpdateIndicators(input.Ctx) @@ -39,22 +39,19 @@ func TestFeeRewardsForEpoch(t *testing.T) { func TestSeigniorageRewardsForEpoch(t *testing.T) { input, _ := setupValidators(t) - sAmt := sdk.NewInt(1000) - lnasdrRate := sdk.NewDec(10) + amt := sdk.NewInt(1000) + sdrRate := sdk.NewDec(10) // Add seigniorage - supply := input.BankKeeper.GetSupply(input.Ctx) - supply.SetTotal(sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, sAmt))) - input.BankKeeper.SetSupply(input.Ctx, supply) input.TreasuryKeeper.RecordEpochInitialIssuance(input.Ctx) // Set random prices - input.OracleKeeper.SetLunaExchangeRate(input.Ctx, core.MicroSDRDenom, lnasdrRate) + input.OracleKeeper.SetLunaExchangeRate(input.Ctx, core.MicroSDRDenom, sdrRate) input.Ctx = input.Ctx.WithBlockHeight(int64(core.BlocksPerWeek)) // Add seigniorage - supply.SetTotal(sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, sdk.ZeroInt()))) - input.BankKeeper.SetSupply(input.Ctx, supply) + err := input.BankKeeper.BurnCoins(input.Ctx, faucetAccountName, sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, amt))) + require.NoError(t, err) // Update Indicators input.TreasuryKeeper.UpdateIndicators(input.Ctx) @@ -62,16 +59,13 @@ func TestSeigniorageRewardsForEpoch(t *testing.T) { // Get seigniorage rewards (SR) SR := input.TreasuryKeeper.GetSR(input.Ctx, input.TreasuryKeeper.GetEpoch(input.Ctx)) miningRewardWeight := input.TreasuryKeeper.GetRewardWeight(input.Ctx) - require.Equal(t, lnasdrRate.MulInt(sAmt).Mul(miningRewardWeight), SR) + require.Equal(t, sdrRate.MulInt(amt).Mul(miningRewardWeight), SR) } func TestMiningRewardsForEpoch(t *testing.T) { input, _ := setupValidators(t) amt := sdk.NewInt(1000).MulRaw(core.MicroUnit) - supply := input.BankKeeper.GetSupply(input.Ctx) - supply.SetTotal(sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, amt))) - input.BankKeeper.SetSupply(input.Ctx, supply) input.TreasuryKeeper.RecordEpochInitialIssuance(input.Ctx) // Set random prices @@ -88,11 +82,11 @@ func TestMiningRewardsForEpoch(t *testing.T) { sdk.NewCoin(core.MicroKRWDenom, amt), sdk.NewCoin(core.MicroGBPDenom, amt), sdk.NewCoin(core.MicroCNYDenom, amt), - }) + }.Sort()) // Add seigniorage - supply.SetTotal(sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, sdk.ZeroInt()))) - input.BankKeeper.SetSupply(input.Ctx, supply) + err := input.BankKeeper.BurnCoins(input.Ctx, faucetAccountName, sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, amt))) + require.NoError(t, err) input.TreasuryKeeper.UpdateIndicators(input.Ctx) diff --git a/x/treasury/keeper/keeper.go b/x/treasury/keeper/keeper.go index b1293a001..3ab188af2 100644 --- a/x/treasury/keeper/keeper.go +++ b/x/treasury/keeper/keeper.go @@ -17,7 +17,7 @@ import ( // Keeper of the treasury store type Keeper struct { storeKey sdk.StoreKey - cdc codec.BinaryMarshaler + cdc codec.BinaryCodec paramSpace paramstypes.Subspace accountKeeper types.AccountKeeper @@ -25,17 +25,20 @@ type Keeper struct { marketKeeper types.MarketKeeper stakingKeeper types.StakingKeeper distrKeeper types.DistributionKeeper + oracleKeeper types.OracleKeeper distributionModuleName string } // NewKeeper creates a new treasury Keeper instance -func NewKeeper(cdc codec.BinaryMarshaler, storeKey sdk.StoreKey, +func NewKeeper(cdc codec.BinaryCodec, storeKey sdk.StoreKey, paramSpace paramstypes.Subspace, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, marketKeeper types.MarketKeeper, - stakingKeeper types.StakingKeeper, distrKeeper types.DistributionKeeper, + oracleKeeper types.OracleKeeper, + stakingKeeper types.StakingKeeper, + distrKeeper types.DistributionKeeper, distributionModuleName string) Keeper { // ensure treasury module account is set @@ -60,6 +63,7 @@ func NewKeeper(cdc codec.BinaryMarshaler, storeKey sdk.StoreKey, accountKeeper: accountKeeper, bankKeeper: bankKeeper, marketKeeper: marketKeeper, + oracleKeeper: oracleKeeper, stakingKeeper: stakingKeeper, distrKeeper: distrKeeper, distributionModuleName: distributionModuleName, @@ -80,14 +84,14 @@ func (k Keeper) GetTaxRate(ctx sdk.Context) sdk.Dec { } dp := sdk.DecProto{} - k.cdc.MustUnmarshalBinaryBare(b, &dp) + k.cdc.MustUnmarshal(b, &dp) return dp.Dec } // SetTaxRate sets the tax rate func (k Keeper) SetTaxRate(ctx sdk.Context, taxRate sdk.Dec) { store := ctx.KVStore(k.storeKey) - b := k.cdc.MustMarshalBinaryBare(&sdk.DecProto{Dec: taxRate}) + b := k.cdc.MustMarshal(&sdk.DecProto{Dec: taxRate}) store.Set(types.TaxRateKey, b) } @@ -100,21 +104,21 @@ func (k Keeper) GetRewardWeight(ctx sdk.Context) sdk.Dec { } dp := sdk.DecProto{} - k.cdc.MustUnmarshalBinaryBare(b, &dp) + k.cdc.MustUnmarshal(b, &dp) return dp.Dec } // SetRewardWeight sets the reward weight func (k Keeper) SetRewardWeight(ctx sdk.Context, rewardWeight sdk.Dec) { store := ctx.KVStore(k.storeKey) - b := k.cdc.MustMarshalBinaryBare(&sdk.DecProto{Dec: rewardWeight}) + b := k.cdc.MustMarshal(&sdk.DecProto{Dec: rewardWeight}) store.Set(types.RewardWeightKey, b) } // SetTaxCap sets the tax cap denominated in integer units of the reference {denom} func (k Keeper) SetTaxCap(ctx sdk.Context, denom string, cap sdk.Int) { store := ctx.KVStore(k.storeKey) - bz := k.cdc.MustMarshalBinaryBare(&sdk.IntProto{Int: cap}) + bz := k.cdc.MustMarshal(&sdk.IntProto{Int: cap}) store.Set(types.GetTaxCapKey(denom), bz) } @@ -133,7 +137,7 @@ func (k Keeper) GetTaxCap(ctx sdk.Context, denom string) sdk.Int { } ip := sdk.IntProto{} - k.cdc.MustUnmarshalBinaryBare(bz, &ip) + k.cdc.MustUnmarshal(bz, &ip) return ip.Int } @@ -146,7 +150,7 @@ func (k Keeper) IterateTaxCap(ctx sdk.Context, handler func(denom string, taxCap for ; iter.Valid(); iter.Next() { denom := string(iter.Key()[len(types.TaxCapKey):]) var ip sdk.IntProto - k.cdc.MustUnmarshalBinaryBare(iter.Value(), &ip) + k.cdc.MustUnmarshal(iter.Value(), &ip) if handler(denom, ip.Int) { break @@ -172,7 +176,7 @@ func (k Keeper) RecordEpochTaxProceeds(ctx sdk.Context, delta sdk.Coins) { func (k Keeper) SetEpochTaxProceeds(ctx sdk.Context, taxProceeds sdk.Coins) { store := ctx.KVStore(k.storeKey) - bz := k.cdc.MustMarshalBinaryBare(&types.EpochTaxProceeds{TaxProceeds: taxProceeds}) + bz := k.cdc.MustMarshal(&types.EpochTaxProceeds{TaxProceeds: taxProceeds}) store.Set(types.TaxProceedsKey, bz) } @@ -184,7 +188,7 @@ func (k Keeper) PeekEpochTaxProceeds(ctx sdk.Context) sdk.Coins { if bz == nil { taxProceeds.TaxProceeds = sdk.Coins{} } else { - k.cdc.MustUnmarshalBinaryBare(bz, &taxProceeds) + k.cdc.MustUnmarshal(bz, &taxProceeds) } return taxProceeds.TaxProceeds @@ -192,15 +196,23 @@ func (k Keeper) PeekEpochTaxProceeds(ctx sdk.Context) sdk.Coins { // RecordEpochInitialIssuance updates epoch initial issuance from supply keeper func (k Keeper) RecordEpochInitialIssuance(ctx sdk.Context) { - totalCoins := k.bankKeeper.GetSupply(ctx).GetTotal() - k.SetEpochInitialIssuance(ctx, totalCoins) + whitelist := k.oracleKeeper.Whitelist(ctx) + + totalSupply := make(sdk.Coins, len(whitelist)+1) + totalSupply[0] = k.bankKeeper.GetSupply(ctx, core.MicroLunaDenom) + + for i, denom := range whitelist { + totalSupply[i+1] = k.bankKeeper.GetSupply(ctx, denom.Name) + } + + k.SetEpochInitialIssuance(ctx, totalSupply.Sort()) } // SetEpochInitialIssuance stores epoch initial issuance func (k Keeper) SetEpochInitialIssuance(ctx sdk.Context, issuance sdk.Coins) { store := ctx.KVStore(k.storeKey) - bz := k.cdc.MustMarshalBinaryBare(&types.EpochInitialIssuance{Issuance: issuance}) + bz := k.cdc.MustMarshal(&types.EpochInitialIssuance{Issuance: issuance}) store.Set(types.EpochInitialIssuanceKey, bz) } @@ -213,7 +225,7 @@ func (k Keeper) GetEpochInitialIssuance(ctx sdk.Context) sdk.Coins { if bz == nil { initialIssuance.Issuance = sdk.Coins{} } else { - k.cdc.MustUnmarshalBinaryBare(bz, &initialIssuance) + k.cdc.MustUnmarshal(bz, &initialIssuance) } return initialIssuance.Issuance @@ -221,11 +233,11 @@ func (k Keeper) GetEpochInitialIssuance(ctx sdk.Context) sdk.Coins { // PeekEpochSeigniorage returns epoch seigniorage func (k Keeper) PeekEpochSeigniorage(ctx sdk.Context) sdk.Int { - epochIssuance := k.bankKeeper.GetSupply(ctx).GetTotal().AmountOf(core.MicroLunaDenom) + epochIssuance := k.bankKeeper.GetSupply(ctx, core.MicroLunaDenom).Amount preEpochIssuance := k.GetEpochInitialIssuance(ctx).AmountOf(core.MicroLunaDenom) epochSeigniorage := preEpochIssuance.Sub(epochIssuance) - if epochSeigniorage.LT(sdk.ZeroInt()) { + if epochSeigniorage.IsNegative() { return sdk.ZeroInt() } @@ -241,7 +253,7 @@ func (k Keeper) GetTR(ctx sdk.Context, epoch int64) sdk.Dec { if bz == nil { dp.Dec = sdk.ZeroDec() } else { - k.cdc.MustUnmarshalBinaryBare(bz, &dp) + k.cdc.MustUnmarshal(bz, &dp) } return dp.Dec @@ -251,7 +263,7 @@ func (k Keeper) GetTR(ctx sdk.Context, epoch int64) sdk.Dec { func (k Keeper) SetTR(ctx sdk.Context, epoch int64, TR sdk.Dec) { store := ctx.KVStore(k.storeKey) - bz := k.cdc.MustMarshalBinaryBare(&sdk.DecProto{Dec: TR}) + bz := k.cdc.MustMarshal(&sdk.DecProto{Dec: TR}) store.Set(types.GetTRKey(epoch), bz) } @@ -275,7 +287,7 @@ func (k Keeper) GetSR(ctx sdk.Context, epoch int64) sdk.Dec { if bz == nil { dp.Dec = sdk.ZeroDec() } else { - k.cdc.MustUnmarshalBinaryBare(bz, &dp) + k.cdc.MustUnmarshal(bz, &dp) } return dp.Dec @@ -285,7 +297,7 @@ func (k Keeper) GetSR(ctx sdk.Context, epoch int64) sdk.Dec { func (k Keeper) SetSR(ctx sdk.Context, epoch int64, SR sdk.Dec) { store := ctx.KVStore(k.storeKey) - bz := k.cdc.MustMarshalBinaryBare(&sdk.DecProto{Dec: SR}) + bz := k.cdc.MustMarshal(&sdk.DecProto{Dec: SR}) store.Set(types.GetSRKey(epoch), bz) } @@ -309,7 +321,7 @@ func (k Keeper) GetTSL(ctx sdk.Context, epoch int64) sdk.Int { if bz == nil { ip.Int = sdk.ZeroInt() } else { - k.cdc.MustUnmarshalBinaryBare(bz, &ip) + k.cdc.MustUnmarshal(bz, &ip) } return ip.Int @@ -319,7 +331,7 @@ func (k Keeper) GetTSL(ctx sdk.Context, epoch int64) sdk.Int { func (k Keeper) SetTSL(ctx sdk.Context, epoch int64, TSL sdk.Int) { store := ctx.KVStore(k.storeKey) - bz := k.cdc.MustMarshalBinaryBare(&sdk.IntProto{Int: TSL}) + bz := k.cdc.MustMarshal(&sdk.IntProto{Int: TSL}) store.Set(types.GetTSLKey(epoch), bz) } diff --git a/x/treasury/keeper/keeper_test.go b/x/treasury/keeper/keeper_test.go index 0081ff7c5..545fb85af 100644 --- a/x/treasury/keeper/keeper_test.go +++ b/x/treasury/keeper/keeper_test.go @@ -85,20 +85,16 @@ func TestTaxProceeds(t *testing.T) { func TestMicroLunaIssuance(t *testing.T) { input := CreateTestInput(t) - supply := input.BankKeeper.GetSupply(input.Ctx) - supply.SetTotal(sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, sdk.ZeroInt()))) - input.BankKeeper.SetSupply(input.Ctx, supply) - + initialSupply := input.BankKeeper.GetSupply(input.Ctx, core.MicroLunaDenom) // See that we can get and set luna issuance blocksPerEpoch := core.BlocksPerWeek for i := int64(0); i < 10; i++ { input.Ctx = input.Ctx.WithBlockHeight(i * int64(blocksPerEpoch)) - supply.SetTotal(sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, sdk.NewInt(i)))) - input.BankKeeper.SetSupply(input.Ctx, supply) input.TreasuryKeeper.RecordEpochInitialIssuance(input.Ctx) + require.Equal(t, initialSupply.Amount.Add(sdk.NewInt(i)), input.TreasuryKeeper.GetEpochInitialIssuance(input.Ctx).AmountOf(core.MicroLunaDenom)) - require.Equal(t, sdk.NewInt(i), input.TreasuryKeeper.GetEpochInitialIssuance(input.Ctx).AmountOf(core.MicroLunaDenom)) + input.BankKeeper.MintCoins(input.Ctx, faucetAccountName, sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, sdk.OneInt()))) } } @@ -107,18 +103,19 @@ func TestPeekEpochSeigniorage(t *testing.T) { for i := int64(0); i < 10; i++ { input.Ctx = input.Ctx.WithBlockHeight(i * int64(core.BlocksPerWeek)) - supply := input.BankKeeper.GetSupply(input.Ctx) + faucetBalance := input.BankKeeper.GetBalance(input.Ctx, input.AccountKeeper.GetModuleAddress(faucetAccountName), core.MicroLunaDenom) - preIssuance := sdk.NewInt(rand.Int63() + 1) - supply.SetTotal(sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, preIssuance))) - input.BankKeeper.SetSupply(input.Ctx, supply) input.TreasuryKeeper.RecordEpochInitialIssuance(input.Ctx) - nowIssuance := sdk.NewInt(rand.Int63() + 1) - supply.SetTotal(sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, nowIssuance))) - input.BankKeeper.SetSupply(input.Ctx, supply) + issueAmount := sdk.NewInt(rand.Int63()%1000000 + 1) + err := input.BankKeeper.MintCoins(input.Ctx, faucetAccountName, sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, issueAmount))) + require.NoError(t, err) + + burnAmount := sdk.NewInt(rand.Int63()%(faucetBalance.Amount.Int64()+issueAmount.Int64()) + 1) + err = input.BankKeeper.BurnCoins(input.Ctx, faucetAccountName, sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, burnAmount))) + require.NoError(t, err) - targetSeigniorage := preIssuance.Sub(nowIssuance) + targetSeigniorage := burnAmount.Sub(issueAmount) if targetSeigniorage.IsNegative() { targetSeigniorage = sdk.ZeroInt() } diff --git a/x/treasury/keeper/legacy_querier_test.go b/x/treasury/keeper/legacy_querier_test.go index 86a2026ef..c36ac02fa 100644 --- a/x/treasury/keeper/legacy_querier_test.go +++ b/x/treasury/keeper/legacy_querier_test.go @@ -256,16 +256,11 @@ func TestLegacyQuerySeigniorageProceeds(t *testing.T) { input := CreateTestInput(t) querier := NewLegacyQuerier(input.TreasuryKeeper, input.Cdc) - targetIssuance := sdk.NewInt(1000) targetSeigniorage := sdk.NewInt(10) - supply := input.BankKeeper.GetSupply(input.Ctx) - supply.SetTotal(sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, targetIssuance))) - input.BankKeeper.SetSupply(input.Ctx, supply) input.TreasuryKeeper.RecordEpochInitialIssuance(input.Ctx) input.Ctx = input.Ctx.WithBlockHeight(int64(core.BlocksPerWeek)) - supply.SetTotal(sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, targetIssuance.Sub(targetSeigniorage)))) - input.BankKeeper.SetSupply(input.Ctx, supply) + input.BankKeeper.BurnCoins(input.Ctx, faucetAccountName, sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, targetSeigniorage))) queriedSeigniorageProceeds := getQueriedSeigniorageProceeds(t, input.Ctx, input.Cdc, querier, input.TreasuryKeeper.GetEpoch(input.Ctx)) @@ -277,7 +272,7 @@ func TestLegacyQueryIndicators(t *testing.T) { querier := NewLegacyQuerier(input.TreasuryKeeper, input.Cdc) sh := staking.NewHandler(input.StakingKeeper) - stakingAmt := sdk.TokensFromConsensusPower(1) + stakingAmt := sdk.TokensFromConsensusPower(1, sdk.DefaultPowerReduction) addr, val := ValAddrs[0], ValPubKeys[0] addr1, val1 := ValAddrs[1], ValPubKeys[1] _, err := sh(input.Ctx, NewTestMsgCreateValidator(addr, val, stakingAmt)) diff --git a/x/treasury/keeper/policy.go b/x/treasury/keeper/policy.go index f40a2d058..a1190395b 100644 --- a/x/treasury/keeper/policy.go +++ b/x/treasury/keeper/policy.go @@ -1,24 +1,22 @@ package keeper import ( - core "github.com/terra-project/core/types" - sdk "github.com/cosmos/cosmos-sdk/types" ) // UpdateTaxCap updates all denom's tax cap func (k Keeper) UpdateTaxCap(ctx sdk.Context) sdk.Coins { taxPolicyCap := sdk.NewDecCoinFromCoin(k.TaxPolicy(ctx).Cap) - total := k.bankKeeper.GetSupply(ctx).GetTotal() + whitelist := k.oracleKeeper.Whitelist(ctx) var newCaps sdk.Coins - for _, coin := range total { - // ignore uluna tax cap (uluna has no tax); keep sdr tax cap - if coin.Denom == core.MicroLunaDenom || coin.Denom == taxPolicyCap.Denom { + for _, denom := range whitelist { + // keep sdr tax cap + if denom.Name == taxPolicyCap.Denom { continue } - newDecCap, err := k.marketKeeper.ComputeInternalSwap(ctx, taxPolicyCap, coin.Denom) + newDecCap, err := k.marketKeeper.ComputeInternalSwap(ctx, taxPolicyCap, denom.Name) if err == nil { newCap, _ := newDecCap.TruncateDecimal() newCaps = append(newCaps, newCap) diff --git a/x/treasury/keeper/policy_test.go b/x/treasury/keeper/policy_test.go index a46dc42af..731b72502 100644 --- a/x/treasury/keeper/policy_test.go +++ b/x/treasury/keeper/policy_test.go @@ -4,6 +4,7 @@ import ( "testing" core "github.com/terra-project/core/types" + oracletypes "github.com/terra-project/core/x/oracle/types" "github.com/terra-project/core/x/treasury/types" "github.com/stretchr/testify/require" @@ -17,7 +18,7 @@ func TestUpdateTaxRate(t *testing.T) { sh := staking.NewHandler(input.StakingKeeper) // Create Validators - amt := sdk.TokensFromConsensusPower(1) + amt := sdk.TokensFromConsensusPower(1, sdk.DefaultPowerReduction) addr, val := ValAddrs[0], ValPubKeys[0] addr1, val1 := ValAddrs[1], ValPubKeys[1] _, err := sh(input.Ctx, NewTestMsgCreateValidator(addr, val, amt)) @@ -49,7 +50,7 @@ func TestUpdateRewardWeight(t *testing.T) { sh := staking.NewHandler(input.StakingKeeper) // Create Validators - amt := sdk.TokensFromConsensusPower(1) + amt := sdk.TokensFromConsensusPower(1, sdk.DefaultPowerReduction) addr, val := ValAddrs[0], ValPubKeys[0] addr1, val1 := ValAddrs[1], ValPubKeys[1] _, err := sh(input.Ctx, NewTestMsgCreateValidator(addr, val, amt)) @@ -76,15 +77,20 @@ func TestUpdateRewardWeight(t *testing.T) { func TestUpdateTaxCap(t *testing.T) { input := CreateTestInput(t) - supply := input.BankKeeper.GetSupply(input.Ctx) - supply.SetTotal( - sdk.NewCoins( - sdk.NewInt64Coin(core.MicroLunaDenom, 1000000), - sdk.NewInt64Coin(core.MicroSDRDenom, 1000000), - sdk.NewInt64Coin(core.MicroKRWDenom, 1000000), - ), + input.OracleKeeper.SetWhitelist( + input.Ctx, + oracletypes.DenomList{ + { + Name: core.MicroLunaDenom, + }, + { + Name: core.MicroSDRDenom, + }, + { + Name: core.MicroKRWDenom, + }, + }, ) - input.BankKeeper.SetSupply(input.Ctx, supply) // Create Validators sdrPrice := sdk.NewDecWithPrec(13, 1) diff --git a/x/treasury/keeper/querier_test.go b/x/treasury/keeper/querier_test.go index 08d578e02..a1f36c956 100644 --- a/x/treasury/keeper/querier_test.go +++ b/x/treasury/keeper/querier_test.go @@ -106,16 +106,13 @@ func TestQuerySeigniorageProceeds(t *testing.T) { input := CreateTestInput(t) ctx := sdk.WrapSDKContext(input.Ctx) - targetIssuance := sdk.NewInt(1000) targetSeigniorage := sdk.NewInt(10) - supply := input.BankKeeper.GetSupply(input.Ctx) - supply.SetTotal(sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, targetIssuance))) - input.BankKeeper.SetSupply(input.Ctx, supply) + input.TreasuryKeeper.RecordEpochInitialIssuance(input.Ctx) input.Ctx = input.Ctx.WithBlockHeight(int64(core.BlocksPerWeek)) - supply.SetTotal(sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, targetIssuance.Sub(targetSeigniorage)))) - input.BankKeeper.SetSupply(input.Ctx, supply) + err := input.BankKeeper.BurnCoins(input.Ctx, faucetAccountName, sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, targetSeigniorage))) + require.NoError(t, err) querier := NewQuerier(input.TreasuryKeeper) res, err := querier.SeigniorageProceeds(ctx, &types.QuerySeigniorageProceedsRequest{}) @@ -131,7 +128,7 @@ func TestQueryIndicators(t *testing.T) { sh := staking.NewHandler(input.StakingKeeper) - stakingAmt := sdk.TokensFromConsensusPower(1) + stakingAmt := sdk.TokensFromConsensusPower(1, sdk.DefaultPowerReduction) addr, val := ValAddrs[0], ValPubKeys[0] addr1, val1 := ValAddrs[1], ValPubKeys[1] _, err := sh(input.Ctx, NewTestMsgCreateValidator(addr, val, stakingAmt)) diff --git a/x/treasury/keeper/seigniorage_test.go b/x/treasury/keeper/seigniorage_test.go index 3eb58cc10..dee174a77 100644 --- a/x/treasury/keeper/seigniorage_test.go +++ b/x/treasury/keeper/seigniorage_test.go @@ -14,27 +14,26 @@ import ( func TestSettle(t *testing.T) { input := CreateTestInput(t) - burnAmt := sdk.NewInt(rand.Int63() + 1) - supply := input.BankKeeper.GetSupply(input.Ctx) - supply.SetTotal(sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, burnAmt))) - input.BankKeeper.SetSupply(input.Ctx, supply) + faucetBalance := input.BankKeeper.GetBalance(input.Ctx, input.AccountKeeper.GetModuleAddress(faucetAccountName), core.MicroLunaDenom) + burnAmt := sdk.NewInt(rand.Int63()%faucetBalance.Amount.Int64() + 1) + initialLunaSupply := input.BankKeeper.GetSupply(input.Ctx, core.MicroLunaDenom) input.TreasuryKeeper.RecordEpochInitialIssuance(input.Ctx) input.Ctx = input.Ctx.WithBlockHeight(int64(core.BlocksPerWeek)) - supply.SetTotal(sdk.NewCoins()) - input.BankKeeper.SetSupply(input.Ctx, supply) + err := input.BankKeeper.BurnCoins(input.Ctx, faucetAccountName, sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, burnAmt))) + require.NoError(t, err) // check seigniorage update require.Equal(t, burnAmt, input.TreasuryKeeper.PeekEpochSeigniorage(input.Ctx)) input.TreasuryKeeper.SettleSeigniorage(input.Ctx) - supply = input.BankKeeper.GetSupply(input.Ctx) + lunaSupply := input.BankKeeper.GetSupply(input.Ctx, core.MicroLunaDenom) feePool := input.DistrKeeper.GetFeePool(input.Ctx) // Reward weight portion of seigniorage burned rewardWeight := input.TreasuryKeeper.GetRewardWeight(input.Ctx) communityPoolAmt := burnAmt.Sub(rewardWeight.MulInt(burnAmt).TruncateInt()) - require.Equal(t, communityPoolAmt, supply.GetTotal().AmountOf(core.MicroLunaDenom)) + require.Equal(t, lunaSupply.Amount, initialLunaSupply.Amount.Sub(burnAmt).Add(communityPoolAmt)) require.Equal(t, communityPoolAmt, feePool.CommunityPool.AmountOf(core.MicroLunaDenom).TruncateInt()) } diff --git a/x/treasury/keeper/test_utils.go b/x/treasury/keeper/test_utils.go index a4e284303..2c8335855 100644 --- a/x/treasury/keeper/test_utils.go +++ b/x/treasury/keeper/test_utils.go @@ -50,6 +50,8 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) +const faucetAccountName = "faucet" + var ModuleBasics = module.NewBasicManager( customauth.AppModuleBasic{}, custombank.AppModuleBasic{}, @@ -61,7 +63,7 @@ var ModuleBasics = module.NewBasicManager( ) // MakeTestCodec nolint -func MakeTestCodec(t *testing.T) codec.Marshaler { +func MakeTestCodec(t *testing.T) codec.Codec { return MakeEncodingConfig(t).Marshaler } @@ -109,7 +111,7 @@ var ( sdk.ValAddress(PubKeys[2].Address()), } - InitTokens = sdk.TokensFromConsensusPower(200) + InitTokens = sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction) InitCoins = sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, InitTokens)) ) @@ -118,12 +120,12 @@ type TestInput struct { Ctx sdk.Context Cdc *codec.LegacyAmino TreasuryKeeper Keeper + AccountKeeper authkeeper.AccountKeeper + BankKeeper bankkeeper.Keeper + DistrKeeper distrkeeper.Keeper StakingKeeper stakingkeeper.Keeper - OracleKeeper types.OracleKeeper - AccountKeeper types.AccountKeeper - BankKeeper types.BankKeeper MarketKeeper types.MarketKeeper - DistrKeeper types.DistributionKeeper + OracleKeeper types.OracleKeeper } // CreateTestInput nolint @@ -162,9 +164,11 @@ func CreateTestInput(t *testing.T) TestInput { stakingtypes.BondedPoolName: true, distrtypes.ModuleName: true, oracletypes.ModuleName: true, + faucetAccountName: true, } maccPerms := map[string][]string{ + faucetAccountName: {authtypes.Minter, authtypes.Burner}, authtypes.FeeCollectorName: nil, stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking}, stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking}, @@ -179,8 +183,8 @@ func CreateTestInput(t *testing.T) TestInput { accountKeeper := authkeeper.NewAccountKeeper(appCodec, keyAcc, paramsKeeper.Subspace(authtypes.ModuleName), authtypes.ProtoBaseAccount, maccPerms) bankKeeper := bankkeeper.NewBaseKeeper(appCodec, keyBank, accountKeeper, paramsKeeper.Subspace(banktypes.ModuleName), blackListAddrs) - totalSupply := sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, InitTokens.MulRaw(int64(len(Addrs))))) - bankKeeper.SetSupply(ctx, banktypes.NewSupply(totalSupply)) + totalSupply := sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, InitTokens.MulRaw(int64(len(Addrs)*10)))) + bankKeeper.MintCoins(ctx, faucetAccountName, totalSupply) stakingKeeper := stakingkeeper.NewKeeper( appCodec, @@ -218,7 +222,7 @@ func CreateTestInput(t *testing.T) TestInput { burnAcc := authtypes.NewEmptyModuleAccount(types.BurnModuleName, authtypes.Burner) // + 1 for burn account - bankKeeper.SetBalances(ctx, notBondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, InitTokens.MulRaw(int64(len(Addrs)+1))))) + bankKeeper.SendCoinsFromModuleToModule(ctx, faucetAccountName, stakingtypes.NotBondedPoolName, sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, InitTokens.MulRaw(int64(len(Addrs)+1))))) accountKeeper.SetModuleAccount(ctx, feeCollectorAcc) accountKeeper.SetModuleAccount(ctx, bondPool) @@ -231,12 +235,12 @@ func CreateTestInput(t *testing.T) TestInput { for _, addr := range Addrs { accountKeeper.SetAccount(ctx, authtypes.NewBaseAccountWithAddress(addr)) - err := bankKeeper.AddCoins(ctx, addr, InitCoins) + err := bankKeeper.SendCoinsFromModuleToAccount(ctx, faucetAccountName, addr, InitCoins) require.NoError(t, err) } // to test burn module account - err := bankKeeper.AddCoins(ctx, burnAcc.GetAddress(), InitCoins) + err := bankKeeper.SendCoinsFromModuleToModule(ctx, faucetAccountName, types.BurnModuleName, InitCoins) require.NoError(t, err) oracleKeeper := oraclekeeper.NewKeeper( @@ -271,6 +275,7 @@ func CreateTestInput(t *testing.T) TestInput { accountKeeper, bankKeeper, marketKeeper, + oracleKeeper, stakingKeeper, distrKeeper, distrtypes.ModuleName, @@ -278,7 +283,7 @@ func CreateTestInput(t *testing.T) TestInput { treasuryKeeper.SetParams(ctx, types.DefaultParams()) - return TestInput{ctx, legacyAmino, treasuryKeeper, stakingKeeper, oracleKeeper, accountKeeper, bankKeeper, marketKeeper, distrKeeper} + return TestInput{ctx, legacyAmino, treasuryKeeper, accountKeeper, bankKeeper, distrKeeper, stakingKeeper, marketKeeper, oracleKeeper} } // NewTestMsgCreateValidator test msg creator @@ -297,7 +302,7 @@ func setupValidators(t *testing.T) (TestInput, sdk.Handler) { sh := staking.NewHandler(input.StakingKeeper) // Create Validators - amt := sdk.TokensFromConsensusPower(100) + amt := sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) addr, val := ValAddrs[0], ValPubKeys[0] addr1, val1 := ValAddrs[1], ValPubKeys[1] _, err := sh(input.Ctx, NewTestMsgCreateValidator(addr, val, amt)) @@ -310,3 +315,14 @@ func setupValidators(t *testing.T) (TestInput, sdk.Handler) { return input, sh } + +// FundAccount is a utility function that funds an account by minting and +// sending the coins to the address. This should be used for testing purposes +// only! +func FundAccount(input TestInput, addr sdk.AccAddress, amounts sdk.Coins) error { + if err := input.BankKeeper.MintCoins(input.Ctx, faucetAccountName, amounts); err != nil { + return err + } + + return input.BankKeeper.SendCoinsFromModuleToAccount(input.Ctx, faucetAccountName, addr, amounts) +} diff --git a/x/treasury/legacy/v05/migrate_test.go b/x/treasury/legacy/v05/migrate_test.go index bba54ee39..6266ec002 100644 --- a/x/treasury/legacy/v05/migrate_test.go +++ b/x/treasury/legacy/v05/migrate_test.go @@ -23,7 +23,7 @@ func TestMigrate(t *testing.T) { WithInterfaceRegistry(encodingConfig.InterfaceRegistry). WithTxConfig(encodingConfig.TxConfig). WithLegacyAmino(encodingConfig.Amino). - WithJSONMarshaler(encodingConfig.Marshaler) + WithJSONCodec(encodingConfig.Marshaler) treasuryGenState := v04treasury.GenesisState{ TaxRate: sdk.NewDecWithPrec(2, 2), @@ -81,7 +81,7 @@ func TestMigrate(t *testing.T) { migrated := v05treasury.Migrate(treasuryGenState) - bz, err := clientCtx.JSONMarshaler.MarshalJSON(migrated) + bz, err := clientCtx.JSONCodec.MarshalJSON(migrated) require.NoError(t, err) // Indent the JSON bz correctly. diff --git a/x/treasury/module.go b/x/treasury/module.go index 5cd75866d..c28a95018 100644 --- a/x/treasury/module.go +++ b/x/treasury/module.go @@ -35,7 +35,7 @@ var ( // AppModuleBasic defines the basic application module used by the treasury module. type AppModuleBasic struct { - cdc codec.Marshaler + cdc codec.Codec } // Name returns the treasury module's name @@ -55,12 +55,12 @@ func (b AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry // DefaultGenesis returns default genesis state as raw bytes for the treasury // module. -func (AppModuleBasic) DefaultGenesis(cdc codec.JSONMarshaler) json.RawMessage { +func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { return cdc.MustMarshalJSON(types.DefaultGenesisState()) } // ValidateGenesis performs genesis state validation for the treasury module. -func (AppModuleBasic) ValidateGenesis(cdc codec.JSONMarshaler, config client.TxEncodingConfig, bz json.RawMessage) error { +func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { var data types.GenesisState if err := cdc.UnmarshalJSON(bz, &data); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) @@ -97,7 +97,7 @@ type AppModule struct { } // NewAppModule creates a new AppModule object -func NewAppModule(cdc codec.Marshaler, keeper keeper.Keeper) AppModule { +func NewAppModule(cdc codec.Codec, keeper keeper.Keeper) AppModule { return AppModule{ AppModuleBasic: AppModuleBasic{cdc}, keeper: keeper, @@ -136,7 +136,7 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { // InitGenesis performs genesis initialization for the treasury module. It returns // no validator updates. -func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONMarshaler, data json.RawMessage) []abci.ValidatorUpdate { +func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { var genesisState types.GenesisState cdc.MustUnmarshalJSON(data, &genesisState) InitGenesis(ctx, am.keeper, &genesisState) @@ -146,11 +146,14 @@ func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONMarshaler, data j // ExportGenesis returns the exported genesis state as raw bytes for the treasury // module. -func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONMarshaler) json.RawMessage { +func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { gs := ExportGenesis(ctx, am.keeper) return cdc.MustMarshalJSON(gs) } +// ConsensusVersion implements AppModule/ConsensusVersion. +func (AppModule) ConsensusVersion() uint64 { return 2 } + // BeginBlock returns the begin blocker for the treasury module. func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) {} diff --git a/x/treasury/simulation/decoder.go b/x/treasury/simulation/decoder.go index 4eaf0524a..e0f02c487 100644 --- a/x/treasury/simulation/decoder.go +++ b/x/treasury/simulation/decoder.go @@ -13,48 +13,48 @@ import ( // NewDecodeStore returns a decoder function closure that unmarshals the KVPair's // Value to the corresponding treasury type. -func NewDecodeStore(cdc codec.Marshaler) func(kvA, kvB kv.Pair) string { +func NewDecodeStore(cdc codec.Codec) func(kvA, kvB kv.Pair) string { return func(kvA, kvB kv.Pair) string { switch { case bytes.Equal(kvA.Key[:1], types.TaxRateKey): var taxRateA, taxRateB sdk.DecProto - cdc.MustUnmarshalBinaryBare(kvA.Value, &taxRateA) - cdc.MustUnmarshalBinaryBare(kvB.Value, &taxRateB) + cdc.MustUnmarshal(kvA.Value, &taxRateA) + cdc.MustUnmarshal(kvB.Value, &taxRateB) return fmt.Sprintf("%v\n%v", taxRateA, taxRateB) case bytes.Equal(kvA.Key[:1], types.RewardWeightKey): var rewardWeightA, rewardWeightB sdk.DecProto - cdc.MustUnmarshalBinaryBare(kvA.Value, &rewardWeightA) - cdc.MustUnmarshalBinaryBare(kvB.Value, &rewardWeightB) + cdc.MustUnmarshal(kvA.Value, &rewardWeightA) + cdc.MustUnmarshal(kvB.Value, &rewardWeightB) return fmt.Sprintf("%v\n%v", rewardWeightA, rewardWeightB) case bytes.Equal(kvA.Key[:1], types.TaxCapKey): var taxCapA, taxCapB sdk.IntProto - cdc.MustUnmarshalBinaryBare(kvA.Value, &taxCapA) - cdc.MustUnmarshalBinaryBare(kvB.Value, &taxCapB) + cdc.MustUnmarshal(kvA.Value, &taxCapA) + cdc.MustUnmarshal(kvB.Value, &taxCapB) return fmt.Sprintf("%v\n%v", taxCapA, taxCapB) case bytes.Equal(kvA.Key[:1], types.TaxProceedsKey): var taxProceedsA, taxProceedsB types.EpochTaxProceeds - cdc.MustUnmarshalBinaryBare(kvA.Value, &taxProceedsA) - cdc.MustUnmarshalBinaryBare(kvB.Value, &taxProceedsB) + cdc.MustUnmarshal(kvA.Value, &taxProceedsA) + cdc.MustUnmarshal(kvB.Value, &taxProceedsB) return fmt.Sprintf("%v\n%v", taxProceedsA.TaxProceeds, taxProceedsB.TaxProceeds) case bytes.Equal(kvA.Key[:1], types.EpochInitialIssuanceKey): var epochInitialIssuanceA, epochInitialIssuanceB types.EpochInitialIssuance - cdc.MustUnmarshalBinaryBare(kvA.Value, &epochInitialIssuanceA) - cdc.MustUnmarshalBinaryBare(kvB.Value, &epochInitialIssuanceB) + cdc.MustUnmarshal(kvA.Value, &epochInitialIssuanceA) + cdc.MustUnmarshal(kvB.Value, &epochInitialIssuanceB) return fmt.Sprintf("%v\n%v", epochInitialIssuanceA.Issuance, epochInitialIssuanceB.Issuance) case bytes.Equal(kvA.Key[:1], types.TRKey): var TaxRateA, TaxRateB sdk.DecProto - cdc.MustUnmarshalBinaryBare(kvA.Value, &TaxRateA) - cdc.MustUnmarshalBinaryBare(kvB.Value, &TaxRateB) + cdc.MustUnmarshal(kvA.Value, &TaxRateA) + cdc.MustUnmarshal(kvB.Value, &TaxRateB) return fmt.Sprintf("%v\n%v", TaxRateA, TaxRateB) case bytes.Equal(kvA.Key[:1], types.SRKey): var SeigniorageRateA, SeigniorageRateB sdk.DecProto - cdc.MustUnmarshalBinaryBare(kvA.Value, &SeigniorageRateA) - cdc.MustUnmarshalBinaryBare(kvB.Value, &SeigniorageRateB) + cdc.MustUnmarshal(kvA.Value, &SeigniorageRateA) + cdc.MustUnmarshal(kvB.Value, &SeigniorageRateB) return fmt.Sprintf("%v\n%v", SeigniorageRateA, SeigniorageRateB) case bytes.Equal(kvA.Key[:1], types.TSLKey): var TotalStakedLunaA, TotalStakedLunaB sdk.IntProto - cdc.MustUnmarshalBinaryBare(kvA.Value, &TotalStakedLunaA) - cdc.MustUnmarshalBinaryBare(kvB.Value, &TotalStakedLunaB) + cdc.MustUnmarshal(kvA.Value, &TotalStakedLunaA) + cdc.MustUnmarshal(kvB.Value, &TotalStakedLunaB) return fmt.Sprintf("%v\n%v", TotalStakedLunaA, TotalStakedLunaB) default: panic(fmt.Sprintf("invalid oracle key prefix %X", kvA.Key[:1])) diff --git a/x/treasury/simulation/decoder_test.go b/x/treasury/simulation/decoder_test.go index 30ce5f939..f247b0f7b 100644 --- a/x/treasury/simulation/decoder_test.go +++ b/x/treasury/simulation/decoder_test.go @@ -30,14 +30,14 @@ func TestDecodeDistributionStore(t *testing.T) { kvPairs := kv.Pairs{ Pairs: []kv.Pair{ - {Key: types.TaxRateKey, Value: cdc.MustMarshalBinaryBare(&sdk.DecProto{Dec: taxRate})}, - {Key: types.RewardWeightKey, Value: cdc.MustMarshalBinaryBare(&sdk.DecProto{Dec: rewardWeight})}, - {Key: types.TaxCapKey, Value: cdc.MustMarshalBinaryBare(&sdk.IntProto{Int: taxCap})}, - {Key: types.TaxProceedsKey, Value: cdc.MustMarshalBinaryBare(&types.EpochTaxProceeds{TaxProceeds: taxProceeds})}, - {Key: types.EpochInitialIssuanceKey, Value: cdc.MustMarshalBinaryBare(&types.EpochInitialIssuance{Issuance: epochInitialIssuance})}, - {Key: types.TRKey, Value: cdc.MustMarshalBinaryBare(&sdk.DecProto{Dec: TR})}, - {Key: types.SRKey, Value: cdc.MustMarshalBinaryBare(&sdk.DecProto{Dec: SR})}, - {Key: types.TSLKey, Value: cdc.MustMarshalBinaryBare(&sdk.IntProto{Int: TSL})}, + {Key: types.TaxRateKey, Value: cdc.MustMarshal(&sdk.DecProto{Dec: taxRate})}, + {Key: types.RewardWeightKey, Value: cdc.MustMarshal(&sdk.DecProto{Dec: rewardWeight})}, + {Key: types.TaxCapKey, Value: cdc.MustMarshal(&sdk.IntProto{Int: taxCap})}, + {Key: types.TaxProceedsKey, Value: cdc.MustMarshal(&types.EpochTaxProceeds{TaxProceeds: taxProceeds})}, + {Key: types.EpochInitialIssuanceKey, Value: cdc.MustMarshal(&types.EpochInitialIssuance{Issuance: epochInitialIssuance})}, + {Key: types.TRKey, Value: cdc.MustMarshal(&sdk.DecProto{Dec: TR})}, + {Key: types.SRKey, Value: cdc.MustMarshal(&sdk.DecProto{Dec: SR})}, + {Key: types.TSLKey, Value: cdc.MustMarshal(&sdk.IntProto{Int: TSL})}, {Key: []byte{0x99}, Value: []byte{0x99}}, }, } diff --git a/x/treasury/types/exptected_keepers.go b/x/treasury/types/exptected_keepers.go index ba596ef3a..ee0ace2d7 100644 --- a/x/treasury/types/exptected_keepers.go +++ b/x/treasury/types/exptected_keepers.go @@ -3,8 +3,9 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - bankexported "github.com/cosmos/cosmos-sdk/x/bank/exported" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" + + oracletypes "github.com/terra-project/core/x/oracle/types" ) // AccountKeeper expected account keeper @@ -15,16 +16,11 @@ type AccountKeeper interface { // BankKeeper expected bank keeper type BankKeeper interface { - GetSupply(ctx sdk.Context) (supply bankexported.SupplyI) MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error SendCoinsFromModuleToModule(ctx sdk.Context, senderModule string, recipientModule string, amt sdk.Coins) error GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins - - // only used for simulation - SetSupply(ctx sdk.Context, supply bankexported.SupplyI) - GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin - SetBalances(ctx sdk.Context, addr sdk.AccAddress, balances sdk.Coins) error + GetSupply(ctx sdk.Context, denom string) sdk.Coin } // MarketKeeper expected market keeper @@ -45,6 +41,9 @@ type DistributionKeeper interface { // OracleKeeper defines expected oracle keeper type OracleKeeper interface { - // only used for simulation + Whitelist(ctx sdk.Context) (res oracletypes.DenomList) + + // only used for test purpose SetLunaExchangeRate(ctx sdk.Context, denom string, exchangeRate sdk.Dec) + SetWhitelist(ctx sdk.Context, whitelist oracletypes.DenomList) } diff --git a/x/treasury/types/genesis.go b/x/treasury/types/genesis.go index adfc11251..262060a91 100644 --- a/x/treasury/types/genesis.go +++ b/x/treasury/types/genesis.go @@ -53,7 +53,7 @@ func ValidateGenesis(data *GenesisState) error { // GetGenesisStateFromAppState returns x/market GenesisState given raw application // genesis state. -func GetGenesisStateFromAppState(cdc codec.JSONMarshaler, appState map[string]json.RawMessage) *GenesisState { +func GetGenesisStateFromAppState(cdc codec.JSONCodec, appState map[string]json.RawMessage) *GenesisState { var genesisState GenesisState if appState[ModuleName] != nil { diff --git a/x/vesting/module.go b/x/vesting/module.go index 9b92b03b9..0faac3b7b 100644 --- a/x/vesting/module.go +++ b/x/vesting/module.go @@ -21,7 +21,7 @@ var ( // AppModuleBasic defines the basic application module used by the oracle module. type AppModuleBasic struct { - cdc codec.Marshaler + cdc codec.Codec } // Name returns the module's name @@ -41,12 +41,12 @@ func (b AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry // DefaultGenesis returns default genesis state as raw bytes for the staking // module. -func (AppModuleBasic) DefaultGenesis(cdc codec.JSONMarshaler) json.RawMessage { +func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { return nil } // ValidateGenesis performs genesis state validation for the oracle module. -func (AppModuleBasic) ValidateGenesis(cdc codec.JSONMarshaler, config client.TxEncodingConfig, bz json.RawMessage) error { +func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { return nil } diff --git a/x/vesting/types/common_test.go b/x/vesting/types/common_test.go index 69ae737e2..57c2f2687 100644 --- a/x/vesting/types/common_test.go +++ b/x/vesting/types/common_test.go @@ -24,7 +24,7 @@ var ModuleBasics = module.NewBasicManager( ) // MakeTestCodec nolint -func MakeTestCodec(t *testing.T) codec.Marshaler { +func MakeTestCodec(t *testing.T) codec.Codec { return MakeEncodingConfig(t).Marshaler } diff --git a/x/vesting/types/vesting_account.go b/x/vesting/types/vesting_account.go index 9f89d6c9a..7f860dbb7 100644 --- a/x/vesting/types/vesting_account.go +++ b/x/vesting/types/vesting_account.go @@ -3,6 +3,7 @@ package types import ( "time" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" vestexported "github.com/cosmos/cosmos-sdk/x/auth/vesting/exported" @@ -146,9 +147,10 @@ func (lgva LazyGradedVestingAccount) MarshalYAML() (interface{}, error) { return nil, err } - alias := vestingAccountYAML{ + out := vestingAccountYAML{ Address: accAddr, AccountNumber: lgva.AccountNumber, + PubKey: getPKString(lgva), Sequence: lgva.Sequence, OriginalVesting: lgva.OriginalVesting, DelegatedFree: lgva.DelegatedFree, @@ -157,19 +159,24 @@ func (lgva LazyGradedVestingAccount) MarshalYAML() (interface{}, error) { VestingSchedules: lgva.VestingSchedules, } - if lgva.PubKey != nil { - pks, err := sdk.Bech32ifyPubKey(sdk.Bech32PubKeyTypeAccPub, lgva.GetPubKey()) - if err != nil { - return nil, err - } + return marshalYaml(out) +} + +type getPK interface { + GetPubKey() cryptotypes.PubKey +} - alias.PubKey = pks +func getPKString(g getPK) string { + if pk := g.GetPubKey(); pk != nil { + return pk.String() } + return "" +} - bz, err := yaml.Marshal(alias) +func marshalYaml(i interface{}) (interface{}, error) { + bz, err := yaml.Marshal(i) if err != nil { return nil, err } - - return string(bz), err + return string(bz), nil } diff --git a/x/wasm/common_test.go b/x/wasm/common_test.go index fdd9453a7..5683671f9 100644 --- a/x/wasm/common_test.go +++ b/x/wasm/common_test.go @@ -57,6 +57,8 @@ type state struct { Funder string `json:"funder"` } +const faucetAccountName = "faucet" + func createFakeFundedAccount( ctx sdk.Context, am authkeeper.AccountKeeper, @@ -65,7 +67,11 @@ func createFakeFundedAccount( _, _, addr := keyPubAddr() baseAcct := authtypes.NewBaseAccountWithAddress(addr) am.SetAccount(ctx, baseAcct) - bk.SetBalances(ctx, addr, coins) + if err := bk.MintCoins(ctx, faucetAccountName, coins); err != nil { + panic(err) + } + + bk.SendCoinsFromModuleToAccount(ctx, faucetAccountName, addr, coins) return addr } diff --git a/x/wasm/handler_test.go b/x/wasm/handler_test.go index e7bf46312..b3335e9d0 100644 --- a/x/wasm/handler_test.go +++ b/x/wasm/handler_test.go @@ -223,7 +223,7 @@ func TestHandleExecute(t *testing.T) { // ensure contract has updated balance contractAcct = input.AccKeeper.GetAccount(input.Ctx, contractAddr) require.NotNil(t, contractAcct) - assert.Equal(t, sdk.Coins(nil), input.BankKeeper.GetAllBalances(input.Ctx, contractAddr)) + assert.Equal(t, sdk.Coins{}, input.BankKeeper.GetAllBalances(input.Ctx, contractAddr)) iter := input.WasmKeeper.GetContractStoreIterator(input.Ctx, contractAddr) var models []types.Model @@ -312,7 +312,7 @@ func TestHandleExecuteEscrow(t *testing.T) { // ensure contract has updated balance contractAcct := input.AccKeeper.GetAccount(input.Ctx, contractAddr) require.NotNil(t, contractAcct) - assert.Equal(t, sdk.Coins(nil), input.BankKeeper.GetAllBalances(input.Ctx, contractAddr)) + assert.Equal(t, sdk.Coins{}, input.BankKeeper.GetAllBalances(input.Ctx, contractAddr)) } func TestHandleMigrate(t *testing.T) { diff --git a/x/wasm/keeper/api.go b/x/wasm/keeper/api.go index 2855224a1..a6c7b1360 100644 --- a/x/wasm/keeper/api.go +++ b/x/wasm/keeper/api.go @@ -1,8 +1,6 @@ package keeper import ( - "fmt" - cosmwasm "github.com/CosmWasm/wasmvm" sdk "github.com/cosmos/cosmos-sdk/types" @@ -13,9 +11,11 @@ import ( func (k Keeper) getCosmWasmAPI(ctx sdk.Context) cosmwasm.GoAPI { return cosmwasm.GoAPI{ HumanAddress: func(canon []byte) (humanAddr string, usedGas uint64, err error) { - if len(canon) != sdk.AddrLen { - return "", 0, fmt.Errorf("Expected %d byte address", sdk.AddrLen) + err = sdk.VerifyAddressFormat(canon) + if err != nil { + return "", 0, nil } + return sdk.AccAddress(canon).String(), types.HumanizeCost * types.GasMultiplier, nil }, CanonicalAddress: func(human string) (canonicalAddr []byte, usedGas uint64, err error) { diff --git a/x/wasm/keeper/connector.go b/x/wasm/keeper/connector.go index 0a53490a8..38810349c 100644 --- a/x/wasm/keeper/connector.go +++ b/x/wasm/keeper/connector.go @@ -178,9 +178,9 @@ func (k Keeper) handleSdkMessage(ctx sdk.Context, contractAddr sdk.AccAddress, m } // find the handler and execute it - h := k.router.Route(ctx, msg.Route()) + h := k.serviceRouter.Handler(msg) if h == nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, msg.Route()) + return nil, sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, sdk.MsgTypeURL(msg)) } res, err := h(ctx, msg) diff --git a/x/wasm/keeper/contract.go b/x/wasm/keeper/contract.go index 697c53b24..28e960104 100644 --- a/x/wasm/keeper/contract.go +++ b/x/wasm/keeper/contract.go @@ -132,7 +132,7 @@ func (k Keeper) InstantiateContract( } var codeInfo types.CodeInfo - k.cdc.MustUnmarshalBinaryBare(bz, &codeInfo) + k.cdc.MustUnmarshal(bz, &codeInfo) // prepare env and info for contract instantiate call env := types.NewEnv(ctx, contractAddress) @@ -445,7 +445,7 @@ func (k Keeper) getContractDetails(ctx sdk.Context, contractAddress sdk.AccAddre } var contractInfo types.ContractInfo - k.cdc.MustUnmarshalBinaryBare(bz, &contractInfo) + k.cdc.MustUnmarshal(bz, &contractInfo) bz = store.Get(types.GetCodeInfoKey(contractInfo.CodeID)) if bz == nil { @@ -453,7 +453,7 @@ func (k Keeper) getContractDetails(ctx sdk.Context, contractAddress sdk.AccAddre return } - k.cdc.MustUnmarshalBinaryBare(bz, &codeInfo) + k.cdc.MustUnmarshal(bz, &codeInfo) contractStoreKey := types.GetContractStoreKey(contractAddress) contractStorePrefix = prefix.NewStore(ctx.KVStore(k.storeKey), contractStoreKey) return diff --git a/x/wasm/keeper/contract_test.go b/x/wasm/keeper/contract_test.go index c7d49336b..235e5d5fe 100644 --- a/x/wasm/keeper/contract_test.go +++ b/x/wasm/keeper/contract_test.go @@ -242,7 +242,7 @@ func TestExecute(t *testing.T) { // ensure contract has updated balance contractAcct = accKeeper.GetAccount(ctx, addr) require.NotNil(t, contractAcct) - assert.Equal(t, sdk.Coins(nil), bankKeeper.GetAllBalances(input.Ctx, addr)) + assert.Equal(t, sdk.Coins{}, bankKeeper.GetAllBalances(input.Ctx, addr)) t.Logf("Duration: %v (35619 gas)\n", diff) } @@ -575,6 +575,20 @@ func TestMigrateWithDispatchedMessage(t *testing.T) { {"payout": myPayoutAddr}, }, }, + { + "Type": "coin_spent", + "Attr": []dict{ + {"spender": contractAddr}, + {"amount": "100000" + core.MicroLunaDenom}, + }, + }, + { + "Type": "coin_received", + "Attr": []dict{ + {"receiver": myPayoutAddr}, + {"amount": "100000" + core.MicroLunaDenom}, + }, + }, { "Type": "transfer", "Attr": []dict{ diff --git a/x/wasm/keeper/custom_test.go b/x/wasm/keeper/custom_test.go index d32792523..b64d5848b 100644 --- a/x/wasm/keeper/custom_test.go +++ b/x/wasm/keeper/custom_test.go @@ -301,7 +301,8 @@ func TestSellMsg(t *testing.T) { sellAmount := sdk.NewInt(rand.Int63()%10000 + 2) sellCoin := sdk.NewCoin(core.MicroLunaDenom, sellAmount) - bankKeeper.AddCoins(input.Ctx, creatorAddr, sdk.NewCoins(sellCoin)) + err := FundAccount(input, creatorAddr, sdk.NewCoins(sellCoin)) + require.NoError(t, err) retCoin, spread, err := input.MarketKeeper.ComputeSwap(input.Ctx, sellCoin, core.MicroSDRDenom) expectedRetCoins := sdk.NewCoins(sdk.NewCoin(core.MicroSDRDenom, retCoin.Amount.Mul(sdk.OneDec().Sub(spread)).TruncateInt())) diff --git a/x/wasm/keeper/keeper.go b/x/wasm/keeper/keeper.go index 5e4b4d654..f19e1a33c 100644 --- a/x/wasm/keeper/keeper.go +++ b/x/wasm/keeper/keeper.go @@ -22,15 +22,15 @@ import ( // Keeper will have a reference to Wasmer with it's own data directory. type Keeper struct { storeKey sdk.StoreKey - cdc codec.BinaryMarshaler + cdc codec.BinaryCodec paramSpace paramstypes.Subspace accountKeeper types.AccountKeeper bankKeeper types.BankKeeper treasuryKeeper types.TreasuryKeeper - router sdk.Router - queryRouter types.GRPCQueryRouter + serviceRouter types.MsgServiceRouter + queryRouter types.GRPCQueryRouter wasmVM types.WasmerEngine querier types.Querier @@ -42,13 +42,13 @@ type Keeper struct { // NewKeeper creates a new contract Keeper instance func NewKeeper( - cdc codec.BinaryMarshaler, + cdc codec.BinaryCodec, storeKey sdk.StoreKey, paramspace paramstypes.Subspace, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, treasuryKeeper types.TreasuryKeeper, - router sdk.Router, + serviceRouter types.MsgServiceRouter, queryRouter types.GRPCQueryRouter, supportedFeatures string, homePath string, @@ -77,7 +77,7 @@ func NewKeeper( accountKeeper: accountKeeper, bankKeeper: bankKeeper, treasuryKeeper: treasuryKeeper, - router: router, + serviceRouter: serviceRouter, queryRouter: queryRouter, wasmConfig: wasmConfig, msgParser: types.NewWasmMsgParser(), @@ -133,14 +133,14 @@ func (k Keeper) GetCodeInfo(ctx sdk.Context, codeID uint64) (codeInfo types.Code if bz == nil { return types.CodeInfo{}, sdkerrors.Wrapf(types.ErrNotFound, "codeID %d", codeID) } - k.cdc.MustUnmarshalBinaryBare(bz, &codeInfo) + k.cdc.MustUnmarshal(bz, &codeInfo) return } // SetCodeInfo stores CodeInfo for the given codeID func (k Keeper) SetCodeInfo(ctx sdk.Context, codeID uint64, codeInfo types.CodeInfo) { store := ctx.KVStore(k.storeKey) - bz := k.cdc.MustMarshalBinaryBare(&codeInfo) + bz := k.cdc.MustMarshal(&codeInfo) store.Set(types.GetCodeInfoKey(codeID), bz) } @@ -151,14 +151,14 @@ func (k Keeper) GetContractInfo(ctx sdk.Context, contractAddress sdk.AccAddress) if contractBz == nil { return types.ContractInfo{}, sdkerrors.Wrapf(types.ErrNotFound, "constractInfo %s", contractAddress.String()) } - k.cdc.MustUnmarshalBinaryBare(contractBz, &contractInfo) + k.cdc.MustUnmarshal(contractBz, &contractInfo) return contractInfo, nil } // SetContractInfo stores ContractInfo for the given contractAddress func (k Keeper) SetContractInfo(ctx sdk.Context, contractAddress sdk.AccAddress, codeInfo types.ContractInfo) { store := ctx.KVStore(k.storeKey) - b := k.cdc.MustMarshalBinaryBare(&codeInfo) + b := k.cdc.MustMarshal(&codeInfo) store.Set(types.GetContractInfoKey(contractAddress), b) } @@ -168,7 +168,7 @@ func (k Keeper) IterateContractInfo(ctx sdk.Context, cb func(types.ContractInfo) iter := prefixStore.Iterator(nil, nil) for ; iter.Valid(); iter.Next() { var contract types.ContractInfo - k.cdc.MustUnmarshalBinaryBare(iter.Value(), &contract) + k.cdc.MustUnmarshal(iter.Value(), &contract) // cb returns true to stop early if cb(contract) { break diff --git a/x/wasm/keeper/reflect_test.go b/x/wasm/keeper/reflect_test.go index 3bc802965..4763fecd4 100644 --- a/x/wasm/keeper/reflect_test.go +++ b/x/wasm/keeper/reflect_test.go @@ -383,7 +383,7 @@ type reflectCustomMsg struct { // toMaskRawMsg encodes an sdk msg using amino json encoding. // Then wraps it as an opaque message -func toMaskRawMsg(cdc codec.Marshaler, msg sdk.Msg) (wasmvmtypes.CosmosMsg, error) { +func toMaskRawMsg(cdc codec.Codec, msg sdk.Msg) (wasmvmtypes.CosmosMsg, error) { any, err := codectypes.NewAnyWithValue(msg) if err != nil { return wasmvmtypes.CosmosMsg{}, err diff --git a/x/wasm/keeper/staking_test.go b/x/wasm/keeper/staking_test.go index 36dcfce25..780cb8206 100644 --- a/x/wasm/keeper/staking_test.go +++ b/x/wasm/keeper/staking_test.go @@ -631,18 +631,16 @@ func setValidatorRewards( payout := sdk.NewDecCoinsFromCoins(rewards...) distKeeper.AllocateTokensToValidator(ctx, validator, payout) - // add more balances - distrAddr := accountKeeper.GetModuleAddress(distrtypes.ModuleName) - prevBalances := bankKeeper.GetAllBalances(ctx, distrAddr) - err := bankKeeper.SetBalances(ctx, distrAddr, prevBalances.Add(rewards...)) + // allocate rewards to validator by minting tokens to distr module balance + err := bankKeeper.MintCoins(ctx, faucetAccountName, rewards) if err != nil { panic(err) } - // update supply - supply := bankKeeper.GetSupply(ctx) - supply.GetTotal().Add(rewards...) - bankKeeper.SetSupply(ctx, supply) + err = bankKeeper.SendCoinsFromModuleToModule(ctx, faucetAccountName, distrtypes.ModuleName, rewards) + if err != nil { + panic(err) + } } func assertBalance(t *testing.T, ctx sdk.Context, keeper Keeper, contract sdk.AccAddress, addr sdk.AccAddress, expected string) { diff --git a/x/wasm/keeper/submsg_test.go b/x/wasm/keeper/submsg_test.go index 1c4695d4e..359623f9e 100644 --- a/x/wasm/keeper/submsg_test.go +++ b/x/wasm/keeper/submsg_test.go @@ -50,14 +50,12 @@ func TestDispatchSubMsgSuccessCase(t *testing.T) { checkAccount(t, ctx, accKeeper, bankKeeper, fred, nil) // creator can send contract's tokens to fred (using SendMsg) + sentCoins := sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, sdk.NewInt(15000))) msg := wasmvmtypes.CosmosMsg{ Bank: &wasmvmtypes.BankMsg{ Send: &wasmvmtypes.SendMsg{ ToAddress: fred.String(), - Amount: []wasmvmtypes.Coin{{ - Denom: core.MicroLunaDenom, - Amount: "15000", - }}, + Amount: types.EncodeSdkCoins(sentCoins), }, }, } @@ -98,23 +96,31 @@ func TestDispatchSubMsgSuccessCase(t *testing.T) { require.NotNil(t, res.Result.Ok) sub := res.Result.Ok assert.Empty(t, sub.Data) - require.Len(t, sub.Events, 3) + require.Len(t, sub.Events, 5) - transfer := sub.Events[0] + transfer := sub.Events[2] assert.Equal(t, "transfer", transfer.Type) assert.Equal(t, wasmvmtypes.EventAttribute{ Key: "recipient", Value: fred.String(), }, transfer.Attributes[0]) + assert.Equal(t, wasmvmtypes.EventAttribute{ + Key: "sender", + Value: contractAddr.String(), + }, transfer.Attributes[1]) + assert.Equal(t, wasmvmtypes.EventAttribute{ + Key: "amount", + Value: sentCoins.String(), + }, transfer.Attributes[2]) - sender := sub.Events[1] + sender := sub.Events[3] assert.Equal(t, "message", sender.Type) assert.Equal(t, wasmvmtypes.EventAttribute{ Key: "sender", Value: contractAddr.String(), }, sender.Attributes[0]) - module := sub.Events[2] + module := sub.Events[4] assert.Equal(t, "message", module.Type) assert.Equal(t, wasmvmtypes.EventAttribute{ Key: "module", @@ -268,7 +274,7 @@ func TestDispatchSubMsgErrorHandling(t *testing.T) { submsgID: 5, msg: validBankSend, // note we charge another 40k for the reply call - resultAssertions: []assertion{assertReturnedEvents(3), assertGasUsed(130000, 132000)}, + resultAssertions: []assertion{assertReturnedEvents(5), assertGasUsed(139000, 141000)}, }, "not enough tokens": { submsgID: 6, @@ -288,7 +294,7 @@ func TestDispatchSubMsgErrorHandling(t *testing.T) { msg: validBankSend, gasLimit: &subGasLimit, // uses same gas as call without limit - resultAssertions: []assertion{assertReturnedEvents(3), assertGasUsed(130000, 132000)}, + resultAssertions: []assertion{assertReturnedEvents(5), assertGasUsed(139000, 141000)}, }, "not enough tokens with limit": { submsgID: 16, diff --git a/x/wasm/keeper/test_utils.go b/x/wasm/keeper/test_utils.go index 8d061ed8d..a7f384461 100644 --- a/x/wasm/keeper/test_utils.go +++ b/x/wasm/keeper/test_utils.go @@ -1,8 +1,9 @@ -//nolint package keeper +//nolint +//DONTCOVER + import ( - "fmt" "testing" "time" @@ -23,25 +24,21 @@ import ( "github.com/cosmos/cosmos-sdk/std" "github.com/cosmos/cosmos-sdk/store" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/module" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" "github.com/cosmos/cosmos-sdk/x/auth/tx" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/cosmos/cosmos-sdk/x/bank" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/capability" - distr "github.com/cosmos/cosmos-sdk/x/distribution" distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer" - ibc "github.com/cosmos/cosmos-sdk/x/ibc/core" paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - "github.com/cosmos/cosmos-sdk/x/staking" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/cosmos/ibc-go/modules/apps/transfer" + ibc "github.com/cosmos/ibc-go/modules/core" customauth "github.com/terra-project/core/custom/auth" custombank "github.com/terra-project/core/custom/bank" @@ -67,6 +64,8 @@ import ( "github.com/terra-project/core/x/wasm/types" ) +const faucetAccountName = "faucet" + // ModuleBasics nolint var ModuleBasics = module.NewBasicManager( customauth.AppModuleBasic{}, @@ -82,7 +81,7 @@ var ModuleBasics = module.NewBasicManager( ) // MakeTestCodec nolint -func MakeTestCodec(t *testing.T) codec.Marshaler { +func MakeTestCodec(t *testing.T) codec.Codec { return MakeEncodingConfig(t).Marshaler } @@ -131,7 +130,7 @@ var ( sdk.ValAddress(PubKeys[2].Address()), } - InitTokens = sdk.TokensFromConsensusPower(200) + InitTokens = sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction) InitCoins = sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, InitTokens)) ) @@ -184,16 +183,17 @@ func CreateTestInput(t *testing.T) TestInput { require.NoError(t, ms.LoadLatestVersion()) blackListAddrs := map[string]bool{ + faucetAccountName: true, authtypes.FeeCollectorName: true, stakingtypes.NotBondedPoolName: true, stakingtypes.BondedPoolName: true, distrtypes.ModuleName: true, - oracletypes.ModuleName: true, markettypes.ModuleName: true, treasurytypes.ModuleName: true, } maccPerms := map[string][]string{ + faucetAccountName: {authtypes.Burner, authtypes.Minter}, authtypes.FeeCollectorName: nil, stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking}, stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking}, @@ -208,8 +208,8 @@ func CreateTestInput(t *testing.T) TestInput { accountKeeper := authkeeper.NewAccountKeeper(appCodec, keyAcc, paramsKeeper.Subspace(authtypes.ModuleName), authtypes.ProtoBaseAccount, maccPerms) bankKeeper := bankkeeper.NewBaseKeeper(appCodec, keyBank, accountKeeper, paramsKeeper.Subspace(banktypes.ModuleName), blackListAddrs) - totalSupply := sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, InitTokens.MulRaw(int64(len(Addrs))))) - bankKeeper.SetSupply(ctx, banktypes.NewSupply(totalSupply)) + totalSupply := sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, InitTokens.MulRaw(int64(len(Addrs)*10)))) + bankKeeper.MintCoins(ctx, faucetAccountName, totalSupply) bankKeeper.SetParams(ctx, banktypes.DefaultParams()) stakingKeeper := stakingkeeper.NewKeeper( @@ -245,7 +245,7 @@ func CreateTestInput(t *testing.T) TestInput { oracleAcc := authtypes.NewEmptyModuleAccount(oracletypes.ModuleName) marketAcc := authtypes.NewEmptyModuleAccount(types.ModuleName, authtypes.Burner, authtypes.Minter) - bankKeeper.SetBalances(ctx, notBondedPool.GetAddress(), sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, InitTokens.MulRaw(int64(len(Addrs)))))) + bankKeeper.SendCoinsFromModuleToModule(ctx, faucetAccountName, stakingtypes.NotBondedPoolName, sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, InitTokens.MulRaw(int64(len(Addrs)))))) accountKeeper.SetModuleAccount(ctx, feeCollectorAcc) accountKeeper.SetModuleAccount(ctx, bondPool) @@ -256,7 +256,7 @@ func CreateTestInput(t *testing.T) TestInput { for _, addr := range Addrs { accountKeeper.SetAccount(ctx, authtypes.NewBaseAccountWithAddress(addr)) - err := bankKeeper.AddCoins(ctx, addr, InitCoins) + err := bankKeeper.SendCoinsFromModuleToAccount(ctx, faucetAccountName, addr, InitCoins) require.NoError(t, err) } @@ -287,13 +287,15 @@ func CreateTestInput(t *testing.T) TestInput { treasuryKeeper := treasurykeeper.NewKeeper( appCodec, keyTreasury, paramsKeeper.Subspace(treasurytypes.ModuleName), - accountKeeper, bankKeeper, marketKeeper, stakingKeeper, distrKeeper, + accountKeeper, bankKeeper, + marketKeeper, oracleKeeper, + stakingKeeper, distrKeeper, distrtypes.ModuleName, ) treasuryKeeper.SetParams(ctx, treasurytypes.DefaultParams()) - router := baseapp.NewRouter() + router := baseapp.NewMsgServiceRouter() querier := baseapp.NewGRPCQueryRouter() banktypes.RegisterQueryServer(querier, bankKeeper) stakingtypes.RegisterQueryServer(querier, stakingkeeper.Querier{Keeper: stakingKeeper}) @@ -313,15 +315,18 @@ func CreateTestInput(t *testing.T) TestInput { config.DefaultConfig(), ) - bankHandler := bank.NewHandler(bankKeeper) - stakingHandler := staking.NewHandler(stakingKeeper) - distrHandler := distr.NewHandler(distrKeeper) - marketHandler := market.NewHandler(marketKeeper) - router.AddRoute(sdk.NewRoute(banktypes.RouterKey, bankHandler)) - router.AddRoute(sdk.NewRoute(stakingtypes.RouterKey, stakingHandler)) - router.AddRoute(sdk.NewRoute(distrtypes.RouterKey, distrHandler)) - router.AddRoute(sdk.NewRoute(markettypes.RouterKey, marketHandler)) - router.AddRoute(sdk.NewRoute(types.RouterKey, TestHandler(keeper))) + router.SetInterfaceRegistry(encodingConfig.InterfaceRegistry) + bankMsgServer := bankkeeper.NewMsgServerImpl(bankKeeper) + stakingMsgServer := stakingkeeper.NewMsgServerImpl(stakingKeeper) + distrMsgServer := distrkeeper.NewMsgServerImpl(distrKeeper) + marketMsgServer := marketkeeper.NewMsgServerImpl(marketKeeper) + wasmMsgServer := NewMsgServerImpl(keeper) + + banktypes.RegisterMsgServer(router, bankMsgServer) + stakingtypes.RegisterMsgServer(router, stakingMsgServer) + distrtypes.RegisterMsgServer(router, distrMsgServer) + markettypes.RegisterMsgServer(router, marketMsgServer) + types.RegisterMsgServer(router, wasmMsgServer) keeper.SetParams(ctx, types.DefaultParams()) keeper.RegisterQueriers(map[string]types.WasmQuerierInterface{ @@ -355,14 +360,26 @@ func CreateTestInput(t *testing.T) TestInput { keeper} } +// FundAccount is a utility function that funds an account by minting and +// sending the coins to the address. This should be used for testing purposes +// only! +func FundAccount(input TestInput, addr sdk.AccAddress, amounts sdk.Coins) error { + if err := input.BankKeeper.MintCoins(input.Ctx, faucetAccountName, amounts); err != nil { + return err + } + + return input.BankKeeper.SendCoinsFromModuleToAccount(input.Ctx, faucetAccountName, addr, amounts) +} + func createFakeFundedAccount(ctx sdk.Context, ak authkeeper.AccountKeeper, bk bankkeeper.Keeper, coins sdk.Coins) sdk.AccAddress { _, _, addr := keyPubAddr() ak.SetAccount(ctx, authtypes.NewBaseAccountWithAddress(addr)) - bk.SetBalances(ctx, addr, coins) - supply := bk.GetSupply(ctx) - supply.SetTotal(supply.GetTotal().Add(coins...)) - bk.SetSupply(ctx, supply) + if err := bk.MintCoins(ctx, faucetAccountName, coins); err != nil { + panic(err) + } + + bk.SendCoinsFromModuleToAccount(ctx, faucetAccountName, addr, coins) return addr } @@ -373,30 +390,6 @@ func keyPubAddr() (crypto.PrivKey, crypto.PubKey, sdk.AccAddress) { return key, pub, addr } -// TestHandler returns a wasm handler for tests (to avoid circular imports) -func TestHandler(k Keeper) sdk.Handler { - msgServer := NewMsgServerImpl(k) - - return func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { - ctx = ctx.WithEventManager(sdk.NewEventManager()) - - switch msg := msg.(type) { - case *types.MsgInstantiateContract: - res, err := msgServer.InstantiateContract(sdk.WrapSDKContext(ctx), msg) - return sdk.WrapServiceResult(ctx, res, err) - case *types.MsgExecuteContract: - res, err := msgServer.ExecuteContract(sdk.WrapSDKContext(ctx), msg) - return sdk.WrapServiceResult(ctx, res, err) - case *types.MsgMigrateContract: - res, err := msgServer.MigrateContract(sdk.WrapSDKContext(ctx), msg) - return sdk.WrapServiceResult(ctx, res, err) - default: - errMsg := fmt.Sprintf("unrecognized wasm message type: %T", msg) - return nil, sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, errMsg) - } - } -} - // HackatomExampleInitMsg nolint type HackatomExampleInitMsg struct { Verifier sdk.AccAddress `json:"verifier"` diff --git a/x/wasm/legacy/v05/migrate_test.go b/x/wasm/legacy/v05/migrate_test.go index 97e7110be..707cd6abe 100644 --- a/x/wasm/legacy/v05/migrate_test.go +++ b/x/wasm/legacy/v05/migrate_test.go @@ -24,7 +24,7 @@ func TestMigrate(t *testing.T) { WithInterfaceRegistry(encodingConfig.InterfaceRegistry). WithTxConfig(encodingConfig.TxConfig). WithLegacyAmino(encodingConfig.Amino). - WithJSONMarshaler(encodingConfig.Marshaler) + WithJSONCodec(encodingConfig.Marshaler) addr, err := sdk.AccAddressFromBech32("terra1mx72uukvzqtzhc6gde7shrjqfu5srk22v7gmww") require.NoError(t, err) @@ -111,7 +111,7 @@ func TestMigrate(t *testing.T) { migrated := v05wasm.Migrate(wasmGenState) - bz, err = clientCtx.JSONMarshaler.MarshalJSON(migrated) + bz, err = clientCtx.JSONCodec.MarshalJSON(migrated) require.NoError(t, err) // Indent the JSON bz correctly. diff --git a/x/wasm/module.go b/x/wasm/module.go index cebfe00f7..c5c6f4f14 100644 --- a/x/wasm/module.go +++ b/x/wasm/module.go @@ -35,7 +35,7 @@ var ( // AppModuleBasic defines the basic application module used by the wasm module. type AppModuleBasic struct { - cdc codec.Marshaler + cdc codec.Codec } // Name returns the wasm module's name. @@ -55,12 +55,12 @@ func (b AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry // DefaultGenesis returns default genesis state as raw bytes for the wasm // module. -func (AppModuleBasic) DefaultGenesis(cdc codec.JSONMarshaler) json.RawMessage { +func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { return cdc.MustMarshalJSON(types.DefaultGenesisState()) } // ValidateGenesis performs genesis state validation for the wasm module. -func (AppModuleBasic) ValidateGenesis(cdc codec.JSONMarshaler, config client.TxEncodingConfig, bz json.RawMessage) error { +func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { var data types.GenesisState if err := cdc.UnmarshalJSON(bz, &data); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) @@ -101,7 +101,7 @@ type AppModule struct { // NewAppModule creates a new AppModule object func NewAppModule( - cdc codec.Marshaler, + cdc codec.Codec, keeper keeper.Keeper, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper) AppModule { @@ -141,7 +141,7 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { // InitGenesis performs genesis initialization for the wasm module. It returns // no validator updates. -func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONMarshaler, data json.RawMessage) []abci.ValidatorUpdate { +func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { var genesisState types.GenesisState cdc.MustUnmarshalJSON(data, &genesisState) InitGenesis(ctx, am.keeper, &genesisState) @@ -151,11 +151,14 @@ func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONMarshaler, data j // ExportGenesis returns the exported genesis state as raw bytes for the wasm // module. -func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONMarshaler) json.RawMessage { +func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { gs := ExportGenesis(ctx, am.keeper) return cdc.MustMarshalJSON(gs) } +// ConsensusVersion implements AppModule/ConsensusVersion. +func (AppModule) ConsensusVersion() uint64 { return 2 } + // BeginBlock returns the begin blocker for the wasm module. func (AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {} diff --git a/x/wasm/simulation/decoder.go b/x/wasm/simulation/decoder.go index 085e79a64..2b9d2bc79 100644 --- a/x/wasm/simulation/decoder.go +++ b/x/wasm/simulation/decoder.go @@ -13,7 +13,7 @@ import ( // NewDecodeStore returns a decoder function closure that unmarshals the KVPair's // Value to the corresponding market type. -func NewDecodeStore(cdc codec.Marshaler) func(kvA, kvB kv.Pair) string { +func NewDecodeStore(cdc codec.Codec) func(kvA, kvB kv.Pair) string { return func(kvA, kvB kv.Pair) string { switch { case bytes.Equal(kvA.Key[:1], types.LastCodeIDKey): @@ -26,13 +26,13 @@ func NewDecodeStore(cdc codec.Marshaler) func(kvA, kvB kv.Pair) string { return fmt.Sprintf("lastInstanceIDA: %d\nlastInstanceIDB: %d", lastInstanceIDKeyA, lastInstanceIDKeyB) case bytes.Equal(kvA.Key[:1], types.CodeKey): var codeInfoA, codeInfoB types.CodeInfo - cdc.MustUnmarshalBinaryBare(kvA.Value, &codeInfoA) - cdc.MustUnmarshalBinaryBare(kvB.Value, &codeInfoB) + cdc.MustUnmarshal(kvA.Value, &codeInfoA) + cdc.MustUnmarshal(kvB.Value, &codeInfoB) return fmt.Sprintf("%v\n%v", codeInfoA, codeInfoB) case bytes.Equal(kvA.Key[:1], types.ContractInfoKey): var contractInfoA, contractInfoB types.ContractInfo - cdc.MustUnmarshalBinaryBare(kvA.Value, &contractInfoA) - cdc.MustUnmarshalBinaryBare(kvB.Value, &contractInfoB) + cdc.MustUnmarshal(kvA.Value, &contractInfoA) + cdc.MustUnmarshal(kvB.Value, &contractInfoB) return fmt.Sprintf("%v\n%v", contractInfoA, contractInfoB) case bytes.Equal(kvA.Key[:1], types.ContractStoreKey): return fmt.Sprintf("%v\n%v", kvA.Value, kvB.Value) diff --git a/x/wasm/simulation/decoder_test.go b/x/wasm/simulation/decoder_test.go index 086c9fc30..6b28cc313 100644 --- a/x/wasm/simulation/decoder_test.go +++ b/x/wasm/simulation/decoder_test.go @@ -41,9 +41,9 @@ func TestDecodeDistributionStore(t *testing.T) { Pairs: []kv.Pair{ {Key: types.LastCodeIDKey, Value: lastCodeIDbz}, {Key: types.LastInstanceIDKey, Value: lastInstanceIDbz}, - {Key: types.CodeKey, Value: cdc.MustMarshalBinaryBare(&codeInfo)}, - {Key: types.ContractInfoKey, Value: cdc.MustMarshalBinaryBare(&contractInfo)}, - {Key: append(types.ContractInfoKey, 0x1), Value: cdc.MustMarshalBinaryBare(&emptyAdminContractInfo)}, + {Key: types.CodeKey, Value: cdc.MustMarshal(&codeInfo)}, + {Key: types.ContractInfoKey, Value: cdc.MustMarshal(&contractInfo)}, + {Key: append(types.ContractInfoKey, 0x1), Value: cdc.MustMarshal(&emptyAdminContractInfo)}, {Key: types.ContractStoreKey, Value: contractStore}, {Key: []byte{0x99}, Value: []byte{0x99}}, }, diff --git a/x/wasm/simulation/operations.go b/x/wasm/simulation/operations.go index 93a34a7d3..e2ea9d336 100644 --- a/x/wasm/simulation/operations.go +++ b/x/wasm/simulation/operations.go @@ -36,7 +36,7 @@ const ( // WeightedOperations returns all the operations from the module with their respective weights func WeightedOperations( appParams simtypes.AppParams, - cdc codec.JSONMarshaler, + cdc codec.JSONCodec, ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper, @@ -168,7 +168,7 @@ func SimulateMsgStoreCode( return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "unable to deliver tx"), nil, err } - return simtypes.NewOperationMsg(msg, true, ""), nil, nil + return simtypes.NewOperationMsg(msg, true, "", nil), nil, nil } } @@ -236,7 +236,7 @@ func SimulateMsgInstantiateContract(ak types.AccountKeeper, bk types.BankKeeper, return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "unable to deliver tx"), nil, err } - return simtypes.NewOperationMsg(msg, true, ""), nil, nil + return simtypes.NewOperationMsg(msg, true, "", nil), nil, nil } } @@ -266,7 +266,7 @@ func SimulateMsgExecuteContract(ak types.AccountKeeper, bk types.BankKeeper, k k spendableCoins = spendableCoins.Sub(fees) spendableCoins = sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, spendableCoins.AmountOf(core.MicroLunaDenom))) - if err := bk.SendEnabledCoins(ctx, spendableCoins...); err != nil { + if err := bk.IsSendEnabledCoins(ctx, spendableCoins...); err != nil { return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgExecuteContract, "send not enabled"), nil, nil } @@ -295,7 +295,7 @@ func SimulateMsgExecuteContract(ak types.AccountKeeper, bk types.BankKeeper, k k return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "unable to deliver tx"), nil, err } - return simtypes.NewOperationMsg(msg, true, ""), nil, nil + return simtypes.NewOperationMsg(msg, true, "", nil), nil, nil } } @@ -365,7 +365,7 @@ func SimulateMsgMigrateContract( return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "unable to deliver tx"), nil, err } - return simtypes.NewOperationMsg(msg, true, ""), nil, nil + return simtypes.NewOperationMsg(msg, true, "", nil), nil, nil } } @@ -424,7 +424,7 @@ func SimulateMsgUpdateContractAdmin( return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "unable to deliver tx"), nil, err } - return simtypes.NewOperationMsg(msg, true, ""), nil, nil + return simtypes.NewOperationMsg(msg, true, "", nil), nil, nil } } @@ -478,6 +478,6 @@ func SimulateMsgClearContractAdmin( return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "unable to deliver tx"), nil, err } - return simtypes.NewOperationMsg(msg, true, ""), nil, nil + return simtypes.NewOperationMsg(msg, true, "", nil), nil, nil } } diff --git a/x/wasm/types/expected_keeper.go b/x/wasm/types/expected_keeper.go index 3b0da97b8..dbed57412 100644 --- a/x/wasm/types/expected_keeper.go +++ b/x/wasm/types/expected_keeper.go @@ -1,12 +1,13 @@ package types import ( + "github.com/cosmos/cosmos-sdk/baseapp" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - connectiontypes "github.com/cosmos/cosmos-sdk/x/ibc/core/03-connection/types" - channeltypes "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types" - ibcexported "github.com/cosmos/cosmos-sdk/x/ibc/core/exported" + connectiontypes "github.com/cosmos/ibc-go/modules/core/03-connection/types" + channeltypes "github.com/cosmos/ibc-go/modules/core/04-channel/types" + ibcexported "github.com/cosmos/ibc-go/modules/core/exported" abci "github.com/tendermint/tendermint/abci/types" ) @@ -29,9 +30,8 @@ type BankKeeper interface { SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins - SetBalances(ctx sdk.Context, addr sdk.AccAddress, balances sdk.Coins) error - SendEnabledCoin(ctx sdk.Context, coin sdk.Coin) bool - SendEnabledCoins(ctx sdk.Context, coins ...sdk.Coin) error + IsSendEnabledCoin(ctx sdk.Context, coin sdk.Coin) bool + IsSendEnabledCoins(ctx sdk.Context, coins ...sdk.Coin) error } // TreasuryKeeper - expected treasury keeper @@ -50,6 +50,11 @@ type GRPCQueryRouter interface { Route(path string) GRPCQueryHandler } +// MsgServiceRouter expected MsgServiceRouter interface +type MsgServiceRouter interface { + Handler(msg sdk.Msg) baseapp.MsgServiceHandler +} + // ChannelKeeper defines the expected IBC channel keeper type ChannelKeeper interface { GetChannel(ctx sdk.Context, srcPort, srcChan string) (channel channeltypes.Channel, found bool) diff --git a/x/wasm/types/genesis.go b/x/wasm/types/genesis.go index d89358616..8e01295cc 100644 --- a/x/wasm/types/genesis.go +++ b/x/wasm/types/genesis.go @@ -46,7 +46,7 @@ func ValidateGenesis(data *GenesisState) error { // GetGenesisStateFromAppState returns x/market GenesisState given raw application // genesis state. -func GetGenesisStateFromAppState(cdc codec.JSONMarshaler, appState map[string]json.RawMessage) *GenesisState { +func GetGenesisStateFromAppState(cdc codec.JSONCodec, appState map[string]json.RawMessage) *GenesisState { var genesisState GenesisState if appState[ModuleName] != nil { diff --git a/x/wasm/types/keys.go b/x/wasm/types/keys.go index 71f59d488..064291b57 100644 --- a/x/wasm/types/keys.go +++ b/x/wasm/types/keys.go @@ -2,6 +2,7 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/address" ) const ( @@ -49,10 +50,10 @@ func GetCodeInfoKey(codeID uint64) []byte { // GetContractInfoKey returns the key of the WASM contract info for the contract address func GetContractInfoKey(addr sdk.AccAddress) []byte { - return append(ContractInfoKey, addr...) + return append(ContractInfoKey, address.MustLengthPrefix(addr)...) } // GetContractStoreKey returns the store prefix for the WASM contract store func GetContractStoreKey(addr sdk.AccAddress) []byte { - return append(ContractStoreKey, addr...) + return append(ContractStoreKey, address.MustLengthPrefix(addr)...) } From 21606aae4bc2aa5240d69eeff60580884ed9415c Mon Sep 17 00:00:00 2001 From: Yun Yeo Date: Fri, 14 May 2021 12:31:44 +0900 Subject: [PATCH 2/8] add address verifier --- cmd/terrad/root.go | 1 + go.mod | 1 - types/alias.go | 1 + types/util/{prefix.go => address.go} | 13 +++++++++++++ x/market/keeper/test_utils.go | 6 ++++-- x/wasm/keeper/test_utils.go | 16 +++++++++++----- 6 files changed, 30 insertions(+), 8 deletions(-) rename types/util/{prefix.go => address.go} (77%) diff --git a/cmd/terrad/root.go b/cmd/terrad/root.go index c9a1aefa7..6c9286822 100644 --- a/cmd/terrad/root.go +++ b/cmd/terrad/root.go @@ -51,6 +51,7 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) { sdkConfig.SetBech32PrefixForAccount(core.Bech32PrefixAccAddr, core.Bech32PrefixAccPub) sdkConfig.SetBech32PrefixForValidator(core.Bech32PrefixValAddr, core.Bech32PrefixValPub) sdkConfig.SetBech32PrefixForConsensusNode(core.Bech32PrefixConsAddr, core.Bech32PrefixConsPub) + sdkConfig.SetAddressVerifier(core.AddressVerifier) sdkConfig.Seal() initClientCtx := client.Context{}. diff --git a/go.mod b/go.mod index b128416e7..b34374c00 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,6 @@ require ( github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/pkg/errors v0.9.1 github.com/rakyll/statik v0.1.7 - github.com/regen-network/cosmos-proto v0.3.1 github.com/spf13/cast v1.3.1 github.com/spf13/cobra v1.1.3 github.com/spf13/pflag v1.0.5 diff --git a/types/alias.go b/types/alias.go index 06772b64e..812fdfe5e 100644 --- a/types/alias.go +++ b/types/alias.go @@ -40,4 +40,5 @@ const ( // functions aliases var ( IsPeriodLastBlock = util.IsPeriodLastBlock + AddressVerifier = util.AddressVerifier ) diff --git a/types/util/prefix.go b/types/util/address.go similarity index 77% rename from types/util/prefix.go rename to types/util/address.go index 025b592f1..33e34bb3f 100644 --- a/types/util/prefix.go +++ b/types/util/address.go @@ -1,5 +1,7 @@ package util +import "fmt" + const ( // Bech32PrefixAccAddr defines the Bech32 prefix of an account's address Bech32PrefixAccAddr = "terra" @@ -14,3 +16,14 @@ const ( // Bech32PrefixConsPub defines the Bech32 prefix of a consensus node public key Bech32PrefixConsPub = "terravalconspub" ) + +var ( + // AddressVerifier terra address verifier + AddressVerifier = func(bz []byte) error { + if n := len(bz); n == 20 { + return fmt.Errorf("incorrect address length %d", n) + } + + return nil + } +) diff --git a/x/market/keeper/test_utils.go b/x/market/keeper/test_utils.go index 6a3a17be0..c3bf484eb 100644 --- a/x/market/keeper/test_utils.go +++ b/x/market/keeper/test_utils.go @@ -174,7 +174,8 @@ func CreateTestInput(t *testing.T) TestInput { bankKeeper := bankkeeper.NewBaseKeeper(appCodec, keyBank, accountKeeper, paramsKeeper.Subspace(banktypes.ModuleName), blackListAddrs) totalSupply := sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, InitTokens.MulRaw(int64(len(Addrs)*10)))) - bankKeeper.MintCoins(ctx, faucetAccountName, totalSupply) + err := bankKeeper.MintCoins(ctx, faucetAccountName, totalSupply) + require.NoError(t, err) stakingKeeper := stakingkeeper.NewKeeper( appCodec, @@ -209,7 +210,8 @@ func CreateTestInput(t *testing.T) TestInput { oracleAcc := authtypes.NewEmptyModuleAccount(oracletypes.ModuleName) marketAcc := authtypes.NewEmptyModuleAccount(types.ModuleName, authtypes.Burner, authtypes.Minter) - bankKeeper.SendCoinsFromModuleToModule(ctx, faucetAccountName, stakingtypes.NotBondedPoolName, sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, InitTokens.MulRaw(int64(len(Addrs)))))) + err = bankKeeper.SendCoinsFromModuleToModule(ctx, faucetAccountName, stakingtypes.NotBondedPoolName, sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, InitTokens.MulRaw(int64(len(Addrs)))))) + require.NoError(t, err) accountKeeper.SetModuleAccount(ctx, feeCollectorAcc) accountKeeper.SetModuleAccount(ctx, bondPool) diff --git a/x/wasm/keeper/test_utils.go b/x/wasm/keeper/test_utils.go index a7f384461..47950cec5 100644 --- a/x/wasm/keeper/test_utils.go +++ b/x/wasm/keeper/test_utils.go @@ -16,6 +16,9 @@ import ( tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/cosmos/ibc-go/modules/apps/transfer" + ibc "github.com/cosmos/ibc-go/modules/core" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -37,8 +40,6 @@ import ( paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/cosmos/ibc-go/modules/apps/transfer" - ibc "github.com/cosmos/ibc-go/modules/core" customauth "github.com/terra-project/core/custom/auth" custombank "github.com/terra-project/core/custom/bank" @@ -209,7 +210,9 @@ func CreateTestInput(t *testing.T) TestInput { bankKeeper := bankkeeper.NewBaseKeeper(appCodec, keyBank, accountKeeper, paramsKeeper.Subspace(banktypes.ModuleName), blackListAddrs) totalSupply := sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, InitTokens.MulRaw(int64(len(Addrs)*10)))) - bankKeeper.MintCoins(ctx, faucetAccountName, totalSupply) + err := bankKeeper.MintCoins(ctx, faucetAccountName, totalSupply) + require.NoError(t, err) + bankKeeper.SetParams(ctx, banktypes.DefaultParams()) stakingKeeper := stakingkeeper.NewKeeper( @@ -245,7 +248,8 @@ func CreateTestInput(t *testing.T) TestInput { oracleAcc := authtypes.NewEmptyModuleAccount(oracletypes.ModuleName) marketAcc := authtypes.NewEmptyModuleAccount(types.ModuleName, authtypes.Burner, authtypes.Minter) - bankKeeper.SendCoinsFromModuleToModule(ctx, faucetAccountName, stakingtypes.NotBondedPoolName, sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, InitTokens.MulRaw(int64(len(Addrs)))))) + err = bankKeeper.SendCoinsFromModuleToModule(ctx, faucetAccountName, stakingtypes.NotBondedPoolName, sdk.NewCoins(sdk.NewCoin(core.MicroLunaDenom, InitTokens.MulRaw(int64(len(Addrs)))))) + require.NoError(t, err) accountKeeper.SetModuleAccount(ctx, feeCollectorAcc) accountKeeper.SetModuleAccount(ctx, bondPool) @@ -379,7 +383,9 @@ func createFakeFundedAccount(ctx sdk.Context, ak authkeeper.AccountKeeper, bk ba panic(err) } - bk.SendCoinsFromModuleToAccount(ctx, faucetAccountName, addr, coins) + if err := bk.SendCoinsFromModuleToAccount(ctx, faucetAccountName, addr, coins); err != nil { + panic(err) + } return addr } From 37b6a15f3fb6e55507064e01265f4367264151ab Mon Sep 17 00:00:00 2001 From: Yun Yeo Date: Fri, 14 May 2021 12:35:17 +0900 Subject: [PATCH 3/8] revert gitflow --- .github/workflows/proto.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/proto.yml b/.github/workflows/proto.yml index 85c897215..79059e759 100644 --- a/.github/workflows/proto.yml +++ b/.github/workflows/proto.yml @@ -15,7 +15,6 @@ jobs: - name: lint run: make proto-lint breakage: - if: ${{ github.event.label.name != 'proto-breaking' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@master From 690fd17fc25d2fec747ed4c1d255d4805ec5610f Mon Sep 17 00:00:00 2001 From: Yun Yeo Date: Mon, 17 May 2021 17:55:28 +0900 Subject: [PATCH 4/8] fix address verifier condition --- types/util/address.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/util/address.go b/types/util/address.go index 33e34bb3f..db365b342 100644 --- a/types/util/address.go +++ b/types/util/address.go @@ -20,7 +20,7 @@ const ( var ( // AddressVerifier terra address verifier AddressVerifier = func(bz []byte) error { - if n := len(bz); n == 20 { + if n := len(bz); n != 20 { return fmt.Errorf("incorrect address length %d", n) } From 37b7ba28db198ae26e9c534574323f765a89d987 Mon Sep 17 00:00:00 2001 From: Yun Yeo Date: Mon, 17 May 2021 18:05:22 +0900 Subject: [PATCH 5/8] remove not used TODO comments --- app/legacy/migrate.go | 4 ---- x/wasm/keeper/legacy_querier.go | 2 -- 2 files changed, 6 deletions(-) diff --git a/app/legacy/migrate.go b/app/legacy/migrate.go index e228d2adf..5d5bcc3f3 100644 --- a/app/legacy/migrate.go +++ b/app/legacy/migrate.go @@ -1,9 +1,5 @@ package legacy -// TODO change this script to columbus-4 to columbus-5 migration script -//This file implements a genesis migration from cosmoshub-3 to cosmoshub-4. It migrates state from the modules in cosmoshub-3. -//This file also implements setting an initial height from an upgrade. - import ( "encoding/json" "fmt" diff --git a/x/wasm/keeper/legacy_querier.go b/x/wasm/keeper/legacy_querier.go index caa85e0d9..635cfb52b 100644 --- a/x/wasm/keeper/legacy_querier.go +++ b/x/wasm/keeper/legacy_querier.go @@ -120,8 +120,6 @@ func queryContractStore(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacy defer func() { if r := recover(); r != nil { switch rType := r.(type) { - // TODO: Use ErrOutOfGas instead of ErrorOutOfGas which would allow us - // to keep the stracktrace. case sdk.ErrorOutOfGas: err = sdkerrors.Wrap( sdkerrors.ErrOutOfGas, fmt.Sprintf( From 580623383140ec4d63284a6d1720fe415d9dfba1 Mon Sep 17 00:00:00 2001 From: Yun Yeo Date: Mon, 17 May 2021 18:15:03 +0900 Subject: [PATCH 6/8] fix migration script --- app/legacy/v05/migrate.go | 7 +-- custom/gov/legacy/{v040 => v043}/migrate.go | 58 ++++++++++----------- 2 files changed, 33 insertions(+), 32 deletions(-) rename custom/gov/legacy/{v040 => v043}/migrate.go (83%) diff --git a/app/legacy/v05/migrate.go b/app/legacy/v05/migrate.go index 25e62b7e2..7e53c5eb5 100644 --- a/app/legacy/v05/migrate.go +++ b/app/legacy/v05/migrate.go @@ -25,12 +25,13 @@ import ( v040slashing "github.com/cosmos/cosmos-sdk/x/slashing/legacy/v040" v038staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v038" v040staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v040" + v043staking "github.com/cosmos/cosmos-sdk/x/staking/legacy/v043" v039authcustom "github.com/terra-project/core/custom/auth/legacy/v039" v040authcustom "github.com/terra-project/core/custom/auth/legacy/v040" v036distrcustom "github.com/terra-project/core/custom/distribution/legacy/v036" v036govcustom "github.com/terra-project/core/custom/gov/legacy/v036" - v040govcustom "github.com/terra-project/core/custom/gov/legacy/v040" + v043govcustom "github.com/terra-project/core/custom/gov/legacy/v043" v036paramscustom "github.com/terra-project/core/custom/params/legacy/v036" v038upgradecustom "github.com/terra-project/core/custom/upgrade/legacy/v038" @@ -157,7 +158,7 @@ func Migrate(appState types.AppMap, clientCtx client.Context) types.AppMap { // Migrate relative source genesis application state and marshal it into // the respective key. - appState[v040gov.ModuleName] = v05Codec.MustMarshalJSON(v040govcustom.Migrate(govGenState)) + appState[v040gov.ModuleName] = v05Codec.MustMarshalJSON(v043govcustom.Migrate(govGenState)) } // Migrate x/mint. @@ -199,7 +200,7 @@ func Migrate(appState types.AppMap, clientCtx client.Context) types.AppMap { // Migrate relative source genesis application state and marshal it into // the respective key. - appState[v040staking.ModuleName] = v05Codec.MustMarshalJSON(v040staking.Migrate(stakingGenState)) + appState[v040staking.ModuleName] = v05Codec.MustMarshalJSON(v043staking.MigrateJSON(v040staking.Migrate(stakingGenState))) } // Migrate x/genutil diff --git a/custom/gov/legacy/v040/migrate.go b/custom/gov/legacy/v043/migrate.go similarity index 83% rename from custom/gov/legacy/v040/migrate.go rename to custom/gov/legacy/v043/migrate.go index ac3643a78..4583a9429 100644 --- a/custom/gov/legacy/v040/migrate.go +++ b/custom/gov/legacy/v043/migrate.go @@ -1,4 +1,4 @@ -package v040 +package v043 import ( "fmt" @@ -11,7 +11,7 @@ import ( v040distr "github.com/cosmos/cosmos-sdk/x/distribution/types" v034gov "github.com/cosmos/cosmos-sdk/x/gov/legacy/v034" v036gov "github.com/cosmos/cosmos-sdk/x/gov/legacy/v036" - v040gov "github.com/cosmos/cosmos-sdk/x/gov/types" + v043gov "github.com/cosmos/cosmos-sdk/x/gov/types" v036params "github.com/cosmos/cosmos-sdk/x/params/legacy/v036" v040params "github.com/cosmos/cosmos-sdk/x/params/types/proposal" v038upgrade "github.com/cosmos/cosmos-sdk/x/upgrade/legacy/v038" @@ -21,48 +21,48 @@ import ( v05treasury "github.com/terra-project/core/x/treasury/types" ) -func migrateVoteOption(oldVoteOption v034gov.VoteOption) v040gov.VoteOption { +func migrateVoteOption(oldVoteOption v034gov.VoteOption) v043gov.VoteOption { switch oldVoteOption { case v034gov.OptionEmpty: - return v040gov.OptionEmpty + return v043gov.OptionEmpty case v034gov.OptionYes: - return v040gov.OptionYes + return v043gov.OptionYes case v034gov.OptionAbstain: - return v040gov.OptionAbstain + return v043gov.OptionAbstain case v034gov.OptionNo: - return v040gov.OptionNo + return v043gov.OptionNo case v034gov.OptionNoWithVeto: - return v040gov.OptionNoWithVeto + return v043gov.OptionNoWithVeto default: panic(fmt.Errorf("'%s' is not a valid vote option", oldVoteOption)) } } -func migrateProposalStatus(oldProposalStatus v034gov.ProposalStatus) v040gov.ProposalStatus { +func migrateProposalStatus(oldProposalStatus v034gov.ProposalStatus) v043gov.ProposalStatus { switch oldProposalStatus { case v034gov.StatusNil: - return v040gov.StatusNil + return v043gov.StatusNil case v034gov.StatusDepositPeriod: - return v040gov.StatusDepositPeriod + return v043gov.StatusDepositPeriod case v034gov.StatusVotingPeriod: - return v040gov.StatusVotingPeriod + return v043gov.StatusVotingPeriod case v034gov.StatusPassed: - return v040gov.StatusPassed + return v043gov.StatusPassed case v034gov.StatusRejected: - return v040gov.StatusRejected + return v043gov.StatusRejected case v034gov.StatusFailed: - return v040gov.StatusFailed + return v043gov.StatusFailed default: panic(fmt.Errorf("'%s' is not a valid proposal status", oldProposalStatus)) @@ -75,7 +75,7 @@ func migrateContent(oldContent v036gov.Content) *codectypes.Any { switch oldContent := oldContent.(type) { case v036gov.TextProposal: { - protoProposal = &v040gov.TextProposal{ + protoProposal = &v043gov.TextProposal{ Title: oldContent.Title, Description: oldContent.Description, } @@ -168,32 +168,32 @@ func migrateContent(oldContent v036gov.Content) *codectypes.Any { // - Migrate proposal content to Any. // - Convert addresses from bytes to bech32 strings. // - Re-encode in v0.40 GenesisState. -func Migrate(oldGovState v036gov.GenesisState) *v040gov.GenesisState { - newDeposits := make([]v040gov.Deposit, len(oldGovState.Deposits)) +func Migrate(oldGovState v036gov.GenesisState) *v043gov.GenesisState { + newDeposits := make([]v043gov.Deposit, len(oldGovState.Deposits)) for i, oldDeposit := range oldGovState.Deposits { - newDeposits[i] = v040gov.Deposit{ + newDeposits[i] = v043gov.Deposit{ ProposalId: oldDeposit.ProposalID, Depositor: oldDeposit.Depositor.String(), Amount: oldDeposit.Amount, } } - newVotes := make([]v040gov.Vote, len(oldGovState.Votes)) + newVotes := make([]v043gov.Vote, len(oldGovState.Votes)) for i, oldVote := range oldGovState.Votes { - newVotes[i] = v040gov.Vote{ + newVotes[i] = v043gov.Vote{ ProposalId: oldVote.ProposalID, Voter: oldVote.Voter.String(), - Options: []v040gov.WeightedVoteOption{{Option: migrateVoteOption(oldVote.Option), Weight: sdk.NewDec(1)}}, + Options: []v043gov.WeightedVoteOption{{Option: migrateVoteOption(oldVote.Option), Weight: sdk.NewDec(1)}}, } } - newProposals := make([]v040gov.Proposal, len(oldGovState.Proposals)) + newProposals := make([]v043gov.Proposal, len(oldGovState.Proposals)) for i, oldProposal := range oldGovState.Proposals { - newProposals[i] = v040gov.Proposal{ + newProposals[i] = v043gov.Proposal{ ProposalId: oldProposal.ProposalID, Content: migrateContent(oldProposal.Content), Status: migrateProposalStatus(oldProposal.Status), - FinalTallyResult: v040gov.TallyResult{ + FinalTallyResult: v043gov.TallyResult{ Yes: oldProposal.FinalTallyResult.Yes, Abstain: oldProposal.FinalTallyResult.Abstain, No: oldProposal.FinalTallyResult.No, @@ -207,19 +207,19 @@ func Migrate(oldGovState v036gov.GenesisState) *v040gov.GenesisState { } } - return &v040gov.GenesisState{ + return &v043gov.GenesisState{ StartingProposalId: oldGovState.StartingProposalID, Deposits: newDeposits, Votes: newVotes, Proposals: newProposals, - DepositParams: v040gov.DepositParams{ + DepositParams: v043gov.DepositParams{ MinDeposit: oldGovState.DepositParams.MinDeposit, MaxDepositPeriod: oldGovState.DepositParams.MaxDepositPeriod, }, - VotingParams: v040gov.VotingParams{ + VotingParams: v043gov.VotingParams{ VotingPeriod: oldGovState.VotingParams.VotingPeriod, }, - TallyParams: v040gov.TallyParams{ + TallyParams: v043gov.TallyParams{ Quorum: oldGovState.TallyParams.Quorum, Threshold: oldGovState.TallyParams.Threshold, VetoThreshold: oldGovState.TallyParams.Veto, From 7f3d48435cd324664a9cace6f0dd6de4a1868f7e Mon Sep 17 00:00:00 2001 From: Yun Yeo Date: Mon, 17 May 2021 18:26:16 +0900 Subject: [PATCH 7/8] fix test --- app/app.go | 3 ++- x/oracle/keeper/keeper.go | 8 ++++---- x/oracle/keeper/keeper_test.go | 3 ++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/app.go b/app/app.go index 833a5c581..97b977d99 100644 --- a/app/app.go +++ b/app/app.go @@ -518,7 +518,8 @@ func NewTerraApp( // transactions app.sm = module.NewSimulationManager( customauth.NewAppModule(appCodec, app.AccountKeeper, customauthsim.RandomGenesisAccounts), - authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), + // TODO - uncomment when v0.43.0 fix the simulation bug + // authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), custombank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper), capability.NewAppModule(appCodec, *app.CapabilityKeeper), feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), diff --git a/x/oracle/keeper/keeper.go b/x/oracle/keeper/keeper.go index 067b27d8a..7394a51bb 100644 --- a/x/oracle/keeper/keeper.go +++ b/x/oracle/keeper/keeper.go @@ -153,7 +153,7 @@ func (k Keeper) IterateFeederDelegations(ctx sdk.Context, iter := sdk.KVStorePrefixIterator(store, types.FeederDelegationKey) defer iter.Close() for ; iter.Valid(); iter.Next() { - delegator := sdk.ValAddress(iter.Key()[len(types.FeederDelegationKey):]) + delegator := sdk.ValAddress(iter.Key()[2:]) delegate := sdk.AccAddress(iter.Value()) if handler(delegator, delegate) { @@ -200,7 +200,7 @@ func (k Keeper) IterateMissCounters(ctx sdk.Context, iter := sdk.KVStorePrefixIterator(store, types.MissCounterKey) defer iter.Close() for ; iter.Valid(); iter.Next() { - operator := sdk.ValAddress(iter.Key()[len(types.MissCounterKey):]) + operator := sdk.ValAddress(iter.Key()[2:]) var missCounter gogotypes.UInt64Value k.cdc.MustUnmarshal(iter.Value(), &missCounter) @@ -246,7 +246,7 @@ func (k Keeper) IterateAggregateExchangeRatePrevotes(ctx sdk.Context, handler fu iter := sdk.KVStorePrefixIterator(store, types.AggregateExchangeRatePrevoteKey) defer iter.Close() for ; iter.Valid(); iter.Next() { - voterAddr := sdk.ValAddress(iter.Key()[1:]) + voterAddr := sdk.ValAddress(iter.Key()[2:]) var aggregatePrevote types.AggregateExchangeRatePrevote k.cdc.MustUnmarshal(iter.Value(), &aggregatePrevote) @@ -290,7 +290,7 @@ func (k Keeper) IterateAggregateExchangeRateVotes(ctx sdk.Context, handler func( iter := sdk.KVStorePrefixIterator(store, types.AggregateExchangeRateVoteKey) defer iter.Close() for ; iter.Valid(); iter.Next() { - voterAddr := sdk.ValAddress(iter.Key()[1:]) + voterAddr := sdk.ValAddress(iter.Key()[2:]) var aggregateVote types.AggregateExchangeRateVote k.cdc.MustUnmarshal(iter.Value(), &aggregateVote) diff --git a/x/oracle/keeper/keeper_test.go b/x/oracle/keeper/keeper_test.go index 03c29023b..76c684aeb 100644 --- a/x/oracle/keeper/keeper_test.go +++ b/x/oracle/keeper/keeper_test.go @@ -10,6 +10,7 @@ import ( "github.com/terra-project/core/x/oracle/types" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/address" ) func TestExchangeRate(t *testing.T) { @@ -293,7 +294,7 @@ func TestAggregateVoteIterate(t *testing.T) { input.OracleKeeper.SetAggregateExchangeRateVote(input.Ctx, sdk.ValAddress(Addrs[1]), aggregateVote2) i := 0 - bigger := bytes.Compare(Addrs[0], Addrs[1]) + bigger := bytes.Compare(address.MustLengthPrefix(Addrs[0]), address.MustLengthPrefix(Addrs[1])) input.OracleKeeper.IterateAggregateExchangeRateVotes(input.Ctx, func(voter sdk.ValAddress, p types.AggregateExchangeRateVote) (stop bool) { if (i == 0 && bigger == -1) || (i == 1 && bigger == 1) { require.Equal(t, aggregateVote1, p) From a73a08ae93fbeb1bad295413c18885d45f72a203 Mon Sep 17 00:00:00 2001 From: Yun Yeo Date: Mon, 17 May 2021 18:58:20 +0900 Subject: [PATCH 8/8] pass proto codec for wasm simulation --- app/app.go | 4 ++-- x/wasm/keeper/connector.go | 3 +++ x/wasm/module.go | 8 ++++++-- x/wasm/simulation/operations.go | 28 +++++++++++++++++++--------- 4 files changed, 30 insertions(+), 13 deletions(-) diff --git a/app/app.go b/app/app.go index 97b977d99..5f2da08c7 100644 --- a/app/app.go +++ b/app/app.go @@ -468,7 +468,7 @@ func NewTerraApp( market.NewAppModule(appCodec, app.MarketKeeper, app.AccountKeeper, app.BankKeeper, app.OracleKeeper), oracle.NewAppModule(appCodec, app.OracleKeeper, app.AccountKeeper, app.BankKeeper), treasury.NewAppModule(appCodec, app.TreasuryKeeper), - wasm.NewAppModule(appCodec, app.WasmKeeper, app.AccountKeeper, app.BankKeeper), + wasm.NewAppModule(appCodec, app.WasmKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), ) // During begin block slashing happens after distr.BeginBlocker so that @@ -535,7 +535,7 @@ func NewTerraApp( oracle.NewAppModule(appCodec, app.OracleKeeper, app.AccountKeeper, app.BankKeeper), market.NewAppModule(appCodec, app.MarketKeeper, app.AccountKeeper, app.BankKeeper, app.OracleKeeper), treasury.NewAppModule(appCodec, app.TreasuryKeeper), - wasm.NewAppModule(appCodec, app.WasmKeeper, app.AccountKeeper, app.BankKeeper), + wasm.NewAppModule(appCodec, app.WasmKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), ) app.sm.RegisterStoreDecoders() diff --git a/x/wasm/keeper/connector.go b/x/wasm/keeper/connector.go index 38810349c..da111935b 100644 --- a/x/wasm/keeper/connector.go +++ b/x/wasm/keeper/connector.go @@ -1,6 +1,8 @@ package keeper import ( + "fmt" + wasmvmtypes "github.com/CosmWasm/wasmvm/types" "github.com/terra-project/core/custom/auth/ante" "github.com/terra-project/core/x/wasm/types" @@ -148,6 +150,7 @@ func (k Keeper) dispatchMessage(ctx sdk.Context, contractAddr sdk.AccAddress, ms } } + fmt.Println("SIBONG", msg, sdkMsg) res, err := k.handleSdkMessage(ctx, contractAddr, sdkMsg) if err != nil { return nil, nil, err diff --git a/x/wasm/module.go b/x/wasm/module.go index c5c6f4f14..77cde481f 100644 --- a/x/wasm/module.go +++ b/x/wasm/module.go @@ -97,6 +97,7 @@ type AppModule struct { keeper keeper.Keeper accountKeeper types.AccountKeeper bankKeeper types.BankKeeper + registry codectypes.InterfaceRegistry } // NewAppModule creates a new AppModule object @@ -104,12 +105,14 @@ func NewAppModule( cdc codec.Codec, keeper keeper.Keeper, accountKeeper types.AccountKeeper, - bankKeeper types.BankKeeper) AppModule { + bankKeeper types.BankKeeper, + registry codectypes.InterfaceRegistry) AppModule { return AppModule{ AppModuleBasic: AppModuleBasic{cdc}, keeper: keeper, accountKeeper: accountKeeper, bankKeeper: bankKeeper, + registry: registry, } } @@ -194,8 +197,9 @@ func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) { // WeightedOperations returns the all the wasm module operations with their respective weights. func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation { + protoCdc := codec.NewProtoCodec(am.registry) return simulation.WeightedOperations( simState.AppParams, simState.Cdc, - am.accountKeeper, am.bankKeeper, am.keeper, + am.accountKeeper, am.bankKeeper, am.keeper, protoCdc, ) } diff --git a/x/wasm/simulation/operations.go b/x/wasm/simulation/operations.go index e2ea9d336..97b0a1a08 100644 --- a/x/wasm/simulation/operations.go +++ b/x/wasm/simulation/operations.go @@ -40,6 +40,7 @@ func WeightedOperations( ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper, + protoCdc *codec.ProtoCodec, ) simulation.WeightedOperations { var weightMsgStoreCode int var weightMsgInstantiateContract int @@ -90,15 +91,15 @@ func WeightedOperations( ), simulation.NewWeightedOperation( weightMsgInstantiateContract, - SimulateMsgInstantiateContract(ak, bk, k), + SimulateMsgInstantiateContract(ak, bk, k, protoCdc), ), simulation.NewWeightedOperation( weightMsgExecuteContract, - SimulateMsgExecuteContract(ak, bk, k), + SimulateMsgExecuteContract(ak, bk, k, protoCdc), ), simulation.NewWeightedOperation( weightMsgMigrateContract, - SimulateMsgMigrateContract(ak, bk, k), + SimulateMsgMigrateContract(ak, bk, k, protoCdc), ), simulation.NewWeightedOperation( weightMsgUpdateContractAdmin, @@ -185,7 +186,11 @@ func keyPubAddr() (crypto.PrivKey, crypto.PubKey, sdk.AccAddress) { } // nolint: funlen -func SimulateMsgInstantiateContract(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation { +func SimulateMsgInstantiateContract( + ak types.AccountKeeper, + bk types.BankKeeper, + k keeper.Keeper, + protoCdc *codec.ProtoCodec) simtypes.Operation { return func( r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { @@ -236,12 +241,16 @@ func SimulateMsgInstantiateContract(ak types.AccountKeeper, bk types.BankKeeper, return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "unable to deliver tx"), nil, err } - return simtypes.NewOperationMsg(msg, true, "", nil), nil, nil + return simtypes.NewOperationMsg(msg, true, "", protoCdc), nil, nil } } // nolint: funlen -func SimulateMsgExecuteContract(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation { +func SimulateMsgExecuteContract( + ak types.AccountKeeper, + bk types.BankKeeper, + k keeper.Keeper, + protoCdc *codec.ProtoCodec) simtypes.Operation { return func( r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { @@ -295,7 +304,7 @@ func SimulateMsgExecuteContract(ak types.AccountKeeper, bk types.BankKeeper, k k return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "unable to deliver tx"), nil, err } - return simtypes.NewOperationMsg(msg, true, "", nil), nil, nil + return simtypes.NewOperationMsg(msg, true, "", protoCdc), nil, nil } } @@ -303,7 +312,8 @@ func SimulateMsgExecuteContract(ak types.AccountKeeper, bk types.BankKeeper, k k func SimulateMsgMigrateContract( ak types.AccountKeeper, bk types.BankKeeper, - k keeper.Keeper) simtypes.Operation { + k keeper.Keeper, + protoCdc *codec.ProtoCodec) simtypes.Operation { return func( r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { @@ -365,7 +375,7 @@ func SimulateMsgMigrateContract( return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "unable to deliver tx"), nil, err } - return simtypes.NewOperationMsg(msg, true, "", nil), nil, nil + return simtypes.NewOperationMsg(msg, true, "", protoCdc), nil, nil } }