diff --git a/app/ante/ante.go b/app/ante/ante.go index 5599f6f1..b22c7644 100644 --- a/app/ante/ante.go +++ b/app/ante/ante.go @@ -9,26 +9,28 @@ import ( authante "github.com/cosmos/cosmos-sdk/x/auth/ante" authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" vesting "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" - ibcante "github.com/cosmos/ibc-go/v3/modules/core/ante" - ibckeeper "github.com/cosmos/ibc-go/v3/modules/core/keeper" + ibcante "github.com/cosmos/ibc-go/v6/modules/core/ante" + ibckeeper "github.com/cosmos/ibc-go/v6/modules/core/keeper" + evmante "github.com/evmos/ethermint/app/ante" + evmtypes "github.com/evmos/ethermint/x/evm/types" tmlog "github.com/tendermint/tendermint/libs/log" - evmante "github.com/tharsis/ethermint/app/ante" - evmtypes "github.com/tharsis/ethermint/x/evm/types" ) // HandlerOptions extend the SDK's AnteHandler options by requiring the IBC // channel keeper, EVM Keeper and Fee Market Keeper. type HandlerOptions struct { - AccountKeeper evmtypes.AccountKeeper - BankKeeper evmtypes.BankKeeper - IBCKeeper *ibckeeper.Keeper - EvmKeeper evmante.EVMKeeper - FeegrantKeeper authante.FeegrantKeeper - SignModeHandler authsigning.SignModeHandler - SigGasConsumer authante.SignatureVerificationGasConsumer - FeeMarketKeeper evmtypes.FeeMarketKeeper - MaxTxGasWanted uint64 - AddressFetchers []AddressFetcher + AccountKeeper evmtypes.AccountKeeper + BankKeeper evmtypes.BankKeeper + IBCKeeper *ibckeeper.Keeper + EvmKeeper evmante.EVMKeeper + FeegrantKeeper authante.FeegrantKeeper + SignModeHandler authsigning.SignModeHandler + SigGasConsumer authante.SignatureVerificationGasConsumer + FeeMarketKeeper evmtypes.FeeMarketKeeper + MaxTxGasWanted uint64 + AddressFetchers []AddressFetcher + ExtensionOptionChecker authante.ExtensionOptionChecker + TxFeeChecker authante.TxFeeChecker } func (options HandlerOptions) Validate() error { @@ -122,7 +124,7 @@ func newCosmosAnteHandler(options cosmosHandlerOptions) sdk.AnteHandler { ) if !options.isEIP712 { - decorators = append(decorators, authante.NewRejectExtensionOptionsDecorator()) + decorators = append(decorators, authante.NewExtensionOptionsDecorator(options.ExtensionOptionChecker)) } if len(options.AddressFetchers) > 0 { @@ -131,12 +133,11 @@ func newCosmosAnteHandler(options cosmosHandlerOptions) sdk.AnteHandler { var sigVerification sdk.AnteDecorator = authante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler) if options.isEIP712 { - sigVerification = evmante.NewEip712SigVerificationDecorator(options.AccountKeeper, options.SignModeHandler, options.EvmKeeper) + sigVerification = evmante.NewLegacyEip712SigVerificationDecorator(options.AccountKeeper, options.SignModeHandler, options.EvmKeeper) } decorators = append(decorators, NewEvmMinGasFilter(options.EvmKeeper), // filter out evm denom from min-gas-prices - authante.NewMempoolFeeDecorator(), NewVestingAccountDecorator(), NewAuthzLimiterDecorator( sdk.MsgTypeURL(&evmtypes.MsgEthereumTx{}), @@ -144,15 +145,17 @@ func newCosmosAnteHandler(options cosmosHandlerOptions) sdk.AnteHandler { ), authante.NewValidateBasicDecorator(), authante.NewTxTimeoutHeightDecorator(), + // If ethermint x/feemarket is enabled, align Cosmos min fee with the EVM + // evmante.NewMinGasPriceDecorator(options.FeeMarketKeeper, options.EvmKeeper), authante.NewValidateMemoDecorator(options.AccountKeeper), authante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper), - authante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper), + authante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper, options.TxFeeChecker), authante.NewSetPubKeyDecorator(options.AccountKeeper), // SetPubKeyDecorator must be called before all signature verification decorators authante.NewValidateSigCountDecorator(options.AccountKeeper), authante.NewSigGasConsumeDecorator(options.AccountKeeper, options.SigGasConsumer), sigVerification, authante.NewIncrementSequenceDecorator(options.AccountKeeper), // innermost AnteDecorator - ibcante.NewAnteDecorator(options.IBCKeeper), + ibcante.NewRedundantRelayDecorator(options.IBCKeeper), ) return sdk.ChainAnteDecorators(decorators...) } @@ -163,10 +166,11 @@ func newEthAnteHandler(options HandlerOptions) sdk.AnteHandler { evmante.NewEthMempoolFeeDecorator(options.EvmKeeper), // Check eth effective gas price against minimal-gas-prices evmante.NewEthValidateBasicDecorator(options.EvmKeeper), evmante.NewEthSigVerificationDecorator(options.EvmKeeper), - evmante.NewEthAccountVerificationDecorator(options.AccountKeeper, options.BankKeeper, options.EvmKeeper), - evmante.NewEthGasConsumeDecorator(options.EvmKeeper, options.MaxTxGasWanted), + evmante.NewEthAccountVerificationDecorator(options.AccountKeeper, options.EvmKeeper), evmante.NewCanTransferDecorator(options.EvmKeeper), + evmante.NewEthGasConsumeDecorator(options.EvmKeeper, options.MaxTxGasWanted), evmante.NewEthIncrementSenderSequenceDecorator(options.AccountKeeper), // innermost AnteDecorator. + evmante.NewEthEmitEventDecorator(options.EvmKeeper), // emit eth tx hash and index at the very last ante handler. ) } diff --git a/app/ante/ante_test.go b/app/ante/ante_test.go index 4b79d4e8..caeb3907 100644 --- a/app/ante/ante_test.go +++ b/app/ante/ante_test.go @@ -1,6 +1,7 @@ package ante_test import ( + "math/rand" "os" "testing" "time" @@ -13,11 +14,11 @@ import ( vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" authz "github.com/cosmos/cosmos-sdk/x/authz" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + evmtypes "github.com/evmos/ethermint/x/evm/types" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/log" tmdb "github.com/tendermint/tm-db" - evmtypes "github.com/tharsis/ethermint/x/evm/types" "github.com/kava-labs/kava/app" bep3types "github.com/kava-labs/kava/x/bep3/types" @@ -104,7 +105,8 @@ func TestAppAnteHandler_AuthorizedMempool(t *testing.T) { for _, tc := range testcases { t.Run(tc.name, func(t *testing.T) { - stdTx, err := helpers.GenTx( + stdTx, err := helpers.GenSignedMockTx( + rand.New(rand.NewSource(time.Now().UnixNano())), encodingConfig.TxConfig, []sdk.Msg{ banktypes.NewMsgSend( @@ -192,11 +194,13 @@ func TestAppAnteHandler_RejectMsgsInAuthz(t *testing.T) { testPrivKeys, testAddresses := app.GeneratePrivKeyAddressPairs(10) newMsgGrant := func(msgTypeUrl string) *authz.MsgGrant { + t := time.Date(9000, 1, 1, 0, 0, 0, 0, time.UTC) + msg, err := authz.NewMsgGrant( testAddresses[0], testAddresses[1], authz.NewGenericAuthorization(msgTypeUrl), - time.Date(9000, 1, 1, 0, 0, 0, 0, time.UTC), + &t, ) if err != nil { panic(err) @@ -233,7 +237,8 @@ func TestAppAnteHandler_RejectMsgsInAuthz(t *testing.T) { chainID, ) - stdTx, err := helpers.GenTx( + stdTx, err := helpers.GenSignedMockTx( + rand.New(rand.NewSource(time.Now().UnixNano())), encodingConfig.TxConfig, []sdk.Msg{tc.msg}, sdk.NewCoins(), // no fee diff --git a/app/ante/authorized_test.go b/app/ante/authorized_test.go index d9bb976c..fafb5576 100644 --- a/app/ante/authorized_test.go +++ b/app/ante/authorized_test.go @@ -1,7 +1,9 @@ package ante_test import ( + "math/rand" "testing" + "time" "github.com/cosmos/cosmos-sdk/simapp/helpers" sdk "github.com/cosmos/cosmos-sdk/types" @@ -36,7 +38,8 @@ func TestAuthenticatedMempoolDecorator_AnteHandle_NotCheckTx(t *testing.T) { fetcher := mockAddressFetcher(testAddresses[1:]...) decorator := ante.NewAuthenticatedMempoolDecorator(fetcher) - tx, err := helpers.GenTx( + tx, err := helpers.GenSignedMockTx( + rand.New(rand.NewSource(time.Now().UnixNano())), txConfig, []sdk.Msg{ banktypes.NewMsgSend( @@ -70,7 +73,8 @@ func TestAuthenticatedMempoolDecorator_AnteHandle_Pass(t *testing.T) { decorator := ante.NewAuthenticatedMempoolDecorator(fetcher) - tx, err := helpers.GenTx( + tx, err := helpers.GenSignedMockTx( + rand.New(rand.NewSource(time.Now().UnixNano())), txConfig, []sdk.Msg{ banktypes.NewMsgSend( @@ -110,7 +114,8 @@ func TestAuthenticatedMempoolDecorator_AnteHandle_Reject(t *testing.T) { decorator := ante.NewAuthenticatedMempoolDecorator(fetcher) - tx, err := helpers.GenTx( + tx, err := helpers.GenSignedMockTx( + rand.New(rand.NewSource(time.Now().UnixNano())), txConfig, []sdk.Msg{ banktypes.NewMsgSend( diff --git a/app/ante/authz.go b/app/ante/authz.go index d39bbe52..36bfd2f8 100644 --- a/app/ante/authz.go +++ b/app/ante/authz.go @@ -49,7 +49,11 @@ func (ald AuthzLimiterDecorator) checkForDisabledMsg(msgs []sdk.Msg, searchOnlyI if !ok { panic("unexpected msg type") } - authorization := m.GetAuthorization() + authorization, err := m.GetAuthorization() + if err != nil { + return err + } + if ald.isDisabled(authorization.MsgTypeURL()) { return fmt.Errorf("found disabled msg type in MsgGrant: %s", authorization.MsgTypeURL()) } diff --git a/app/ante/authz_test.go b/app/ante/authz_test.go index d7768012..78d0fd55 100644 --- a/app/ante/authz_test.go +++ b/app/ante/authz_test.go @@ -1,6 +1,7 @@ package ante_test import ( + "math/rand" "testing" "time" @@ -10,15 +11,15 @@ import ( "github.com/cosmos/cosmos-sdk/x/authz" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + evmtypes "github.com/evmos/ethermint/x/evm/types" "github.com/stretchr/testify/require" - evmtypes "github.com/tharsis/ethermint/x/evm/types" "github.com/kava-labs/kava/app" "github.com/kava-labs/kava/app/ante" ) func newMsgGrant(granter sdk.AccAddress, grantee sdk.AccAddress, a authz.Authorization, expiration time.Time) *authz.MsgGrant { - msg, err := authz.NewMsgGrant(granter, grantee, a, expiration) + msg, err := authz.NewMsgGrant(granter, grantee, a, &expiration) if err != nil { panic(err) } @@ -211,7 +212,8 @@ func TestAuthzLimiterDecorator(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { - tx, err := helpers.GenTx( + tx, err := helpers.GenSignedMockTx( + rand.New(rand.NewSource(time.Now().UnixNano())), txConfig, tc.msgs, sdk.NewCoins(), diff --git a/app/ante/eip712_test.go b/app/ante/eip712_test.go index 4c1b4e10..92686ef6 100644 --- a/app/ante/eip712_test.go +++ b/app/ante/eip712_test.go @@ -5,13 +5,14 @@ import ( "testing" "time" + sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/client" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/simapp/helpers" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx/signing" - "github.com/cosmos/cosmos-sdk/x/auth/legacy/legacytx" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -19,18 +20,18 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" + "github.com/evmos/ethermint/crypto/ethsecp256k1" + "github.com/evmos/ethermint/ethereum/eip712" + "github.com/evmos/ethermint/tests" + etherminttypes "github.com/evmos/ethermint/types" + evmtypes "github.com/evmos/ethermint/x/evm/types" + feemarkettypes "github.com/evmos/ethermint/x/feemarket/types" "github.com/stretchr/testify/suite" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto/tmhash" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" tmversion "github.com/tendermint/tendermint/proto/tendermint/version" "github.com/tendermint/tendermint/version" - "github.com/tharsis/ethermint/crypto/ethsecp256k1" - "github.com/tharsis/ethermint/ethereum/eip712" - "github.com/tharsis/ethermint/tests" - etherminttypes "github.com/tharsis/ethermint/types" - evmtypes "github.com/tharsis/ethermint/x/evm/types" - feemarkettypes "github.com/tharsis/ethermint/x/feemarket/types" "github.com/kava-labs/kava/app" cdptypes "github.com/kava-labs/kava/x/cdp/types" @@ -64,8 +65,8 @@ type EIP712TestSuite struct { usdcEVMAddr evmutiltypes.InternalEVMAddress } -func (suite *EIP712TestSuite) getEVMAmount(amount int64) sdk.Int { - incr := sdk.RelativePow(sdk.NewUint(10), sdk.NewUint(18), sdk.OneUint()) +func (suite *EIP712TestSuite) getEVMAmount(amount int64) sdkmath.Int { + incr := sdkmath.RelativePow(sdkmath.NewUint(10), sdkmath.NewUint(18), sdkmath.OneUint()) return sdk.NewInt(amount).Mul(sdk.NewIntFromUint64(incr.Uint64())) } @@ -85,7 +86,7 @@ func (suite *EIP712TestSuite) createTestEIP712CosmosTxBuilder( fee := legacytx.NewStdFee(gas, gasAmount) accNumber := suite.tApp.GetAccountKeeper().GetAccount(suite.ctx, from).GetAccountNumber() - data := eip712.ConstructUntypedEIP712Data(chainId, accNumber, nonce, 0, fee, msgs, "") + data := eip712.ConstructUntypedEIP712Data(chainId, accNumber, nonce, 0, fee, msgs, "", nil) typedData, err := eip712.WrapTxToTypedData(ethChainId, msgs, data, &eip712.FeeDelegationOptions{ FeePayer: from, }, suite.tApp.GetEvmKeeper().GetParams(suite.ctx)) @@ -155,7 +156,15 @@ func (suite *EIP712TestSuite) SetupTest() { // Genesis states evmGs := evmtypes.NewGenesisState( - evmtypes.NewParams("akava", true, true, evmtypes.DefaultChainConfig()), + evmtypes.NewParams( + "akava", // evmDenom + false, // allowedUnprotectedTxs + true, // enableCreate + true, // enableCall + evmtypes.DefaultChainConfig(), // ChainConfig + nil, // extraEIPs + nil, // eip712AllowedMsgs + ), nil, ) @@ -302,7 +311,7 @@ func (suite *EIP712TestSuite) SetupTest() { suite.ctx = ctx // We need to set the validator as calling the EVM looks up the validator address - // https://github.com/tharsis/ethermint/blob/f21592ebfe74da7590eb42ed926dae970b2a9a3f/x/evm/keeper/state_transition.go#L487 + // https://github.com/evmos/ethermint/blob/f21592ebfe74da7590eb42ed926dae970b2a9a3f/x/evm/keeper/state_transition.go#L487 // evmkeeper.EVMConfig() will return error "failed to load evm config" if not set valAcc := ðerminttypes.EthAccount{ BaseAccount: authtypes.NewBaseAccount(sdk.AccAddress(consAddress.Bytes()), nil, 0, 0), diff --git a/app/ante/min_gas_filter.go b/app/ante/min_gas_filter.go index ebfe4d59..3fafe712 100644 --- a/app/ante/min_gas_filter.go +++ b/app/ante/min_gas_filter.go @@ -2,7 +2,7 @@ package ante import ( sdk "github.com/cosmos/cosmos-sdk/types" - evmtypes "github.com/tharsis/ethermint/x/evm/types" + evmtypes "github.com/evmos/ethermint/x/evm/types" ) var _ sdk.AnteDecorator = EvmMinGasFilter{} diff --git a/app/ante/min_gas_filter_test.go b/app/ante/min_gas_filter_test.go index 9314049b..546379a5 100644 --- a/app/ante/min_gas_filter_test.go +++ b/app/ante/min_gas_filter_test.go @@ -5,11 +5,11 @@ import ( "testing" sdk "github.com/cosmos/cosmos-sdk/types" + evmtypes "github.com/evmos/ethermint/x/evm/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" tmtime "github.com/tendermint/tendermint/types/time" - evmtypes "github.com/tharsis/ethermint/x/evm/types" "github.com/kava-labs/kava/app" "github.com/kava-labs/kava/app/ante" diff --git a/app/ante/vesting_test.go b/app/ante/vesting_test.go index 24398597..8c176bfa 100644 --- a/app/ante/vesting_test.go +++ b/app/ante/vesting_test.go @@ -1,6 +1,7 @@ package ante_test import ( + "math/rand" "testing" "time" @@ -21,7 +22,8 @@ func TestVestingMempoolDecorator_MsgCreateVestingAccount_Unauthorized(t *testing decorator := ante.NewVestingAccountDecorator() - tx, err := helpers.GenTx( + tx, err := helpers.GenSignedMockTx( + rand.New(rand.NewSource(time.Now().UnixNano())), txConfig, []sdk.Msg{ vesting.NewMsgCreateVestingAccount( diff --git a/app/app.go b/app/app.go index 418c4f80..1ac67522 100644 --- a/app/app.go +++ b/app/app.go @@ -9,13 +9,14 @@ import ( "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" + nodeservice "github.com/cosmos/cosmos-sdk/client/grpc/node" "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" - "github.com/cosmos/cosmos-sdk/client/rpc" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/server/api" "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/version" @@ -47,8 +48,11 @@ import ( "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" "github.com/cosmos/cosmos-sdk/x/gov" + govclient "github.com/cosmos/cosmos-sdk/x/gov/client" govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "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" @@ -67,29 +71,29 @@ import ( upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client" upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - transfer "github.com/cosmos/ibc-go/v3/modules/apps/transfer" - ibctransferkeeper "github.com/cosmos/ibc-go/v3/modules/apps/transfer/keeper" - ibctransfertypes "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" - ibc "github.com/cosmos/ibc-go/v3/modules/core" - ibcclient "github.com/cosmos/ibc-go/v3/modules/core/02-client" - ibcclientclient "github.com/cosmos/ibc-go/v3/modules/core/02-client/client" - ibcclienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - porttypes "github.com/cosmos/ibc-go/v3/modules/core/05-port/types" - ibchost "github.com/cosmos/ibc-go/v3/modules/core/24-host" - ibckeeper "github.com/cosmos/ibc-go/v3/modules/core/keeper" + transfer "github.com/cosmos/ibc-go/v6/modules/apps/transfer" + ibctransferkeeper "github.com/cosmos/ibc-go/v6/modules/apps/transfer/keeper" + ibctransfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" + ibc "github.com/cosmos/ibc-go/v6/modules/core" + ibcclient "github.com/cosmos/ibc-go/v6/modules/core/02-client" + ibcclientclient "github.com/cosmos/ibc-go/v6/modules/core/02-client/client" + ibcclienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" + porttypes "github.com/cosmos/ibc-go/v6/modules/core/05-port/types" + ibchost "github.com/cosmos/ibc-go/v6/modules/core/24-host" + ibckeeper "github.com/cosmos/ibc-go/v6/modules/core/keeper" + evmante "github.com/evmos/ethermint/app/ante" + ethermintconfig "github.com/evmos/ethermint/server/config" + "github.com/evmos/ethermint/x/evm" + evmkeeper "github.com/evmos/ethermint/x/evm/keeper" + evmtypes "github.com/evmos/ethermint/x/evm/types" + "github.com/evmos/ethermint/x/evm/vm/geth" + "github.com/evmos/ethermint/x/feemarket" + feemarketkeeper "github.com/evmos/ethermint/x/feemarket/keeper" + feemarkettypes "github.com/evmos/ethermint/x/feemarket/types" abci "github.com/tendermint/tendermint/abci/types" tmjson "github.com/tendermint/tendermint/libs/json" tmlog "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" - evmante "github.com/tharsis/ethermint/app/ante" - ethermintconfig "github.com/tharsis/ethermint/server/config" - "github.com/tharsis/ethermint/x/evm" - evmrest "github.com/tharsis/ethermint/x/evm/client/rest" - evmkeeper "github.com/tharsis/ethermint/x/evm/keeper" - evmtypes "github.com/tharsis/ethermint/x/evm/types" - "github.com/tharsis/ethermint/x/feemarket" - feemarketkeeper "github.com/tharsis/ethermint/x/feemarket/keeper" - feemarkettypes "github.com/tharsis/ethermint/x/feemarket/types" "github.com/kava-labs/kava/app/ante" kavaparams "github.com/kava-labs/kava/app/params" @@ -166,11 +170,11 @@ var ( capability.AppModuleBasic{}, staking.AppModuleBasic{}, distr.AppModuleBasic{}, - gov.NewAppModuleBasic( + gov.NewAppModuleBasic([]govclient.ProposalHandler{ paramsclient.ProposalHandler, distrclient.ProposalHandler, - upgradeclient.ProposalHandler, - upgradeclient.CancelProposalHandler, + upgradeclient.LegacyProposalHandler, + upgradeclient.LegacyCancelProposalHandler, ibcclientclient.UpdateClientProposalHandler, ibcclientclient.UpgradeProposalHandler, kavadistclient.ProposalHandler, @@ -179,7 +183,7 @@ var ( earnclient.WithdrawProposalHandler, communityclient.LendDepositProposalHandler, communityclient.LendWithdrawProposalHandler, - ), + }), params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, @@ -242,6 +246,7 @@ var ( // Verify app interface at compile time var _ servertypes.Application = (*App)(nil) +var _ servertypes.ApplicationQueryService = (*App)(nil) // Options bundles several configuration params for an App. type Options struct { @@ -271,9 +276,9 @@ type App struct { interfaceRegistry types.InterfaceRegistry // keys to access the substores - keys map[string]*sdk.KVStoreKey - tkeys map[string]*sdk.TransientStoreKey - memKeys map[string]*sdk.MemoryStoreKey + keys map[string]*storetypes.KVStoreKey + tkeys map[string]*storetypes.TransientStoreKey + memKeys map[string]*storetypes.MemoryStoreKey // keepers from all the modules accountKeeper authkeeper.AccountKeeper @@ -364,7 +369,7 @@ func NewApp( committeetypes.StoreKey, incentivetypes.StoreKey, evmutiltypes.StoreKey, savingstypes.StoreKey, earntypes.StoreKey, minttypes.StoreKey, ) - tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey, evmtypes.TransientKey) + tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey, evmtypes.TransientKey, feemarkettypes.TransientKey) memKeys := sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey) app := &App{ @@ -389,7 +394,7 @@ func NewApp( stakingSubspace := app.paramsKeeper.Subspace(stakingtypes.ModuleName) distrSubspace := app.paramsKeeper.Subspace(distrtypes.ModuleName) slashingSubspace := app.paramsKeeper.Subspace(slashingtypes.ModuleName) - govSubspace := app.paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govtypes.ParamKeyTable()) + govSubspace := app.paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govv1.ParamKeyTable()) crisisSubspace := app.paramsKeeper.Subspace(crisistypes.ModuleName) kavadistSubspace := app.paramsKeeper.Subspace(kavadisttypes.ModuleName) auctionSubspace := app.paramsKeeper.Subspace(auctiontypes.ModuleName) @@ -410,7 +415,7 @@ func NewApp( mintSubspace := app.paramsKeeper.Subspace(minttypes.ModuleName) bApp.SetParamStore( - app.paramsKeeper.Subspace(baseapp.Paramspace).WithKeyTable(paramskeeper.ConsensusParamsKeyTable()), + app.paramsKeeper.Subspace(baseapp.Paramspace).WithKeyTable(paramstypes.ConsensusParamsKeyTable()), ) app.capabilityKeeper = capabilitykeeper.NewKeeper(appCodec, keys[capabilitytypes.StoreKey], memKeys[capabilitytypes.MemStoreKey]) scopedIBCKeeper := app.capabilityKeeper.ScopeToModule(ibchost.ModuleName) @@ -424,6 +429,7 @@ func NewApp( authSubspace, authtypes.ProtoBaseAccount, mAccPerms, + sdk.GetConfig().GetBech32AccountAddrPrefix(), ) app.bankKeeper = bankkeeper.NewBaseKeeper( appCodec, @@ -443,6 +449,7 @@ func NewApp( keys[authzkeeper.StoreKey], appCodec, app.BaseApp.MsgServiceRouter(), + app.accountKeeper, ) app.distrKeeper = distrkeeper.NewKeeper( appCodec, @@ -452,7 +459,6 @@ func NewApp( app.bankKeeper, &app.stakingKeeper, authtypes.FeeCollectorName, - app.ModuleAccountAddrs(), ) app.slashingKeeper = slashingkeeper.NewKeeper( appCodec, @@ -472,6 +478,8 @@ func NewApp( appCodec, homePath, app.BaseApp, + // Authority + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.evidenceKeeper = *evidencekeeper.NewKeeper( appCodec, @@ -491,7 +499,12 @@ func NewApp( // Create Ethermint keepers app.feeMarketKeeper = feemarketkeeper.NewKeeper( - appCodec, keys[feemarkettypes.StoreKey], feemarketSubspace, + appCodec, + // Authority + authtypes.NewModuleAddress(govtypes.ModuleName), + keys[feemarkettypes.StoreKey], + tkeys[feemarkettypes.TransientKey], + feemarketSubspace, ) app.evmutilKeeper = evmutilkeeper.NewKeeper( @@ -504,9 +517,14 @@ func NewApp( evmBankKeeper := evmutilkeeper.NewEvmBankKeeper(app.evmutilKeeper, app.bankKeeper, app.accountKeeper) app.evmKeeper = evmkeeper.NewKeeper( - appCodec, keys[evmtypes.StoreKey], tkeys[evmtypes.TransientKey], evmSubspace, + appCodec, keys[evmtypes.StoreKey], tkeys[evmtypes.TransientKey], + // Authority + authtypes.NewModuleAddress(govtypes.ModuleName), app.accountKeeper, evmBankKeeper, app.stakingKeeper, app.feeMarketKeeper, + nil, // precompiled contracts + geth.NewEVM, options.EVMTrace, + evmSubspace, ) app.evmutilKeeper.SetEvmKeeper(app.evmKeeper) @@ -661,9 +679,9 @@ func NewApp( ) // create committee keeper with router - committeeGovRouter := govtypes.NewRouter() + committeeGovRouter := govv1beta1.NewRouter() committeeGovRouter. - AddRoute(govtypes.RouterKey, govtypes.ProposalHandler). + AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler). AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.paramsKeeper)). AddRoute(distrtypes.RouterKey, distr.NewCommunityPoolSpendProposalHandler(app.distrKeeper)). AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.upgradeKeeper)) @@ -681,7 +699,11 @@ func NewApp( // register the staking hooks // NOTE: These keepers are passed by reference above, so they will contain these hooks. app.stakingKeeper = *(app.stakingKeeper.SetHooks( - stakingtypes.NewMultiStakingHooks(app.distrKeeper.Hooks(), app.slashingKeeper.Hooks(), app.incentiveKeeper.Hooks()))) + stakingtypes.NewMultiStakingHooks( + app.distrKeeper.Hooks(), + app.slashingKeeper.Hooks(), + app.incentiveKeeper.Hooks(), + ))) app.swapKeeper = *swapKeeper.SetHooks(app.incentiveKeeper.Hooks()) app.cdpKeeper = *cdpKeeper.SetHooks(cdptypes.NewMultiCDPHooks(app.incentiveKeeper.Hooks())) @@ -691,9 +713,9 @@ func NewApp( // create gov keeper with router // NOTE this must be done after any keepers referenced in the gov router (ie committee) are defined - govRouter := govtypes.NewRouter() + govRouter := govv1beta1.NewRouter() govRouter. - AddRoute(govtypes.RouterKey, govtypes.ProposalHandler). + AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler). AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.paramsKeeper)). AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.upgradeKeeper)). AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.ibcKeeper.ClientKeeper)). @@ -702,6 +724,8 @@ func NewApp( AddRoute(earntypes.RouterKey, earn.NewCommunityPoolProposalHandler(app.earnKeeper)). AddRoute(communitytypes.RouterKey, community.NewCommunityPoolProposalHandler(app.communityKeeper)). AddRoute(committeetypes.RouterKey, committee.NewProposalHandler(app.committeeKeeper)) + + govConfig := govtypes.DefaultConfig() app.govKeeper = govkeeper.NewKeeper( appCodec, keys[govtypes.StoreKey], @@ -710,6 +734,8 @@ func NewApp( app.bankKeeper, &app.stakingKeeper, govRouter, + app.MsgServiceRouter(), + govConfig, ) // override x/gov tally handler with custom implementation @@ -733,8 +759,8 @@ func NewApp( crisis.NewAppModule(&app.crisisKeeper, options.SkipGenesisInvariants), slashing.NewAppModule(appCodec, app.slashingKeeper, app.accountKeeper, app.bankKeeper, app.stakingKeeper), ibc.NewAppModule(app.ibcKeeper), - evm.NewAppModule(app.evmKeeper, app.accountKeeper), - feemarket.NewAppModule(app.feeMarketKeeper), + evm.NewAppModule(app.evmKeeper, app.accountKeeper, evmSubspace), + feemarket.NewAppModule(app.feeMarketKeeper, feemarketSubspace), upgrade.NewAppModule(app.upgradeKeeper), evidence.NewAppModule(app.evidenceKeeper), transferModule, @@ -756,7 +782,8 @@ func NewApp( liquid.NewAppModule(app.liquidKeeper), earn.NewAppModule(app.earnKeeper, app.accountKeeper, app.bankKeeper), router.NewAppModule(app.routerKeeper), - mint.NewAppModule(appCodec, app.mintKeeper, app.accountKeeper), + // nil InflationCalculationFn, use SDK's default inflation function + mint.NewAppModule(appCodec, app.mintKeeper, app.accountKeeper, nil), community.NewAppModule(app.communityKeeper, app.accountKeeper), ) @@ -936,15 +963,17 @@ func NewApp( } anteOptions := ante.HandlerOptions{ - AccountKeeper: app.accountKeeper, - BankKeeper: app.bankKeeper, - EvmKeeper: app.evmKeeper, - IBCKeeper: app.ibcKeeper, - FeeMarketKeeper: app.feeMarketKeeper, - SignModeHandler: encodingConfig.TxConfig.SignModeHandler(), - SigGasConsumer: evmante.DefaultSigVerificationGasConsumer, - MaxTxGasWanted: options.EVMMaxGasWanted, - AddressFetchers: fetchers, + AccountKeeper: app.accountKeeper, + BankKeeper: app.bankKeeper, + EvmKeeper: app.evmKeeper, + IBCKeeper: app.ibcKeeper, + FeeMarketKeeper: app.feeMarketKeeper, + SignModeHandler: encodingConfig.TxConfig.SignModeHandler(), + SigGasConsumer: evmante.DefaultSigVerificationGasConsumer, + MaxTxGasWanted: options.EVMMaxGasWanted, + AddressFetchers: fetchers, + ExtensionOptionChecker: nil, + TxFeeChecker: nil, } antehandler, err := ante.NewAnteHandler(anteOptions) @@ -1027,16 +1056,11 @@ func (app *App) SimulationManager() *module.SimulationManager { func (app *App) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig) { clientCtx := apiSvr.ClientCtx - // Register legacy REST routes - rpc.RegisterRoutes(clientCtx, apiSvr.Router) - evmrest.RegisterTxRoutes(clientCtx, apiSvr.Router) - ModuleBasics.RegisterRESTRoutes(clientCtx, apiSvr.Router) - RegisterLegacyTxRoutes(clientCtx, apiSvr.Router) - // Register GRPC Gateway routes tmservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) authtx.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) ModuleBasics.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) + nodeservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) // Swagger API configuration is ignored } @@ -1050,7 +1074,16 @@ func (app *App) RegisterTxService(clientCtx client.Context) { // RegisterTendermintService implements the Application.RegisterTendermintService method. // It registers the standard tendermint grpc endpoints on the app's grpc server. func (app *App) RegisterTendermintService(clientCtx client.Context) { - tmservice.RegisterTendermintService(app.BaseApp.GRPCQueryRouter(), clientCtx, app.interfaceRegistry) + tmservice.RegisterTendermintService( + clientCtx, + app.BaseApp.GRPCQueryRouter(), + app.interfaceRegistry, + app.Query, + ) +} + +func (app *App) RegisterNodeService(clientCtx client.Context) { + nodeservice.RegisterNodeService(clientCtx, app.BaseApp.GRPCQueryRouter()) } // loadBlockedMaccAddrs returns a map indicating the blocked status of each module account address diff --git a/app/app_test.go b/app/app_test.go index 34edf908..2733551f 100644 --- a/app/app_test.go +++ b/app/app_test.go @@ -32,7 +32,9 @@ func TestExport(t *testing.T) { db := db.NewMemDB() app := NewApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, DefaultNodeHome, nil, MakeEncodingConfig(), DefaultOptions) - stateBytes, err := json.Marshal(NewDefaultGenesisState()) + genesisState := GenesisStateWithSingleValidator(&TestApp{App: *app}, NewDefaultGenesisState()) + + stateBytes, err := json.Marshal(genesisState) require.NoError(t, err) initRequest := abci.RequestInitChain{ @@ -58,7 +60,7 @@ func TestExport(t *testing.T) { assert.Equal(t, initRequest.InitialHeight+1, exportedApp.Height) // app.Commit() increments height assert.Equal(t, initRequest.ConsensusParams, exportedApp.ConsensusParams) - assert.Equal(t, []tmtypes.GenesisValidator(nil), exportedApp.Validators) // no validators set in default genesis + assert.Len(t, exportedApp.Validators, 1) // no validators set in default genesis } // unmarshalJSONKeys extracts keys from the top level of a json blob. diff --git a/app/encoding.go b/app/encoding.go index 4a5913a0..17445f10 100644 --- a/app/encoding.go +++ b/app/encoding.go @@ -1,7 +1,7 @@ package app import ( - enccodec "github.com/tharsis/ethermint/encoding/codec" + enccodec "github.com/evmos/ethermint/encoding/codec" "github.com/kava-labs/kava/app/params" ) diff --git a/app/legacy_tx_broadcast.go b/app/legacy_tx_broadcast.go deleted file mode 100644 index 7b234bd3..00000000 --- a/app/legacy_tx_broadcast.go +++ /dev/null @@ -1,84 +0,0 @@ -package app - -import ( - "net/http" - - "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/rest" - "github.com/cosmos/cosmos-sdk/x/auth/legacy/legacytx" - "github.com/gorilla/mux" -) - -// RegisterLegacyTxRoutes registers a legacy tx routes that use amino encoding json -func RegisterLegacyTxRoutes(clientCtx client.Context, r *mux.Router) { - r.HandleFunc("/txs", legacyTxBroadcast(clientCtx)).Methods("POST") -} - -// LegacyTxBroadcastRequest represents a broadcast request with an amino json encoded transaction -type LegacyTxBroadcastRequest struct { - Tx legacytx.StdTx `json:"tx"` - Mode string `json:"mode"` -} - -var _ codectypes.UnpackInterfacesMessage = LegacyTxBroadcastRequest{} - -// UnpackInterfaces implements the UnpackInterfacesMessage interface -func (m LegacyTxBroadcastRequest) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { - return m.Tx.UnpackInterfaces(unpacker) -} - -func legacyTxBroadcast(clientCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req LegacyTxBroadcastRequest - if !rest.ReadRESTReq(w, r, clientCtx.LegacyAmino, &req) { - return - } - - tx := req.Tx - builder := clientCtx.TxConfig.NewTxBuilder() - - err := builder.SetMsgs(tx.GetMsgs()...) - if rest.CheckBadRequestError(w, err) { - return - } - - builder.SetFeeAmount(tx.GetFee()) - builder.SetGasLimit(tx.GetGas()) - builder.SetMemo(req.Tx.GetMemo()) - builder.SetTimeoutHeight(req.Tx.GetTimeoutHeight()) - - signatures, err := tx.GetSignaturesV2() - if rest.CheckBadRequestError(w, err) { - return - } - for i, sig := range signatures { - addr := sdk.AccAddress(sig.PubKey.Address()) - _, seq, err := clientCtx.AccountRetriever.GetAccountNumberSequence(clientCtx, addr) - if rest.CheckBadRequestError(w, err) { - return - } - - signatures[i].Sequence = seq - } - - err = builder.SetSignatures(signatures...) - if rest.CheckBadRequestError(w, err) { - return - } - - txBytes, err := clientCtx.TxConfig.TxEncoder()(builder.GetTx()) - if rest.CheckInternalServerError(w, err) { - return - } - - clientCtx = clientCtx.WithBroadcastMode(req.Mode) - res, err := clientCtx.BroadcastTx(txBytes) - if rest.CheckInternalServerError(w, err) { - return - } - - rest.PostProcessResponseBare(w, clientCtx, res) - } -} diff --git a/app/legacy_tx_broadcast_test.go b/app/legacy_tx_broadcast_test.go deleted file mode 100644 index d8e77344..00000000 --- a/app/legacy_tx_broadcast_test.go +++ /dev/null @@ -1,194 +0,0 @@ -package app_test - -import ( - "bytes" - "encoding/json" - "io/ioutil" - "net/http" - "net/http/httptest" - "testing" - - "github.com/golang/mock/gomock" - "github.com/kava-labs/kava/app" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/tests/mocks" - "github.com/cosmos/cosmos-sdk/testutil/testdata" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/auth/legacy/legacytx" - authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/gorilla/mux" - "github.com/stretchr/testify/require" - "github.com/stretchr/testify/suite" - tmbytes "github.com/tendermint/tendermint/libs/bytes" - rpchttp "github.com/tendermint/tendermint/rpc/client/http" - ctypes "github.com/tendermint/tendermint/rpc/core/types" - jsonrpctypes "github.com/tendermint/tendermint/rpc/jsonrpc/types" - tmtypes "github.com/tendermint/tendermint/types" -) - -type LegacyTxBroadcastTestSuite struct { - suite.Suite - clientCtx client.Context - restServer *httptest.Server - rpcServer *httptest.Server - ctrl *gomock.Controller - accountRetriever *mocks.MockAccountRetriever - simulateResponse func(jsonrpctypes.RPCRequest) jsonrpctypes.RPCResponse -} - -func (suite *LegacyTxBroadcastTestSuite) SetupTest() { - app.SetSDKConfig() - - // setup the mock rpc server - suite.rpcServer = rpcTestServer(suite.T(), func(request jsonrpctypes.RPCRequest) jsonrpctypes.RPCResponse { - suite.Require().Equal("broadcast_tx_sync", request.Method) - return suite.simulateResponse(request) - }) - - // setup client context with rpc client, account retriever mock, codecs, and tx config - rpcClient, err := rpchttp.New(suite.rpcServer.URL, "/websocket") - suite.Require().NoError(err) - suite.ctrl = gomock.NewController(suite.T()) - suite.accountRetriever = mocks.NewMockAccountRetriever(suite.ctrl) - encodingConfig := app.MakeEncodingConfig() - suite.clientCtx = client.Context{}. - WithCodec(encodingConfig.Marshaler). - WithTxConfig(encodingConfig.TxConfig). - WithLegacyAmino(encodingConfig.Amino). - WithNodeURI(suite.rpcServer.URL). - WithClient(rpcClient). - WithAccountRetriever(suite.accountRetriever) - - // setup rest server - router := mux.NewRouter() - app.RegisterLegacyTxRoutes(suite.clientCtx, router) - suite.restServer = httptest.NewServer(router) -} - -func (suite *LegacyTxBroadcastTestSuite) TearDownTest() { - suite.rpcServer.Close() - suite.restServer.Close() - suite.ctrl.Finish() -} - -func (suite *LegacyTxBroadcastTestSuite) TestSimulateRequest() { - _, pk, fromAddr := testdata.KeyTestPubAddr() - toAddr, err := sdk.AccAddressFromBech32("kava1mq9qxlhze029lm0frzw2xr6hem8c3k9ts54w0w") - suite.Require().NoError(err) - - // build a legacy transaction - msgs := []sdk.Msg{banktypes.NewMsgSend(fromAddr, toAddr, sdk.NewCoins(sdk.NewCoin("ukava", sdk.NewInt(1e6))))} - fee := legacytx.NewStdFee(1e6, sdk.NewCoins(sdk.NewCoin("ukava", sdk.NewInt(5e4)))) - sigs := []legacytx.StdSignature{legacytx.NewStdSignature(pk, []byte("an amino json signed signature"))} - stdTx := legacytx.NewStdTx(msgs, fee, sigs, "legacy broadcast test") - stdTx.TimeoutHeight = 100000 - txReq := app.LegacyTxBroadcastRequest{ - Tx: stdTx, - Mode: "sync", - } - - // setup mock tendermint jsonrpc handler for BroadcastTx - var broadcastedTx authsigning.Tx - var broadcastedTxHash tmbytes.HexBytes - suite.simulateResponse = func(rpcRequest jsonrpctypes.RPCRequest) jsonrpctypes.RPCResponse { - var params struct { - Tx tmtypes.Tx `json:"tx"` - } - - err := json.Unmarshal(rpcRequest.Params, ¶ms) - suite.Require().NoError(err) - decodedTx, err := suite.clientCtx.TxConfig.TxDecoder()(params.Tx) - suite.Require().NoError(err) - wrappedTx, err := suite.clientCtx.TxConfig.WrapTxBuilder(decodedTx) - suite.Require().NoError(err) - - broadcastedTx = wrappedTx.GetTx() - broadcastedTxHash = params.Tx.Hash() - - resp := &ctypes.ResultBroadcastTx{ - Log: "[]", - Hash: broadcastedTxHash, - } - result, err := suite.clientCtx.LegacyAmino.MarshalJSON(resp) - suite.Require().NoError(err) - - return jsonrpctypes.RPCResponse{ - JSONRPC: rpcRequest.JSONRPC, - ID: rpcRequest.ID, - Result: json.RawMessage(result), - } - } - - // mock account sequence retrieval - suite.accountRetriever.EXPECT(). - GetAccountNumberSequence(suite.clientCtx, fromAddr). - Return(uint64(100), uint64(101), nil) - - // amino encode legacy tx - requestBody, err := suite.clientCtx.LegacyAmino.MarshalJSON(txReq) - suite.Require().NoError(err) - - // post transaction to POST /txs - req, err := http.NewRequest("POST", suite.restServer.URL+"/txs", bytes.NewBuffer(requestBody)) - suite.Require().NoError(err) - req.Header.Set("Content-Type", "application/json") - client := &http.Client{} - resp, err := client.Do(req) - suite.Require().NoError(err) - defer resp.Body.Close() - - // assert broadcasted tx has all information - suite.Equal(msgs, broadcastedTx.GetMsgs()) - suite.Equal(fee.Amount, broadcastedTx.GetFee()) - suite.Equal(fee.Gas, broadcastedTx.GetGas()) - suite.Equal(stdTx.TimeoutHeight, broadcastedTx.GetTimeoutHeight()) - suite.Equal(stdTx.Memo, broadcastedTx.GetMemo()) - - // assert broadcasted tx has correct signature - stdSignatures, err := stdTx.GetSignaturesV2() - suite.Require().NoError(err) - stdSignatures[0].Sequence = uint64(101) - broadcastedSigs, err := broadcastedTx.GetSignaturesV2() - suite.Require().NoError(err) - suite.Equal(stdSignatures, broadcastedSigs) - - // decode response body - body, err := ioutil.ReadAll(resp.Body) - suite.Require().NoError(err) - var txResponse sdk.TxResponse - err = suite.clientCtx.LegacyAmino.UnmarshalJSON(body, &txResponse) - suite.Require().NoError(err) - - // ensure response is correct - suite.Equal("[]", txResponse.RawLog) - suite.Equal(broadcastedTxHash.String(), txResponse.TxHash) -} - -func TestLegacyTxBroadcastTestSuite(t *testing.T) { - suite.Run(t, new(LegacyTxBroadcastTestSuite)) -} - -func rpcTestServer( - t *testing.T, - rpcHandler func(jsonrpctypes.RPCRequest) jsonrpctypes.RPCResponse, -) *httptest.Server { - return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - body, err := ioutil.ReadAll(r.Body) - require.NoError(t, err) - - var request jsonrpctypes.RPCRequest - err = json.Unmarshal(body, &request) - require.NoError(t, err) - - response := rpcHandler(request) - - b, err := json.Marshal(&response) - require.NoError(t, err) - - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(http.StatusOK) - _, _ = w.Write(b) - })) -} diff --git a/app/tally_handler.go b/app/tally_handler.go index b24f230a..91f22f7f 100644 --- a/app/tally_handler.go +++ b/app/tally_handler.go @@ -4,8 +4,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" - "github.com/cosmos/cosmos-sdk/x/gov/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" earnkeeper "github.com/kava-labs/kava/x/earn/keeper" @@ -14,7 +13,7 @@ import ( savingskeeper "github.com/kava-labs/kava/x/savings/keeper" ) -var _ govtypes.TallyHandler = TallyHandler{} +var _ govv1.TallyHandler = TallyHandler{} // TallyHandler is the tally handler for kava type TallyHandler struct { @@ -41,30 +40,33 @@ func NewTallyHandler( } } -func (th TallyHandler) Tally(ctx sdk.Context, proposal types.Proposal) (passes bool, burnDeposits bool, tallyResults types.TallyResult) { - results := make(map[types.VoteOption]sdk.Dec) - results[types.OptionYes] = sdk.ZeroDec() - results[types.OptionAbstain] = sdk.ZeroDec() - results[types.OptionNo] = sdk.ZeroDec() - results[types.OptionNoWithVeto] = sdk.ZeroDec() +func (th TallyHandler) Tally( + ctx sdk.Context, + proposal govv1.Proposal, +) (passes bool, burnDeposits bool, tallyResults govv1.TallyResult) { + results := make(map[govv1.VoteOption]sdk.Dec) + results[govv1.OptionYes] = sdk.ZeroDec() + results[govv1.OptionAbstain] = sdk.ZeroDec() + results[govv1.OptionNo] = sdk.ZeroDec() + results[govv1.OptionNoWithVeto] = sdk.ZeroDec() totalVotingPower := sdk.ZeroDec() - currValidators := make(map[string]types.ValidatorGovInfo) + currValidators := make(map[string]govv1.ValidatorGovInfo) // fetch all the bonded validators, insert them into currValidators th.stk.IterateBondedValidatorsByPower(ctx, func(index int64, validator stakingtypes.ValidatorI) (stop bool) { - currValidators[validator.GetOperator().String()] = types.NewValidatorGovInfo( + currValidators[validator.GetOperator().String()] = govv1.NewValidatorGovInfo( validator.GetOperator(), validator.GetBondedTokens(), validator.GetDelegatorShares(), sdk.ZeroDec(), - types.WeightedVoteOptions{}, + govv1.WeightedVoteOptions{}, ) return false }) - th.gk.IterateVotes(ctx, proposal.ProposalId, func(vote types.Vote) bool { + th.gk.IterateVotes(ctx, proposal.Id, func(vote govv1.Vote) bool { // if validator, just record it in the map voter, err := sdk.AccAddressFromBech32(vote.Voter) @@ -92,7 +94,7 @@ func (th TallyHandler) Tally(ctx sdk.Context, proposal types.Proposal) (passes b votingPower := delegation.GetShares().MulInt(val.BondedTokens).Quo(val.DelegatorShares) for _, option := range vote.Options { - subPower := votingPower.Mul(option.Weight) + subPower := votingPower.Mul(sdk.MustNewDecFromStr(option.Weight)) results[option.Option] = results[option.Option].Add(subPower) } totalVotingPower = totalVotingPower.Add(votingPower) @@ -112,7 +114,7 @@ func (th TallyHandler) Tally(ctx sdk.Context, proposal types.Proposal) (passes b // reduce delegator shares by the amount of voter bkava for the validator valAddrStr := valAddr.String() if val, ok := currValidators[valAddrStr]; ok { - val.DelegatorDeductions = val.DelegatorDeductions.Add(coin.Amount.ToDec()) + val.DelegatorDeductions = val.DelegatorDeductions.Add(sdk.NewDecFromInt(coin.Amount)) currValidators[valAddrStr] = val } @@ -122,10 +124,10 @@ func (th TallyHandler) Tally(ctx sdk.Context, proposal types.Proposal) (passes b // error is returned only if the bkava denom is incorrect, which should never happen here. panic(err) } - votingPower := stakedCoins.Amount.ToDec() + votingPower := sdk.NewDecFromInt(stakedCoins.Amount) for _, option := range vote.Options { - subPower := votingPower.Mul(option.Weight) + subPower := votingPower.Mul(sdk.MustNewDecFromStr(option.Weight)) results[option.Option] = results[option.Option].Add(subPower) } totalVotingPower = totalVotingPower.Add(votingPower) @@ -145,14 +147,14 @@ func (th TallyHandler) Tally(ctx sdk.Context, proposal types.Proposal) (passes b votingPower := sharesAfterDeductions.MulInt(val.BondedTokens).Quo(val.DelegatorShares) for _, option := range val.Vote { - subPower := votingPower.Mul(option.Weight) + subPower := votingPower.Mul(sdk.MustNewDecFromStr(option.Weight)) results[option.Option] = results[option.Option].Add(subPower) } totalVotingPower = totalVotingPower.Add(votingPower) } tallyParams := th.gk.GetTallyParams(ctx) - tallyResults = types.NewTallyResultFromMap(results) + tallyResults = govv1.NewTallyResultFromMap(results) // TODO: Upgrade the spec to cover all of these cases & remove pseudocode. // If there is no staked coins, the proposal fails @@ -161,23 +163,23 @@ func (th TallyHandler) Tally(ctx sdk.Context, proposal types.Proposal) (passes b } // If there is not enough quorum of votes, the proposal fails - percentVoting := totalVotingPower.Quo(th.stk.TotalBondedTokens(ctx).ToDec()) - if percentVoting.LT(tallyParams.Quorum) { + percentVoting := totalVotingPower.Quo(sdk.NewDecFromInt(th.stk.TotalBondedTokens(ctx))) + if percentVoting.LT(sdk.MustNewDecFromStr(tallyParams.Quorum)) { return false, true, tallyResults } // If no one votes (everyone abstains), proposal fails - if totalVotingPower.Sub(results[types.OptionAbstain]).Equal(sdk.ZeroDec()) { + if totalVotingPower.Sub(results[govv1.OptionAbstain]).Equal(sdk.ZeroDec()) { return false, false, tallyResults } // If more than 1/3 of voters veto, proposal fails - if results[types.OptionNoWithVeto].Quo(totalVotingPower).GT(tallyParams.VetoThreshold) { + if results[govv1.OptionNoWithVeto].Quo(totalVotingPower).GT(sdk.MustNewDecFromStr(tallyParams.VetoThreshold)) { return false, true, tallyResults } // If more than 1/2 of non-abstaining voters vote Yes, proposal passes - if results[types.OptionYes].Quo(totalVotingPower.Sub(results[types.OptionAbstain])).GT(tallyParams.Threshold) { + if results[govv1.OptionYes].Quo(totalVotingPower.Sub(results[govv1.OptionAbstain])).GT(sdk.MustNewDecFromStr(tallyParams.Threshold)) { return true, false, tallyResults } diff --git a/app/tally_handler_test.go b/app/tally_handler_test.go index 9eafd5c8..41b2c184 100644 --- a/app/tally_handler_test.go +++ b/app/tally_handler_test.go @@ -8,7 +8,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "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" @@ -69,13 +70,13 @@ func (suite *tallyHandlerSuite) TestVotePower_AllSourcesCounted() { ) proposal := suite.createProposal() - suite.voteOnProposal(user.GetAddress(), proposal.ProposalId, govtypes.OptionYes) + suite.voteOnProposal(user.GetAddress(), proposal.Id, govv1beta1.OptionYes) _, _, results := suite.tallier.Tally(suite.ctx, proposal) - suite.Equal(sdk.NewInt(500e6+250e6+250e6), results.Yes) - suite.Equal(sdk.ZeroInt(), results.No) - suite.Equal(sdk.ZeroInt(), results.NoWithVeto) - suite.Equal(sdk.ZeroInt(), results.Abstain) + suite.Equal(sdk.NewInt(500e6+250e6+250e6).String(), results.YesCount) + suite.Equal(sdk.ZeroInt().String(), results.NoCount) + suite.Equal(sdk.ZeroInt().String(), results.NoWithVetoCount) + suite.Equal(sdk.ZeroInt().String(), results.AbstainCount) } func (suite *tallyHandlerSuite) TestVotePower_UserOverridesValidator() { @@ -96,28 +97,28 @@ func (suite *tallyHandlerSuite) TestVotePower_UserOverridesValidator() { proposal := suite.createProposal() // Validator votes, inheriting user's stake and bkava. - suite.voteOnProposal(validator.GetOperator().Bytes(), proposal.ProposalId, govtypes.OptionYes) + suite.voteOnProposal(validator.GetOperator().Bytes(), proposal.Id, govv1beta1.OptionYes) // use wrapped context to discard the state changes readOnlyCtx, _ := suite.ctx.CacheContext() _, _, results := suite.tallier.Tally(readOnlyCtx, proposal) userPower := sdk.NewInt(500e6 + 250e6 + 250e6) suite.Equal( - selfDelegated.Add(userPower), - results.Yes, + selfDelegated.Add(userPower).String(), + results.YesCount, ) - suite.Equal(sdk.ZeroInt(), results.No) - suite.Equal(sdk.ZeroInt(), results.NoWithVeto) - suite.Equal(sdk.ZeroInt(), results.Abstain) + suite.Equal(sdk.ZeroInt().String(), results.NoCount) + suite.Equal(sdk.ZeroInt().String(), results.NoWithVetoCount) + suite.Equal(sdk.ZeroInt().String(), results.AbstainCount) // User votes, taking power away from validator. - suite.voteOnProposal(user.GetAddress(), proposal.ProposalId, govtypes.OptionNo) + suite.voteOnProposal(user.GetAddress(), proposal.Id, govv1beta1.OptionNo) _, _, results = suite.tallier.Tally(suite.ctx, proposal) - suite.Equal(selfDelegated, results.Yes) - suite.Equal(userPower, results.No) - suite.Equal(sdk.ZeroInt(), results.NoWithVeto) - suite.Equal(sdk.ZeroInt(), results.Abstain) + suite.Equal(selfDelegated.String(), results.YesCount) + suite.Equal(userPower.String(), results.NoCount) + suite.Equal(sdk.ZeroInt().String(), results.NoWithVetoCount) + suite.Equal(sdk.ZeroInt().String(), results.AbstainCount) } func (suite *tallyHandlerSuite) TestTallyOutcomes() { @@ -129,7 +130,7 @@ func (suite *tallyHandlerSuite) TestTallyOutcomes() { v1 := suite.createNewBondedValidator(sdk.NewInt(399_999_999)) suite.createNewBondedValidator(sdk.NewInt(600_000_001)) - suite.voteOnProposal(v1.GetOperator().Bytes(), proposal.ProposalId, govtypes.OptionYes) + suite.voteOnProposal(v1.GetOperator().Bytes(), proposal.Id, govv1beta1.OptionYes) passes, burns, tally := suite.tallier.Tally(suite.ctx, proposal) suite.Falsef(passes, "expected proposal to fail, tally: %v", tally) @@ -143,8 +144,8 @@ func (suite *tallyHandlerSuite) TestTallyOutcomes() { v1 := suite.createNewBondedValidator(sdk.NewInt(334_000_001)) v2 := suite.createNewBondedValidator(sdk.NewInt(665_999_999)) - suite.voteOnProposal(v1.GetOperator().Bytes(), proposal.ProposalId, govtypes.OptionNoWithVeto) - suite.voteOnProposal(v2.GetOperator().Bytes(), proposal.ProposalId, govtypes.OptionYes) + suite.voteOnProposal(v1.GetOperator().Bytes(), proposal.Id, govv1beta1.OptionNoWithVeto) + suite.voteOnProposal(v2.GetOperator().Bytes(), proposal.Id, govv1beta1.OptionYes) passes, burns, tally := suite.tallier.Tally(suite.ctx, proposal) suite.Falsef(passes, "expected proposal to fail, tally: %v", tally) @@ -159,9 +160,9 @@ func (suite *tallyHandlerSuite) TestTallyOutcomes() { v2 := suite.createNewBondedValidator(sdk.NewInt(50_000_001)) v3 := suite.createNewBondedValidator(sdk.NewInt(49_999_999)) - suite.voteOnProposal(v1.GetOperator().Bytes(), proposal.ProposalId, govtypes.OptionAbstain) - suite.voteOnProposal(v2.GetOperator().Bytes(), proposal.ProposalId, govtypes.OptionYes) - suite.voteOnProposal(v3.GetOperator().Bytes(), proposal.ProposalId, govtypes.OptionNo) + suite.voteOnProposal(v1.GetOperator().Bytes(), proposal.Id, govv1beta1.OptionAbstain) + suite.voteOnProposal(v2.GetOperator().Bytes(), proposal.Id, govv1beta1.OptionYes) + suite.voteOnProposal(v3.GetOperator().Bytes(), proposal.Id, govv1beta1.OptionNo) passes, burns, tally := suite.tallier.Tally(suite.ctx, proposal) suite.Truef(passes, "expected proposal to pass, tally: %v", tally) @@ -176,9 +177,9 @@ func (suite *tallyHandlerSuite) TestTallyOutcomes() { v2 := suite.createNewBondedValidator(sdk.NewInt(49_999_999)) v3 := suite.createNewBondedValidator(sdk.NewInt(50_000_001)) - suite.voteOnProposal(v1.GetOperator().Bytes(), proposal.ProposalId, govtypes.OptionAbstain) - suite.voteOnProposal(v2.GetOperator().Bytes(), proposal.ProposalId, govtypes.OptionYes) - suite.voteOnProposal(v3.GetOperator().Bytes(), proposal.ProposalId, govtypes.OptionNo) + suite.voteOnProposal(v1.GetOperator().Bytes(), proposal.Id, govv1beta1.OptionAbstain) + suite.voteOnProposal(v2.GetOperator().Bytes(), proposal.Id, govv1beta1.OptionYes) + suite.voteOnProposal(v3.GetOperator().Bytes(), proposal.Id, govv1beta1.OptionNo) passes, burns, tally := suite.tallier.Tally(suite.ctx, proposal) suite.Falsef(passes, "expected proposal to pass, tally: %v", tally) @@ -190,6 +191,7 @@ func (suite *tallyHandlerSuite) TestTallyOutcomes() { proposal := suite.createProposal() // no stake + suite.app.DeleteGenesisValidator(suite.T(), suite.ctx) passes, burns, tally := suite.tallier.Tally(suite.ctx, proposal) suite.Falsef(passes, "expected proposal to pass, tally: %v", tally) @@ -202,7 +204,7 @@ func (suite *tallyHandlerSuite) TestTallyOutcomes() { v1 := suite.createNewBondedValidator(sdk.NewInt(1e9)) - suite.voteOnProposal(v1.GetOperator().Bytes(), proposal.ProposalId, govtypes.OptionAbstain) + suite.voteOnProposal(v1.GetOperator().Bytes(), proposal.Id, govv1beta1.OptionAbstain) passes, burns, tally := suite.tallier.Tally(suite.ctx, proposal) suite.Falsef(passes, "expected proposal to pass, tally: %v", tally) @@ -212,37 +214,45 @@ func (suite *tallyHandlerSuite) TestTallyOutcomes() { } func (suite *tallyHandlerSuite) setTallyParams(quorum, threshold, veto sdk.Dec) { - suite.app.GetGovKeeper().SetTallyParams(suite.ctx, govtypes.TallyParams{ - Quorum: quorum, - Threshold: threshold, - VetoThreshold: veto, + suite.app.GetGovKeeper().SetTallyParams(suite.ctx, govv1.TallyParams{ + Quorum: quorum.String(), + Threshold: threshold.String(), + VetoThreshold: veto.String(), }) } -func (suite *tallyHandlerSuite) voteOnProposal(voter sdk.AccAddress, proposalID uint64, option govtypes.VoteOption) { +func (suite *tallyHandlerSuite) voteOnProposal( + voter sdk.AccAddress, + proposalID uint64, + option govv1beta1.VoteOption, +) { gk := suite.app.GetGovKeeper() err := gk.AddVote(suite.ctx, proposalID, voter, - govtypes.NewNonSplitVoteOption(option), + govv1.NewNonSplitVoteOption(govv1.VoteOption(option)), + "", ) suite.Require().NoError(err) } -func (suite *tallyHandlerSuite) createProposal() govtypes.Proposal { +func (suite *tallyHandlerSuite) createProposal() govv1.Proposal { gk := suite.app.GetGovKeeper() deposit := gk.GetDepositParams(suite.ctx).MinDeposit proposer := suite.createAccount(deposit...) - msg, err := govtypes.NewMsgSubmitProposal( - govtypes.NewTextProposal("a title", "a description"), + msg, err := govv1beta1.NewMsgSubmitProposal( + govv1beta1.NewTextProposal("a title", "a description"), deposit, proposer.GetAddress(), ) suite.Require().NoError(err) - msgServer := govkeeper.NewMsgServerImpl(gk) + msgServerv1 := govkeeper.NewMsgServerImpl(gk) + + govAcct := gk.GetGovernanceAccount(suite.ctx).GetAddress() + msgServer := govkeeper.NewLegacyMsgServerImpl(govAcct.String(), msgServerv1) res, err := msgServer.SubmitProposal(sdk.WrapSDKContext(suite.ctx), msg) suite.Require().NoError(err) diff --git a/app/test_common.go b/app/test_common.go index 932301e4..159b30fe 100644 --- a/app/test_common.go +++ b/app/test_common.go @@ -2,19 +2,24 @@ package app import ( "encoding/json" + "fmt" "math/rand" "testing" "time" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + "github.com/cosmos/cosmos-sdk/testutil/mock" sdk "github.com/cosmos/cosmos-sdk/types" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" crisiskeeper "github.com/cosmos/cosmos-sdk/x/crisis/keeper" distkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" @@ -24,13 +29,14 @@ import ( slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + evmkeeper "github.com/evmos/ethermint/x/evm/keeper" + feemarketkeeper "github.com/evmos/ethermint/x/feemarket/keeper" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmtypes "github.com/tendermint/tendermint/types" tmdb "github.com/tendermint/tm-db" - evmkeeper "github.com/tharsis/ethermint/x/evm/keeper" - feemarketkeeper "github.com/tharsis/ethermint/x/feemarket/keeper" auctionkeeper "github.com/kava-labs/kava/x/auction/keeper" bep3keeper "github.com/kava-labs/kava/x/bep3/keeper" @@ -59,15 +65,20 @@ var ( // TestApp is a simple wrapper around an App. It exposes internal keepers for use in integration tests. // This file also contains test helpers. Ideally they would be in separate package. // Basic Usage: -// Create a test app with NewTestApp, then all keepers and their methods can be accessed for test setup and execution. +// +// Create a test app with NewTestApp, then all keepers and their methods can be accessed for test setup and execution. +// // Advanced Usage: -// Some tests call for an app to be initialized with some state. This can be achieved through keeper method calls (ie keeper.SetParams(...)). -// However this leads to a lot of duplicated logic similar to InitGenesis methods. -// So TestApp.InitializeFromGenesisStates() will call InitGenesis with the default genesis state. +// +// Some tests call for an app to be initialized with some state. This can be achieved through keeper method calls (ie keeper.SetParams(...)). +// However this leads to a lot of duplicated logic similar to InitGenesis methods. +// So TestApp.InitializeFromGenesisStates() will call InitGenesis with the default genesis state. // and TestApp.InitializeFromGenesisStates(authState, cdpState) will do the same but overwrite the auth and cdp sections of the default genesis state -// Creating the genesis states can be combersome, but helper methods can make it easier such as NewAuthGenStateFromAccounts below. +// Creating the genesis states can be combersome, but helper methods can make it easier such as NewAuthGenStateFromAccounts below. type TestApp struct { App + + GenesisAddrs []sdk.AccAddress } // NewTestApp creates a new TestApp @@ -129,6 +140,137 @@ func (app *App) AppCodec() codec.Codec { return app.appCodec } +// SetupWithGenesisValSet initializes GenesisState with a single validator and genesis accounts +// that also act as delegators. +func GenesisStateWithSingleValidator( + app *TestApp, + genesisState GenesisState, +) GenesisState { + privVal := mock.NewPV() + pubKey, err := privVal.GetPubKey() + if err != nil { + panic(fmt.Errorf("error getting pubkey: %w", err)) + } + + // create validator set with single validator + validator := tmtypes.NewValidator(pubKey, 1) + valSet := tmtypes.NewValidatorSet([]*tmtypes.Validator{validator}) + + // generate genesis account + senderPrivKey := secp256k1.GenPrivKey() + acc := authtypes.NewBaseAccount(senderPrivKey.PubKey().Address().Bytes(), senderPrivKey.PubKey(), 0, 0) + app.GenesisAddrs = append(app.GenesisAddrs, acc.GetAddress()) + + balances := []banktypes.Balance{ + { + Address: acc.GetAddress().String(), + Coins: sdk.NewCoins(sdk.NewCoin("ukava", sdk.NewInt(100000000000000))), + }, + } + + return genesisStateWithValSet(app, genesisState, valSet, []authtypes.GenesisAccount{acc}, balances...) +} + +// genesisStateWithValSet applies the provided validator set and genesis accounts +// to the provided genesis state, appending to any existing state without replacement. +func genesisStateWithValSet( + app *TestApp, + genesisState GenesisState, + valSet *tmtypes.ValidatorSet, + genAccs []authtypes.GenesisAccount, + balances ...banktypes.Balance, +) GenesisState { + // set genesis accounts + currentAuthGenesis := authtypes.GetGenesisStateFromAppState(app.appCodec, genesisState) + currentAccs, err := authtypes.UnpackAccounts(currentAuthGenesis.Accounts) + if err != nil { + panic(fmt.Errorf("error unpacking accounts: %w", err)) + } + + // Add the new accounts to the existing ones + authGenesis := authtypes.NewGenesisState(currentAuthGenesis.Params, append(currentAccs, genAccs...)) + + validators := make([]stakingtypes.Validator, 0, len(valSet.Validators)) + delegations := make([]stakingtypes.Delegation, 0, len(valSet.Validators)) + + bondAmt := sdk.DefaultPowerReduction + + for _, val := range valSet.Validators { + pk, err := cryptocodec.FromTmPubKeyInterface(val.PubKey) + if err != nil { + panic(fmt.Errorf("error converting validator public key: %w", err)) + } + + pkAny, err := codectypes.NewAnyWithValue(pk) + if err != nil { + panic(fmt.Errorf("can't pack public key into Any: %w", err)) + } + + validator := stakingtypes.Validator{ + OperatorAddress: sdk.ValAddress(val.Address).String(), + ConsensusPubkey: pkAny, + Jailed: false, + Status: stakingtypes.Bonded, + Tokens: bondAmt, + DelegatorShares: sdk.OneDec(), + Description: stakingtypes.Description{ + Moniker: "genesis validator", + }, + UnbondingHeight: int64(0), + UnbondingTime: time.Unix(0, 0).UTC(), + Commission: stakingtypes.NewCommission(sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()), + MinSelfDelegation: sdk.ZeroInt(), + } + validators = append(validators, validator) + delegations = append(delegations, stakingtypes.NewDelegation(genAccs[0].GetAddress(), val.Address.Bytes(), sdk.OneDec())) + + } + // set validators and delegations + currentStakingGenesis := stakingtypes.GetGenesisStateFromAppState(app.appCodec, genesisState) + currentStakingGenesis.Params.BondDenom = "ukava" + + stakingGenesis := stakingtypes.NewGenesisState( + currentStakingGenesis.Params, + append(currentStakingGenesis.Validators, validators...), + append(currentStakingGenesis.Delegations, delegations...), + ) + + // Add the new balances to the existing ones + currentBankGenesis := banktypes.GetGenesisStateFromAppState(app.appCodec, genesisState) + balances = append(currentBankGenesis.Balances, balances...) + + totalSupply := sdk.NewCoins() + for _, b := range balances { + // add genesis acc tokens to total supply + totalSupply = totalSupply.Add(b.Coins...) + } + + for range delegations { + // add delegated tokens to total supply + totalSupply = totalSupply.Add(sdk.NewCoin("ukava", bondAmt)) + } + + // add bonded amount to bonded pool module account + balances = append(balances, banktypes.Balance{ + Address: authtypes.NewModuleAddress(stakingtypes.BondedPoolName).String(), + Coins: sdk.Coins{sdk.NewCoin("ukava", bondAmt)}, + }) + + bankGenesis := banktypes.NewGenesisState( + currentBankGenesis.Params, + balances, + totalSupply, + currentBankGenesis.DenomMetadata, + ) + + // set genesis state + genesisState[authtypes.ModuleName] = app.appCodec.MustMarshalJSON(authGenesis) + genesisState[banktypes.ModuleName] = app.appCodec.MustMarshalJSON(bankGenesis) + genesisState[stakingtypes.ModuleName] = app.appCodec.MustMarshalJSON(stakingGenesis) + + return genesisState +} + // InitializeFromGenesisStates calls InitChain on the app using the provided genesis states. // If any module genesis states are missing, defaults are used. func (tApp TestApp) InitializeFromGenesisStates(genesisStates ...GenesisState) TestApp { @@ -149,15 +291,37 @@ func (tApp TestApp) InitializeFromGenesisStatesWithTimeAndChainID(genTime time.T // InitializeFromGenesisStatesWithTimeAndChainIDAndHeight calls InitChain on the app using the provided genesis states and other parameters. // If any module genesis states are missing, defaults are used. -func (tApp TestApp) InitializeFromGenesisStatesWithTimeAndChainIDAndHeight(genTime time.Time, chainID string, initialHeight int64, genesisStates ...GenesisState) TestApp { +func (tApp TestApp) InitializeFromGenesisStatesWithTimeAndChainIDAndHeight( + genTime time.Time, + chainID string, + initialHeight int64, + genesisStates ...GenesisState, +) TestApp { // Create a default genesis state and overwrite with provided values genesisState := NewDefaultGenesisState() + modifiedStates := make(map[string]bool) + for _, state := range genesisStates { for k, v := range state { genesisState[k] = v + + // Ensure that the same module genesis state is not set more than once. + // Multiple GenesisStates can have the same module genesis state, but + // the same module genesis state will be overwritten. + if previouslyModified := modifiedStates[k]; previouslyModified { + panic(fmt.Sprintf("genesis state for module %s was set more than once, this overrides previous state", k)) + } + + modifiedStates[k] = true } } + // Add default genesis states for at least 1 validator + genesisState = GenesisStateWithSingleValidator( + &tApp, + genesisState, + ) + // Initialize the chain stateBytes, err := json.Marshal(genesisState) if err != nil { @@ -185,9 +349,57 @@ func (tApp TestApp) InitializeFromGenesisStatesWithTimeAndChainIDAndHeight(genTi Height: tApp.LastBlockHeight() + 1, Time: genTime, ChainID: chainID, }, }) + return tApp } +// DeleteGenesisValidator deletes the genesis validator from the staking module. +// This is useful for testing with validators, but only want to consider the +// validators added in the test. InitGenesis requires at least 1 validator, so +// it must be deleted additional validators are created. +func (tApp TestApp) DeleteGenesisValidator(t *testing.T, ctx sdk.Context) { + sk := tApp.GetStakingKeeper() + vals := sk.GetAllValidators(ctx) + + var genVal stakingtypes.Validator + found := false + for _, val := range vals { + if val.GetMoniker() == "genesis validator" { + genVal = val + found = true + break + } + } + + require.True(t, found, "genesis validator not found") + + delegations := sk.GetValidatorDelegations(ctx, genVal.GetOperator()) + for _, delegation := range delegations { + _, err := sk.Undelegate(ctx, delegation.GetDelegatorAddr(), genVal.GetOperator(), delegation.Shares) + require.NoError(t, err) + } +} + +func (tApp TestApp) DeleteGenesisValidatorCoins(t *testing.T, ctx sdk.Context) { + ak := tApp.GetAccountKeeper() + bk := tApp.GetBankKeeper() + + notBondedAcc := ak.GetModuleAccount(ctx, stakingtypes.NotBondedPoolName) + + // Burn genesis account balance - use staking module to burn + genAccBal := bk.GetAllBalances(ctx, tApp.GenesisAddrs[0]) + err := bk.SendCoinsFromAccountToModule(ctx, tApp.GenesisAddrs[0], stakingtypes.NotBondedPoolName, genAccBal) + require.NoError(t, err) + + // Burn coins from the module account + err = bk.BurnCoins( + ctx, + stakingtypes.NotBondedPoolName, + bk.GetAllBalances(ctx, notBondedAcc.GetAddress()), + ) + require.NoError(t, err) +} + // CheckBalance requires the account address has the expected amount of coins. func (tApp TestApp) CheckBalance(t *testing.T, ctx sdk.Context, owner sdk.AccAddress, expectedCoins sdk.Coins) { coins := tApp.GetBankKeeper().GetAllBalances(ctx, owner) @@ -244,6 +456,20 @@ func (tApp TestApp) CreateNewUnbondedValidator(ctx sdk.Context, valAddress sdk.V return err } +func (tApp TestApp) SetInflation(ctx sdk.Context, value sdk.Dec) { + mk := tApp.GetMintKeeper() + + mintParams := mk.GetParams(ctx) + mintParams.InflationMax = sdk.ZeroDec() + mintParams.InflationMin = sdk.ZeroDec() + + if err := mintParams.Validate(); err != nil { + panic(err) + } + + mk.SetParams(ctx, mintParams) +} + // GeneratePrivKeyAddressPairsFromRand generates (deterministically) a total of n private keys and addresses. func GeneratePrivKeyAddressPairs(n int) (keys []cryptotypes.PrivKey, addrs []sdk.AccAddress) { r := rand.New(rand.NewSource(12345)) // make the generation deterministic diff --git a/build/proto-deps.mk b/build/proto-deps.mk index 3d5ab10e..2caae243 100644 --- a/build/proto-deps.mk +++ b/build/proto-deps.mk @@ -17,8 +17,8 @@ GOGO_PATH := $(shell go list -m -f '{{.Dir}}' github.com/gogo/protobuf) TENDERMINT_PATH := $(shell go list -m -f '{{.Dir}}' github.com/tendermint/tendermint) COSMOS_PROTO_PATH := $(shell go list -m -f '{{.Dir}}' github.com/cosmos/cosmos-proto) COSMOS_SDK_PATH := $(shell go list -m -f '{{.Dir}}' github.com/cosmos/cosmos-sdk) -IBC_GO_PATH := $(shell go list -m -f '{{.Dir}}' github.com/cosmos/ibc-go/v3) -ETHERMINT_PATH := $(shell go list -m -f '{{.Dir}}' github.com/tharsis/ethermint) +IBC_GO_PATH := $(shell go list -m -f '{{.Dir}}' github.com/cosmos/ibc-go/v6) +ETHERMINT_PATH := $(shell go list -m -f '{{.Dir}}' github.com/evmos/ethermint) # # Common target directories diff --git a/ci/env/kava-internal-testnet/genesis.json b/ci/env/kava-internal-testnet/genesis.json index 6530c3b4..cc700df3 100644 --- a/ci/env/kava-internal-testnet/genesis.json +++ b/ci/env/kava-internal-testnet/genesis.json @@ -1218,7 +1218,9 @@ "berlin_block": "0", "london_block": null, "arrow_glacier_block": null, - "merge_fork_block": null + "merge_netsplit_block": null, + "shanghai_block": null, + "cancun_block": null }, "eip712_allowed_msgs": [ { @@ -1752,7 +1754,9 @@ "base_fee_change_denominator": 8, "elasticity_multiplier": 2, "enable_height": "0", - "base_fee": "1000000000" + "base_fee": "1000000000", + "min_gas_price": "0.000000000000000000", + "min_gas_multiplier": "0.500000000000000000" }, "block_gas": "0" }, @@ -3212,7 +3216,8 @@ "max_validators": 100, "max_entries": 7, "historical_entries": 10000, - "bond_denom": "ukava" + "bond_denom": "ukava", + "min_commission_rate": "0" }, "last_total_power": "0", "last_validator_powers": [], diff --git a/client/docs/config.json b/client/docs/config.json index 295a40b2..3422c14a 100644 --- a/client/docs/config.json +++ b/client/docs/config.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "title": "Kava - Legacy REST and gRPC Gateway docs", + "title": "Kava - gRPC Gateway docs", "description": "A REST interface for state queries", "version": "1.0.0" }, @@ -267,12 +267,6 @@ } ] } - }, - { - "url": "./client/docs/legacy-swagger.yml", - "dereference": { - "circular": "ignore" - } } ] } diff --git a/client/docs/cosmos-swagger.yml b/client/docs/cosmos-swagger.yml index 4419c7b9..1fa424c0 100644 --- a/client/docs/cosmos-swagger.yml +++ b/client/docs/cosmos-swagger.yml @@ -1,4628 +1,13 @@ swagger: '2.0' info: - title: Cosmos SDK - Legacy REST and gRPC Gateway docs - description: 'A REST interface for state queries, legacy transactions' + title: Cosmos SDK - gRPC Gateway docs + description: A REST interface for state queries version: 1.0.0 paths: - /node_info: - get: - description: Information about the connected node - summary: The properties of the connected node - tags: - - Gaia REST - produces: - - application/json - responses: - '200': - description: Node status - schema: - type: object - properties: - application_version: - properties: - build_tags: - type: string - client_name: - type: string - commit: - type: string - go: - type: string - name: - type: string - server_name: - type: string - version: - type: string - node_info: - properties: - id: - type: string - moniker: - type: string - example: validator-name - protocol_version: - properties: - p2p: - type: string - example: 7 - block: - type: string - example: 10 - app: - type: string - example: 0 - network: - type: string - example: gaia-2 - channels: - type: string - listen_addr: - type: string - example: '192.168.56.1:26656' - version: - description: Tendermint version - type: string - example: 0.15.0 - other: - description: more information on versions - type: object - properties: - tx_index: - type: string - example: 'on' - rpc_address: - type: string - example: 'tcp://0.0.0.0:26657' - '500': - description: Failed to query node status - /syncing: - get: - summary: Syncing state of node - tags: - - Tendermint RPC - description: Get if the node is currently syning with other nodes - produces: - - application/json - responses: - '200': - description: Node syncing status - schema: - type: object - properties: - syncing: - type: boolean - '500': - description: Server internal error - /blocks/latest: - get: - summary: Get the latest block - tags: - - Tendermint RPC - produces: - - application/json - responses: - '200': - description: The latest block - schema: - type: object - properties: - block_meta: - type: object - properties: - header: - type: object - properties: - chain_id: - type: string - example: cosmoshub-2 - 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: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - 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: cosmoshub-2 - 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: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - 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== - '500': - description: Server internal error - '/blocks/{height}': - get: - summary: Get a block at a certain height - tags: - - Tendermint RPC - produces: - - application/json - parameters: - - in: path - name: height - description: Block height - required: true - type: number - x-example: 1 - responses: - '200': - description: The block at a specific height - schema: - type: object - properties: - block_meta: - type: object - properties: - header: - type: object - properties: - chain_id: - type: string - example: cosmoshub-2 - 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: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - 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: cosmoshub-2 - 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: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - 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== - '400': - description: Invalid height - '404': - description: Request block height doesn't - '500': - description: Server internal error - /validatorsets/latest: - get: - summary: Get the latest validator set - tags: - - Tendermint RPC - produces: - - application/json - responses: - '200': - description: The validator set at the latest block height - schema: - type: object - properties: - block_height: - type: string - validators: - type: array - items: - type: object - properties: - address: - type: string - description: bech32 encoded address - example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - pub_key: - type: string - example: >- - cosmosvalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf - voting_power: - type: string - example: '1000' - proposer_priority: - type: string - example: '1000' - '500': - description: Server internal error - '/validatorsets/{height}': - get: - summary: Get a validator set a certain height - tags: - - Tendermint RPC - produces: - - application/json - parameters: - - in: path - name: height - description: Block height - required: true - type: number - x-example: 1 - responses: - '200': - description: The validator set at a specific block height - schema: - type: object - properties: - block_height: - type: string - validators: - type: array - items: - type: object - properties: - address: - type: string - description: bech32 encoded address - example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - pub_key: - type: string - example: >- - cosmosvalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf - voting_power: - type: string - example: '1000' - proposer_priority: - type: string - example: '1000' - '400': - description: Invalid height - '404': - description: Block at height not available - '500': - description: Server internal error - '/txs/{hash}': - get: - deprecated: true - summary: Get a Tx by hash - tags: - - Transactions - description: Retrieve a transaction using its hash. - produces: - - application/json - parameters: - - in: path - name: hash - description: Tx hash - required: true - type: string - x-example: BCBE20E8D46758B96AE5883B792858296AC06E51435490FBDCAE25A72B3CC76B - responses: - '200': - description: Tx with the provided hash - schema: - 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: stake - 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 - '500': - description: Internal Server Error - /txs: - get: - deprecated: true - tags: - - Transactions - summary: Search transactions - description: Search transactions by events. - produces: - - application/json - parameters: - - in: query - name: message.action - type: string - description: >- - transaction events such as 'message.action=send' which results in - the following endpoint: 'GET /txs?message.action=send'. note that - each module documents its own events. look for xx_events.md in the - corresponding cosmos-sdk/docs/spec directory - x-example: send - - in: query - name: message.sender - type: string - description: >- - transaction tags with sender: 'GET - /txs?message.action=send&message.sender=cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv' - x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv - - in: query - name: page - description: Page number - type: integer - x-example: 1 - - in: query - name: limit - description: Maximum number of items per page - type: integer - x-example: 1 - - in: query - name: tx.minheight - type: integer - description: transactions on blocks with height greater or equal this value - x-example: 25 - - in: query - name: tx.maxheight - type: integer - description: transactions on blocks with height less than or equal this value - x-example: 800000 - responses: - '200': - description: All txs matching the provided events - schema: - 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: stake - 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 - '400': - description: Invalid search events - '500': - description: Internal Server Error - post: - tags: - - Transactions - summary: Broadcast a signed tx - description: Broadcast a signed tx to a full node - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: txBroadcast - description: >- - The tx must be a signed StdTx. The supported broadcast modes include - `"block"`(return after tx commit), `"sync"`(return afer CheckTx) and - `"async"`(return right away). - required: true - schema: - 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: stake - 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' - mode: - type: string - example: block - responses: - '200': - description: Tx broadcasting result - schema: - 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 - '500': - description: Internal Server Error - /txs/encode: - post: - deprecated: true - tags: - - Transactions - summary: Encode a transaction to the Amino wire format - description: >- - Encode a transaction (signed or not) from JSON to base64-encoded Amino - serialized bytes - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: tx - description: The tx to encode - required: true - schema: - 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: stake - 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' - responses: - '200': - description: The tx was successfully decoded and re-encoded - schema: - type: object - properties: - tx: - type: string - example: The base64-encoded Amino-serialized bytes for the tx - '400': - description: The tx was malformated - '500': - description: Server internal error - /txs/decode: - post: - deprecated: true - tags: - - Transactions - summary: Decode a transaction from the Amino wire format - description: >- - Decode a transaction (signed or not) from base64-encoded Amino - serialized bytes to JSON - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: tx - description: The tx to decode - required: true - schema: - type: object - properties: - tx: - type: string - example: >- - SvBiXe4KPqijYZoKFFHEzJ8c2HPAfv2EFUcIhx0yPagwEhTy0vPA+GGhCEslKXa4Af0uB+mfShoMCgVzdGFrZRIDMTAwEgQQwJoM - responses: - '200': - description: The tx was successfully decoded - schema: - 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: stake - 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' - '400': - description: The tx was malformated - '500': - description: Server internal error - '/bank/balances/{address}': - get: - deprecated: true - summary: Get the account balances - tags: - - Bank - produces: - - application/json - parameters: - - in: path - name: address - description: Account address in bech32 format - required: true - type: string - x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv - responses: - '200': - description: Account balances - schema: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - '500': - description: Server internal error - '/bank/accounts/{address}/transfers': - post: - deprecated: true - summary: Send coins from one account to another - tags: - - Bank - consumes: - - application/json - produces: - - application/json - parameters: - - in: path - name: address - description: Account address in bech32 format - required: true - type: string - x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv - - in: body - name: account - description: The sender and tx information - required: true - schema: - type: object - properties: - base_req: - type: object - properties: - from: - type: string - example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: "Sent via Cosmos Voyager \U0001F680" - chain_id: - type: string - example: Cosmos-Hub - 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: stake - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - responses: - '202': - description: Tx was succesfully generated - schema: - 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: stake - 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' - '400': - description: Invalid request - '500': - description: Server internal error - /bank/total: - get: - deprecated: true - summary: Total supply of coins in the chain - tags: - - Bank - produces: - - application/json - responses: - '200': - description: OK - schema: - type: object - properties: - total: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - '500': - description: Internal Server Error - '/bank/total/{denomination}': - parameters: - - in: path - name: denomination - description: Coin denomination - required: true - type: string - x-example: uatom - get: - deprecated: true - summary: Total supply of a single coin denomination - tags: - - Bank - produces: - - application/json - responses: - '200': - description: OK - schema: - type: string - '400': - description: Invalid coin denomination - '500': - description: Internal Server Error - '/auth/accounts/{address}': - get: - deprecated: true - summary: Get the account information on blockchain - tags: - - Auth - produces: - - application/json - parameters: - - in: path - name: address - description: Account address - required: true - type: string - x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv - responses: - '200': - description: Account information on the blockchain - schema: - type: object - properties: - type: - type: string - value: - type: object - properties: - account_number: - type: string - address: - type: string - coins: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - public_key: - type: object - properties: - type: - type: string - value: - type: string - sequence: - type: string - '500': - description: Server internel error - '/staking/delegators/{delegatorAddr}/delegations': - parameters: - - in: path - name: delegatorAddr - description: Bech32 AccAddress of Delegator - required: true - type: string - x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv - get: - deprecated: true - summary: Get all delegations from a delegator - tags: - - Staking - produces: - - application/json - responses: - '200': - description: OK - schema: - type: array - items: - type: object - properties: - delegator_address: - type: string - validator_address: - type: string - shares: - type: string - balance: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - '400': - description: Invalid delegator address - '500': - description: Internal Server Error - post: - summary: Submit delegation - parameters: - - in: body - name: delegation - description: Delegate an amount of liquid coins to a validator - schema: - type: object - properties: - base_req: - type: object - properties: - from: - type: string - example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: "Sent via Cosmos Voyager \U0001F680" - chain_id: - type: string - example: Cosmos-Hub - 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: stake - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - delegator_address: - type: string - description: bech32 encoded address - example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - validator_address: - type: string - description: bech32 encoded address - example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - amount: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - tags: - - Staking - consumes: - - application/json - produces: - - application/json - responses: - '200': - description: OK - schema: - 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: stake - 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' - '400': - description: Invalid delegator address or delegation request body - '401': - description: Key password is wrong - '500': - description: Internal Server Error - '/staking/delegators/{delegatorAddr}/delegations/{validatorAddr}': - parameters: - - in: path - name: delegatorAddr - description: Bech32 AccAddress of Delegator - required: true - type: string - x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv - - in: path - name: validatorAddr - description: Bech32 OperatorAddress of validator - required: true - type: string - x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - get: - deprecated: true - summary: Query the current delegation between a delegator and a validator - tags: - - Staking - produces: - - application/json - responses: - '200': - description: OK - schema: - type: object - properties: - delegator_address: - type: string - validator_address: - type: string - shares: - type: string - balance: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - '400': - description: Invalid delegator address or validator address - '500': - description: Internal Server Error - '/staking/delegators/{delegatorAddr}/unbonding_delegations': - parameters: - - in: path - name: delegatorAddr - description: Bech32 AccAddress of Delegator - required: true - type: string - x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv - get: - deprecated: true - summary: Get all unbonding delegations from a delegator - tags: - - Staking - produces: - - application/json - responses: - '200': - description: OK - schema: - type: array - items: - type: object - properties: - delegator_address: - type: string - validator_address: - type: string - initial_balance: - type: string - balance: - type: string - creation_height: - type: integer - min_time: - type: integer - '400': - description: Invalid delegator address - '500': - description: Internal Server Error - post: - summary: Submit an unbonding delegation - parameters: - - in: body - name: delegation - description: Unbond an amount of bonded shares from a validator - schema: - type: object - properties: - base_req: - type: object - properties: - from: - type: string - example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: "Sent via Cosmos Voyager \U0001F680" - chain_id: - type: string - example: Cosmos-Hub - 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: stake - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - delegator_address: - type: string - description: bech32 encoded address - example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - validator_address: - type: string - description: bech32 encoded address - example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - amount: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - tags: - - Staking - consumes: - - application/json - produces: - - application/json - responses: - '200': - description: OK - schema: - 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: stake - 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' - '400': - description: Invalid delegator address or unbonding delegation request body - '401': - description: Key password is wrong - '500': - description: Internal Server Error - '/staking/delegators/{delegatorAddr}/unbonding_delegations/{validatorAddr}': - parameters: - - in: path - name: delegatorAddr - description: Bech32 AccAddress of Delegator - required: true - type: string - x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv - - in: path - name: validatorAddr - description: Bech32 OperatorAddress of validator - required: true - type: string - x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - get: - deprecated: true - summary: Query all unbonding delegations between a delegator and a validator - tags: - - Staking - produces: - - application/json - responses: - '200': - description: OK - schema: - 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 - min_time: - type: string - '400': - description: Invalid delegator address or validator address - '500': - description: Internal Server Error - /staking/redelegations: - parameters: - - in: query - name: delegator - description: Bech32 AccAddress of Delegator - required: false - type: string - - in: query - name: validator_from - description: Bech32 ValAddress of SrcValidator - required: false - type: string - - in: query - name: validator_to - description: Bech32 ValAddress of DstValidator - required: false - type: string - get: - deprecated: true - summary: Get all redelegations (filter by query params) - tags: - - Staking - produces: - - application/json - responses: - '200': - description: OK - schema: - type: array - items: - $ref: '#/definitions/Redelegation' - '500': - description: Internal Server Error - '/staking/delegators/{delegatorAddr}/redelegations': - parameters: - - in: path - name: delegatorAddr - description: Bech32 AccAddress of Delegator - required: true - type: string - x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv - post: - deprecated: true - summary: Submit a redelegation - parameters: - - in: body - name: delegation - description: The sender and tx information - schema: - type: object - properties: - base_req: - type: object - properties: - from: - type: string - example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: "Sent via Cosmos Voyager \U0001F680" - chain_id: - type: string - example: Cosmos-Hub - 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: stake - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - delegator_address: - type: string - description: bech32 encoded address - example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - validator_src_addressess: - type: string - description: bech32 encoded address - example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - validator_dst_address: - type: string - description: bech32 encoded address - example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - shares: - type: string - example: '100' - tags: - - Staking - consumes: - - application/json - produces: - - application/json - responses: - '200': - description: Tx was succesfully generated - schema: - 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: stake - 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' - '400': - description: Invalid delegator address or redelegation request body - '500': - description: Internal Server Error - '/staking/delegators/{delegatorAddr}/validators': - parameters: - - in: path - name: delegatorAddr - description: Bech32 AccAddress of Delegator - required: true - type: string - x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv - get: - deprecated: true - summary: Query all validators that a delegator is bonded to - tags: - - Staking - produces: - - application/json - responses: - '200': - description: OK - schema: - type: array - items: - type: object - properties: - operator_address: - type: string - description: bech32 encoded address - example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - consensus_pubkey: - type: string - example: >- - cosmosvalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf - 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 - security_contact: - 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' - '400': - description: Invalid delegator address - '500': - description: Internal Server Error - '/staking/delegators/{delegatorAddr}/validators/{validatorAddr}': - parameters: - - in: path - name: delegatorAddr - description: Bech32 AccAddress of Delegator - required: true - type: string - x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv - - in: path - name: validatorAddr - description: Bech32 ValAddress of Delegator - required: true - type: string - x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - get: - deprecated: true - summary: Query a validator that a delegator is bonded to - tags: - - Staking - produces: - - application/json - responses: - '200': - description: OK - schema: - type: object - properties: - operator_address: - type: string - description: bech32 encoded address - example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - consensus_pubkey: - type: string - example: >- - cosmosvalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf - 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 - security_contact: - 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' - '400': - description: Invalid delegator address or validator address - '500': - description: Internal Server Error - /staking/validators: - get: - deprecated: true - summary: >- - Get all validator candidates. By default it returns only the bonded - validators. - parameters: - - in: query - name: status - type: string - description: >- - The validator bond status. Must be either 'bonded', 'unbonded', or - 'unbonding'. - x-example: bonded - - in: query - name: page - description: The page number. - type: integer - x-example: 1 - - in: query - name: limit - description: The maximum number of items per page. - type: integer - x-example: 1 - tags: - - Staking - produces: - - application/json - responses: - '200': - description: OK - schema: - type: array - items: - type: object - properties: - operator_address: - type: string - description: bech32 encoded address - example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - consensus_pubkey: - type: string - example: >- - cosmosvalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf - 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 - security_contact: - 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' - '500': - description: Internal Server Error - '/staking/validators/{validatorAddr}': - parameters: - - in: path - name: validatorAddr - description: Bech32 OperatorAddress of validator - required: true - type: string - x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - get: - deprecated: true - summary: Query the information from a single validator - tags: - - Staking - produces: - - application/json - responses: - '200': - description: OK - schema: - type: object - properties: - operator_address: - type: string - description: bech32 encoded address - example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - consensus_pubkey: - type: string - example: >- - cosmosvalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf - 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 - security_contact: - 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' - '400': - description: Invalid validator address - '500': - description: Internal Server Error - '/staking/validators/{validatorAddr}/delegations': - parameters: - - in: path - name: validatorAddr - description: Bech32 OperatorAddress of validator - required: true - type: string - x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - get: - deprecated: true - summary: Get all delegations from a validator - tags: - - Staking - produces: - - application/json - responses: - '200': - description: OK - schema: - type: array - items: - type: object - properties: - delegator_address: - type: string - validator_address: - type: string - shares: - type: string - balance: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - '400': - description: Invalid validator address - '500': - description: Internal Server Error - '/staking/validators/{validatorAddr}/unbonding_delegations': - parameters: - - in: path - name: validatorAddr - description: Bech32 OperatorAddress of validator - required: true - type: string - x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - get: - deprecated: true - summary: Get all unbonding delegations from a validator - tags: - - Staking - produces: - - application/json - responses: - '200': - description: OK - schema: - type: array - items: - type: object - properties: - delegator_address: - type: string - validator_address: - type: string - initial_balance: - type: string - balance: - type: string - creation_height: - type: integer - min_time: - type: integer - '400': - description: Invalid validator address - '500': - description: Internal Server Error - /staking/pool: - get: - deprecated: true - summary: Get the current state of the staking pool - tags: - - Staking - produces: - - application/json - responses: - '200': - description: OK - schema: - type: object - properties: - loose_tokens: - type: string - bonded_tokens: - type: string - inflation_last_time: - type: string - inflation: - type: string - date_last_commission_reset: - type: string - prev_bonded_shares: - type: string - '500': - description: Internal Server Error - /staking/parameters: - get: - deprecated: true - summary: Get the current staking parameter values - tags: - - Staking - produces: - - application/json - responses: - '200': - description: OK - schema: - type: object - properties: - inflation_rate_change: - type: string - inflation_max: - type: string - inflation_min: - type: string - goal_bonded: - type: string - unbonding_time: - type: string - max_validators: - type: integer - bond_denom: - type: string - '500': - description: Internal Server Error - /slashing/signing_infos: - get: - deprecated: true - summary: Get sign info of given all validators - description: Get sign info of all validators - produces: - - application/json - tags: - - Slashing - parameters: - - in: query - name: page - description: Page number - type: integer - required: true - x-example: 1 - - in: query - name: limit - description: Maximum number of items per page - type: integer - required: true - x-example: 5 - responses: - '200': - description: OK - schema: - type: array - items: - type: object - properties: - start_height: - type: string - index_offset: - type: string - jailed_until: - type: string - missed_blocks_counter: - type: string - '400': - description: Invalid validator public key for one of the validators - '500': - description: Internal Server Error - '/slashing/validators/{validatorAddr}/unjail': - post: - deprecated: true - summary: Unjail a jailed validator - description: Send transaction to unjail a jailed validator - consumes: - - application/json - produces: - - application/json - tags: - - Slashing - parameters: - - type: string - description: Bech32 validator address - name: validatorAddr - required: true - in: path - x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - - description: '' - name: UnjailBody - in: body - required: true - schema: - type: object - properties: - base_req: - 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: stake - 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' - responses: - '200': - description: Tx was succesfully generated - schema: - 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: stake - 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' - '400': - description: Invalid validator address or base_req - '500': - description: Internal Server Error - /slashing/parameters: - get: - deprecated: true - summary: Get the current slashing parameters - tags: - - Slashing - produces: - - application/json - responses: - '200': - description: OK - schema: - type: object - properties: - max_evidence_age: - type: string - signed_blocks_window: - type: string - min_signed_per_window: - type: string - double_sign_unbond_duration: - type: string - downtime_unbond_duration: - type: string - slash_fraction_double_sign: - type: string - slash_fraction_downtime: - type: string - '500': - description: Internal Server Error - /gov/proposals: - post: - deprecated: true - summary: Submit a proposal - description: Send transaction to submit a proposal - consumes: - - application/json - produces: - - application/json - tags: - - Governance - parameters: - - description: >- - valid value of `"proposal_type"` can be `"text"`, - `"parameter_change"`, `"software_upgrade"` - name: post_proposal_body - in: body - required: true - schema: - type: object - properties: - base_req: - type: object - properties: - from: - type: string - example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: "Sent via Cosmos Voyager \U0001F680" - chain_id: - type: string - example: Cosmos-Hub - 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: stake - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - title: - type: string - description: - type: string - proposal_type: - type: string - example: text - proposer: - type: string - description: bech32 encoded address - example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - initial_deposit: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - responses: - '200': - description: Tx was succesfully generated - schema: - 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: stake - 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' - '400': - description: Invalid proposal body - '500': - description: Internal Server Error - get: - deprecated: true - summary: Query proposals - description: Query proposals information with parameters - produces: - - application/json - tags: - - Governance - parameters: - - in: query - name: voter - description: voter address - required: false - type: string - - in: query - name: depositor - description: depositor address - required: false - type: string - - in: query - name: status - description: >- - proposal status, valid values can be `"deposit_period"`, - `"voting_period"`, `"passed"`, `"rejected"` - required: false - type: string - responses: - '200': - description: OK - schema: - type: array - items: - 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: stake - amount: - type: string - example: '50' - voting_start_time: - type: string - '400': - description: Invalid query parameters - '500': - description: Internal Server Error - /gov/proposals/param_change: - post: - deprecated: true - summary: Generate a parameter change proposal transaction - description: Generate a parameter change proposal transaction - consumes: - - application/json - produces: - - application/json - tags: - - Governance - parameters: - - description: >- - The parameter change proposal body that contains all parameter - changes - name: post_proposal_body - in: body - required: true - schema: - type: object - properties: - base_req: - type: object - properties: - from: - type: string - example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: "Sent via Cosmos Voyager \U0001F680" - chain_id: - type: string - example: Cosmos-Hub - 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: stake - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - title: - type: string - x-example: Param Change - description: - type: string - x-example: Update max validators - proposer: - type: string - description: bech32 encoded address - example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - deposit: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - changes: - type: array - items: - type: object - properties: - subspace: - type: string - example: staking - key: - type: string - example: MaxValidators - subkey: - type: string - example: '' - value: - type: object - responses: - '200': - description: The transaction was succesfully generated - schema: - 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: stake - 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' - '400': - description: Invalid proposal body - '500': - description: Internal Server Error - '/gov/proposals/{proposalId}': - get: - deprecated: true - summary: Query a proposal - description: Query a proposal by id - produces: - - application/json - tags: - - Governance - parameters: - - type: string - name: proposalId - required: true - in: path - x-example: '2' - responses: - '200': - description: OK - schema: - 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: stake - amount: - type: string - example: '50' - voting_start_time: - type: string - '400': - description: Invalid proposal id - '500': - description: Internal Server Error - '/gov/proposals/{proposalId}/proposer': - get: - deprecated: true - summary: Query proposer - description: Query for the proposer for a proposal - produces: - - application/json - tags: - - Governance - parameters: - - type: string - name: proposalId - required: true - in: path - x-example: '2' - responses: - '200': - description: OK - schema: - type: object - properties: - proposal_id: - type: string - proposer: - type: string - '400': - description: Invalid proposal ID - '500': - description: Internal Server Error - '/gov/proposals/{proposalId}/deposits': - get: - deprecated: true - summary: Query deposits - description: Query deposits by proposalId - produces: - - application/json - tags: - - Governance - parameters: - - type: string - name: proposalId - required: true - in: path - x-example: '2' - responses: - '200': - description: OK - schema: - type: array - items: - type: object - properties: - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - proposal_id: - type: string - depositor: - type: string - description: bech32 encoded address - example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - '400': - description: Invalid proposal id - '500': - description: Internal Server Error - post: - deprecated: true - summary: Deposit tokens to a proposal - description: Send transaction to deposit tokens to a proposal - consumes: - - application/json - produces: - - application/json - tags: - - Governance - parameters: - - type: string - description: proposal id - name: proposalId - required: true - in: path - x-example: '2' - - description: '' - name: post_deposit_body - in: body - required: true - schema: - type: object - properties: - base_req: - type: object - properties: - from: - type: string - example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: "Sent via Cosmos Voyager \U0001F680" - chain_id: - type: string - example: Cosmos-Hub - 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: stake - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - depositor: - type: string - description: bech32 encoded address - example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - responses: - '200': - description: OK - schema: - 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: stake - 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' - '400': - description: Invalid proposal id or deposit body - '401': - description: Key password is wrong - '500': - description: Internal Server Error - '/gov/proposals/{proposalId}/deposits/{depositor}': - get: - deprecated: true - summary: Query deposit - description: Query deposit by proposalId and depositor address - produces: - - application/json - tags: - - Governance - parameters: - - type: string - description: proposal id - name: proposalId - required: true - in: path - x-example: '2' - - type: string - description: Bech32 depositor address - name: depositor - required: true - in: path - x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv - responses: - '200': - description: OK - schema: - type: object - properties: - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - proposal_id: - type: string - depositor: - type: string - description: bech32 encoded address - example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - '400': - description: Invalid proposal id or depositor address - '404': - description: Found no deposit - '500': - description: Internal Server Error - '/gov/proposals/{proposalId}/votes': - get: - deprecated: true - summary: Query voters - description: Query voters information by proposalId - produces: - - application/json - tags: - - Governance - parameters: - - type: string - description: proposal id - name: proposalId - required: true - in: path - x-example: '2' - responses: - '200': - description: OK - schema: - type: array - items: - type: object - properties: - voter: - type: string - proposal_id: - type: string - option: - type: string - '400': - description: Invalid proposal id - '500': - description: Internal Server Error - post: - deprecated: true - summary: Vote a proposal - description: Send transaction to vote a proposal - consumes: - - application/json - produces: - - application/json - tags: - - Governance - parameters: - - type: string - description: proposal id - name: proposalId - required: true - in: path - x-example: '2' - - description: >- - valid value of `"option"` field can be `"yes"`, `"no"`, - `"no_with_veto"` and `"abstain"` - name: post_vote_body - in: body - required: true - schema: - type: object - properties: - base_req: - type: object - properties: - from: - type: string - example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: "Sent via Cosmos Voyager \U0001F680" - chain_id: - type: string - example: Cosmos-Hub - 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: stake - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - voter: - type: string - description: bech32 encoded address - example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - option: - type: string - example: 'yes' - responses: - '200': - description: OK - schema: - 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: stake - 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' - '400': - description: Invalid proposal id or vote body - '401': - description: Key password is wrong - '500': - description: Internal Server Error - '/gov/proposals/{proposalId}/votes/{voter}': - get: - deprecated: true - summary: Query vote - description: Query vote information by proposal Id and voter address - produces: - - application/json - tags: - - Governance - parameters: - - type: string - description: proposal id - name: proposalId - required: true - in: path - x-example: '2' - - type: string - description: Bech32 voter address - name: voter - required: true - in: path - x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv - responses: - '200': - description: OK - schema: - type: object - properties: - voter: - type: string - proposal_id: - type: string - option: - type: string - '400': - description: Invalid proposal id or voter address - '404': - description: Found no vote - '500': - description: Internal Server Error - '/gov/proposals/{proposalId}/tally': - get: - deprecated: true - summary: Get a proposal's tally result at the current time - description: >- - Gets a proposal's tally result at the current time. If the proposal is - pending deposits (i.e status 'DepositPeriod') it returns an empty tally - result. - produces: - - application/json - tags: - - Governance - parameters: - - type: string - description: proposal id - name: proposalId - required: true - in: path - x-example: '2' - responses: - '200': - description: OK - schema: - 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' - '400': - description: Invalid proposal id - '500': - description: Internal Server Error - /gov/parameters/deposit: - get: - deprecated: true - summary: Query governance deposit parameters - description: >- - Query governance deposit parameters. The max_deposit_period units are in - nanoseconds. - produces: - - application/json - tags: - - Governance - responses: - '200': - description: OK - schema: - type: object - properties: - min_deposit: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - max_deposit_period: - type: string - example: '86400000000000' - '400': - description: is not a valid query request path - '404': - description: Found no deposit parameters - '500': - description: Internal Server Error - /gov/parameters/tallying: - get: - deprecated: true - summary: Query governance tally parameters - description: Query governance tally parameters - produces: - - application/json - tags: - - Governance - responses: - '200': - description: OK - schema: - properties: - threshold: - type: string - example: '0.5000000000' - veto: - type: string - example: '0.3340000000' - governance_penalty: - type: string - example: '0.0100000000' - '400': - description: is not a valid query request path - '404': - description: Found no tally parameters - '500': - description: Internal Server Error - /gov/parameters/voting: - get: - deprecated: true - summary: Query governance voting parameters - description: >- - Query governance voting parameters. The voting_period units are in - nanoseconds. - produces: - - application/json - tags: - - Governance - responses: - '200': - description: OK - schema: - properties: - voting_period: - type: string - example: '86400000000000' - '400': - description: is not a valid query request path - '404': - description: Found no voting parameters - '500': - description: Internal Server Error - '/distribution/delegators/{delegatorAddr}/rewards': - parameters: - - in: path - name: delegatorAddr - description: Bech32 AccAddress of Delegator - required: true - type: string - x-example: cosmos167w96tdvmazakdwkw2u57227eduula2cy572lf - get: - deprecated: true - summary: Get the total rewards balance from all delegations - description: >- - Get the sum of all the rewards earned by delegations by a single - delegator - produces: - - application/json - tags: - - Distribution - responses: - '200': - description: OK - schema: - type: object - properties: - rewards: - type: array - items: - type: object - properties: - validator_address: - type: string - description: bech32 encoded address - example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - reward: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - total: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - '400': - description: Invalid delegator address - '500': - description: Internal Server Error - post: - deprecated: true - summary: Withdraw all the delegator's delegation rewards - description: Withdraw all the delegator's delegation rewards - tags: - - Distribution - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: Withdraw request body - schema: - properties: - base_req: - type: object - properties: - from: - type: string - example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: "Sent via Cosmos Voyager \U0001F680" - chain_id: - type: string - example: Cosmos-Hub - 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: stake - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - responses: - '200': - description: OK - schema: - 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: stake - 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' - '400': - description: Invalid delegator address - '401': - description: Key password is wrong - '500': - description: Internal Server Error - '/distribution/delegators/{delegatorAddr}/rewards/{validatorAddr}': - parameters: - - in: path - name: delegatorAddr - description: Bech32 AccAddress of Delegator - required: true - type: string - x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv - - in: path - name: validatorAddr - description: Bech32 OperatorAddress of validator - required: true - type: string - x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - get: - deprecated: true - summary: Query a delegation reward - description: Query a single delegation reward by a delegator - tags: - - Distribution - produces: - - application/json - responses: - '200': - description: OK - schema: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - '400': - description: Invalid delegator address - '500': - description: Internal Server Error - post: - deprecated: true - summary: Withdraw a delegation reward - description: Withdraw a delegator's delegation reward from a single validator - tags: - - Distribution - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: Withdraw request body - schema: - properties: - base_req: - type: object - properties: - from: - type: string - example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: "Sent via Cosmos Voyager \U0001F680" - chain_id: - type: string - example: Cosmos-Hub - 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: stake - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - responses: - '200': - description: OK - schema: - 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: stake - 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' - '400': - description: Invalid delegator address or delegation body - '401': - description: Key password is wrong - '500': - description: Internal Server Error - '/distribution/delegators/{delegatorAddr}/withdraw_address': - parameters: - - in: path - name: delegatorAddr - description: Bech32 AccAddress of Delegator - required: true - type: string - x-example: cosmos167w96tdvmazakdwkw2u57227eduula2cy572lf - get: - deprecated: true - summary: Get the rewards withdrawal address - description: >- - Get the delegations' rewards withdrawal address. This is the address in - which the user will receive the reward funds - tags: - - Distribution - produces: - - application/json - responses: - '200': - description: OK - schema: - type: string - description: bech32 encoded address - example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - '400': - description: Invalid delegator address - '500': - description: Internal Server Error - post: - deprecated: true - summary: Replace the rewards withdrawal address - description: Replace the delegations' rewards withdrawal address for a new one. - tags: - - Distribution - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: Withdraw request body - schema: - properties: - base_req: - type: object - properties: - from: - type: string - example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: "Sent via Cosmos Voyager \U0001F680" - chain_id: - type: string - example: Cosmos-Hub - 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: stake - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - withdraw_address: - type: string - description: bech32 encoded address - example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - responses: - '200': - description: OK - schema: - 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: stake - 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' - '400': - description: Invalid delegator or withdraw address - '401': - description: Key password is wrong - '500': - description: Internal Server Error - '/distribution/validators/{validatorAddr}': - parameters: - - in: path - name: validatorAddr - description: Bech32 OperatorAddress of validator - required: true - type: string - x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - get: - deprecated: true - summary: Validator distribution information - description: Query the distribution information of a single validator - tags: - - Distribution - produces: - - application/json - responses: - '200': - description: OK - schema: - type: object - properties: - operator_address: - type: string - description: bech32 encoded address - example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - self_bond_rewards: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - val_commission: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - '400': - description: Invalid validator address - '500': - description: Internal Server Error - '/distribution/validators/{validatorAddr}/outstanding_rewards': - parameters: - - in: path - name: validatorAddr - description: Bech32 OperatorAddress of validator - required: true - type: string - x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - get: - deprecated: true - summary: Fee distribution outstanding rewards of a single validator - tags: - - Distribution - produces: - - application/json - responses: - '200': - description: OK - schema: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - '500': - description: Internal Server Error - '/distribution/validators/{validatorAddr}/rewards': - parameters: - - in: path - name: validatorAddr - description: Bech32 OperatorAddress of validator - required: true - type: string - x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - get: - deprecated: true - summary: Commission and self-delegation rewards of a single validator - description: Query the commission and self-delegation rewards of validator. - tags: - - Distribution - produces: - - application/json - responses: - '200': - description: OK - schema: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - '400': - description: Invalid validator address - '500': - description: Internal Server Error - post: - deprecated: true - summary: Withdraw the validator's rewards - description: Withdraw the validator's self-delegation and commissions rewards - tags: - - Distribution - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: Withdraw request body - schema: - properties: - base_req: - type: object - properties: - from: - type: string - example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: "Sent via Cosmos Voyager \U0001F680" - chain_id: - type: string - example: Cosmos-Hub - 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: stake - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - responses: - '200': - description: OK - schema: - 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: stake - 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' - '400': - description: Invalid validator address - '401': - description: Key password is wrong - '500': - description: Internal Server Error - /distribution/community_pool: - get: - deprecated: true - summary: Community pool parameters - tags: - - Distribution - produces: - - application/json - responses: - '200': - description: OK - schema: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - '500': - description: Internal Server Error - /distribution/parameters: - get: - deprecated: true - summary: Fee distribution parameters - tags: - - Distribution - produces: - - application/json - responses: - '200': - description: OK - schema: - properties: - base_proposer_reward: - type: string - bonus_proposer_reward: - type: string - community_tax: - type: string - '500': - description: Internal Server Error - /minting/parameters: - get: - deprecated: true - summary: Minting module parameters - tags: - - Mint - produces: - - application/json - responses: - '200': - description: OK - schema: - properties: - mint_denom: - type: string - inflation_rate_change: - type: string - inflation_max: - type: string - inflation_min: - type: string - goal_bonded: - type: string - blocks_per_year: - type: string - '500': - description: Internal Server Error - /minting/inflation: - get: - deprecated: true - summary: Current minting inflation value - tags: - - Mint - produces: - - application/json - responses: - '200': - description: OK - schema: - type: string - '500': - description: Internal Server Error - /minting/annual-provisions: - get: - deprecated: true - summary: Current minting annual provisions value - tags: - - Mint - produces: - - application/json - responses: - '200': - description: OK - schema: - type: string - '500': - description: Internal Server Error /cosmos/auth/v1beta1/accounts: get: summary: Accounts returns all the existing accounts + description: 'Since: cosmos-sdk 0.43' operationId: Accounts responses: '200': @@ -4815,9 +200,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -4829,8 +215,11 @@ paths: description: >- QueryAccountsResponse is the response type for the Query/Accounts RPC method. + + + Since: cosmos-sdk 0.43 default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -5065,18 +454,19 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Query - '/cosmos/auth/v1beta1/accounts/{address}': + /cosmos/auth/v1beta1/accounts/{address}: get: summary: Account returns account details based on address. operationId: Account @@ -5261,7 +651,7 @@ paths: QueryAccountResponse is the response type for the Query/Account RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -5457,40 +847,245 @@ paths: type: string tags: - Query - /cosmos/auth/v1beta1/params: + /cosmos/auth/v1beta1/address_by_id/{id}: get: - summary: Params queries all parameters. - operationId: AuthParams + summary: AccountAddressByID returns account address based on account number. + description: 'Since: cosmos-sdk 0.46.2' + operationId: AccountAddressByID 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. + account_address: + type: string + description: 'Since: cosmos-sdk 0.46.2' + title: >- + QueryAccountAddressByIDResponse is the response type for + AccountAddressByID rpc method default: - description: An unexpected error response + 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: id + description: |- + id is the account number of the address to be queried. This field + should have been an uint64 (like all account numbers), and will be + updated to uint64 in a future version of the auth query. + in: path + required: true + type: string + format: int64 + tags: + - Query + /cosmos/auth/v1beta1/bech32: + get: + summary: Bech32Prefix queries bech32Prefix + description: 'Since: cosmos-sdk 0.46' + operationId: Bech32Prefix + responses: + '200': + description: A successful response. + schema: + type: object + properties: + bech32_prefix: + type: string + description: >- + Bech32PrefixResponse is the response type for Bech32Prefix rpc + method. + + + Since: cosmos-sdk 0.46 + default: + description: An unexpected error response. schema: type: object properties: @@ -5680,7 +1275,1427 @@ paths: } tags: - Query - '/cosmos/bank/v1beta1/balances/{address}': + /cosmos/auth/v1beta1/bech32/{address_bytes}: + get: + summary: AddressBytesToString converts Account Address bytes to string + description: 'Since: cosmos-sdk 0.46' + operationId: AddressBytesToString + responses: + '200': + description: A successful response. + schema: + type: object + properties: + address_string: + type: string + description: >- + AddressBytesToStringResponse is the response type for + AddressString rpc method. + + + Since: cosmos-sdk 0.46 + 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: address_bytes + in: path + required: true + type: string + format: byte + tags: + - Query + /cosmos/auth/v1beta1/bech32/{address_string}: + get: + summary: AddressStringToBytes converts Address string to bytes + description: 'Since: cosmos-sdk 0.46' + operationId: AddressStringToBytes + responses: + '200': + description: A successful response. + schema: + type: object + properties: + address_bytes: + type: string + format: byte + description: >- + AddressStringToBytesResponse is the response type for AddressBytes + rpc method. + + + Since: cosmos-sdk 0.46 + 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: address_string + in: path + required: true + type: string + tags: + - Query + /cosmos/auth/v1beta1/module_accounts: + get: + summary: ModuleAccounts returns all the existing module accounts. + description: 'Since: cosmos-sdk 0.46' + operationId: ModuleAccounts + responses: + '200': + description: A successful response. + schema: + type: object + properties: + accounts: + 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: >- + QueryModuleAccountsResponse is the response type for the + Query/ModuleAccounts RPC method. + + + Since: cosmos-sdk 0.46 + 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" + } + tags: + - Query + /cosmos/auth/v1beta1/module_accounts/{name}: + get: + summary: ModuleAccountByName returns the module account info by module name + operationId: ModuleAccountByName + responses: + '200': + description: A successful response. + schema: + type: object + properties: + account: + 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: >- + QueryModuleAccountByNameResponse is the response type for the + Query/ModuleAccountByName 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 + + 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: name + 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: >- + 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" + } + tags: + - Query + /cosmos/bank/v1beta1/balances/{address}: get: summary: AllBalances queries the balance of all coins for a single account. operationId: AllBalances @@ -5715,9 +2730,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -5732,7 +2748,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -5805,18 +2821,19 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Query - '/cosmos/bank/v1beta1/balances/{address}/{denom}': + /cosmos/bank/v1beta1/balances/{address}/by_denom: get: summary: Balance queries the balance of a single coin for a single account. operationId: Balance @@ -5845,7 +2862,7 @@ paths: QueryBalanceResponse is the response type for the Query/Balance RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -5874,18 +2891,19 @@ paths: type: string - name: denom description: denom is the coin denom to query balances for. - in: path - required: true + in: query + required: false type: string tags: - Query - '/cosmos/bank/v1beta1/denom_owners/{denom}': + /cosmos/bank/v1beta1/denom_owners/{denom}: get: summary: >- DenomOwners queries for all account addresses that own a particular token denomination. + description: 'Since: cosmos-sdk 0.46' operationId: DenomOwners responses: '200': @@ -5926,6 +2944,9 @@ paths: address and account balance of the denominated token. + + + Since: cosmos-sdk 0.46 pagination: description: pagination defines the pagination in the response. type: object @@ -5933,9 +2954,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -5947,8 +2969,11 @@ paths: description: >- QueryDenomOwnersResponse defines the RPC response of a DenomOwners RPC query. + + + Since: cosmos-sdk 0.46 default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -6023,15 +3048,16 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Query /cosmos/bank/v1beta1/denoms_metadata: @@ -6073,7 +3099,7 @@ paths: raise the base_denom to in order to equal the given DenomUnit's denom - 1 denom = 1^exponent base_denom + 1 denom = 10^exponent base_denom (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with @@ -6104,6 +3130,7 @@ paths: displayed in clients. name: type: string + description: 'Since: cosmos-sdk 0.43' title: 'name defines the name of the token (eg: Cosmos Atom)' symbol: type: string @@ -6112,11 +3139,17 @@ paths: (eg: ATOM). This can be the same as the display. + + + Since: cosmos-sdk 0.43 uri: type: string description: >- URI to a document (on or off-chain) that contains additional information. Optional. + + + Since: cosmos-sdk 0.46 uri_hash: type: string description: >- @@ -6124,6 +3157,9 @@ paths: It's used to verify that the document didn't change. Optional. + + + Since: cosmos-sdk 0.46 description: |- Metadata represents a struct that describes a basic token. @@ -6137,9 +3173,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -6154,7 +3191,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -6222,18 +3259,19 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Query - '/cosmos/bank/v1beta1/denoms_metadata/{denom}': + /cosmos/bank/v1beta1/denoms_metadata/{denom}: get: summary: DenomsMetadata queries the client metadata of a given coin denomination. operationId: DenomMetadata @@ -6268,7 +3306,7 @@ paths: raise the base_denom to in order to equal the given DenomUnit's denom - 1 denom = 1^exponent base_denom + 1 denom = 10^exponent base_denom (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with @@ -6299,6 +3337,7 @@ paths: displayed in clients. name: type: string + description: 'Since: cosmos-sdk 0.43' title: 'name defines the name of the token (eg: Cosmos Atom)' symbol: type: string @@ -6307,11 +3346,17 @@ paths: ATOM). This can be the same as the display. + + + Since: cosmos-sdk 0.43 uri: type: string description: >- URI to a document (on or off-chain) that contains additional information. Optional. + + + Since: cosmos-sdk 0.46 uri_hash: type: string description: >- @@ -6319,6 +3364,9 @@ paths: It's used to verify that the document didn't change. Optional. + + + Since: cosmos-sdk 0.46 description: |- Metadata represents a struct that describes a basic token. @@ -6328,7 +3376,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -6379,7 +3427,6 @@ paths: type: string enabled: type: boolean - format: boolean description: >- SendEnabled maps coin denom to a send_enabled status (whether a denom is @@ -6387,13 +3434,12 @@ paths: 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 + description: An unexpected error response. schema: type: object properties: @@ -6416,6 +3462,150 @@ paths: format: byte tags: - Query + /cosmos/bank/v1beta1/spendable_balances/{address}: + get: + summary: |- + SpendableBalances queries the spenable balance of all coins for a single + account. + description: 'Since: cosmos-sdk 0.46' + operationId: SpendableBalances + 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 spendable balances of all the coins. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QuerySpendableBalancesResponse defines the gRPC response structure + for querying + + an account's spendable balances. + + + Since: cosmos-sdk 0.46 + 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 spendable balances for. + in: path + required: true + type: string + - 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 + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query /cosmos/bank/v1beta1/supply: get: summary: TotalSupply queries the total supply of all coins. @@ -6445,15 +3635,19 @@ paths: signatures required by gogoproto. title: supply is the supply of the coins pagination: - description: pagination defines the pagination in the response. + description: |- + pagination defines the pagination in the response. + + Since: cosmos-sdk 0.43 type: object properties: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -6468,7 +3662,7 @@ paths: method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -6536,18 +3730,19 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Query - '/cosmos/bank/v1beta1/supply/{denom}': + /cosmos/bank/v1beta1/supply/by_denom: get: summary: SupplyOf queries the supply of a single coin. operationId: SupplyOf @@ -6576,7 +3771,7 @@ paths: QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -6600,11 +3795,308 @@ paths: parameters: - name: denom description: denom is the coin denom to query balances for. - in: path - required: true + in: query + required: false type: string tags: - Query + /cosmos/base/tendermint/v1beta1/abci_query: + get: + summary: >- + ABCIQuery defines a query handler that supports ABCI queries directly to + + the application, bypassing Tendermint completely. The ABCI query must + + contain a valid and supported path, including app, custom, p2p, and + store. + description: 'Since: cosmos-sdk 0.46' + operationId: ABCIQuery + responses: + '200': + description: A successful response. + schema: + type: object + properties: + code: + type: integer + format: int64 + log: + type: string + info: + type: string + index: + type: string + format: int64 + key: + type: string + format: byte + value: + type: string + format: byte + proof_ops: + type: object + properties: + ops: + type: array + items: + type: object + properties: + type: + type: string + key: + type: string + format: byte + data: + type: string + format: byte + description: >- + ProofOp defines an operation used for calculating Merkle + root. The data could + + be arbitrary format, providing nessecary data for + example neighbouring node + + hash. + + + Note: This type is a duplicate of the ProofOp proto type + defined in + + Tendermint. + description: >- + ProofOps is Merkle proof defined by the list of ProofOps. + + + Note: This type is a duplicate of the ProofOps proto type + defined in + + Tendermint. + height: + type: string + format: int64 + codespace: + type: string + description: >- + ABCIQueryResponse defines the response structure for the ABCIQuery + gRPC + + query. + + + Note: This type is a duplicate of the ResponseQuery proto type + defined in + + Tendermint. + 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: data + in: query + required: false + type: string + format: byte + - name: path + in: query + required: false + type: string + - name: height + in: query + required: false + type: string + format: int64 + - name: prove + in: query + required: false + type: boolean + tags: + - Service /cosmos/base/tendermint/v1beta1/blocks/latest: get: summary: GetLatestBlock returns the latest block. @@ -6633,6 +4125,7 @@ paths: title: PartsetHeader title: BlockID block: + title: 'Deprecated: please use `sdk_block` instead' type: object properties: header: @@ -7169,11 +4662,563 @@ paths: description: >- Commit contains the evidence that a block was committed by a set of validators. + sdk_block: + title: 'Since: cosmos-sdk 0.47' + 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 + description: >- + proposer_address is the original block proposer + address, formatted as a Bech32 string. + + In Tendermint, this type is `bytes`, but in the SDK, + we convert it to a Bech32 string + + for better UX. + 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: + 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: >- + Block is tendermint type Block, with the Header proposer + address + + field converted to bech32 string. description: >- GetLatestBlockResponse is the response type for the - Query/GetLatestBlock RPC method. + Query/GetLatestBlock RPC + + method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -7363,7 +5408,7 @@ paths: } tags: - Service - '/cosmos/base/tendermint/v1beta1/blocks/{height}': + /cosmos/base/tendermint/v1beta1/blocks/{height}: get: summary: GetBlockByHeight queries block for given height. operationId: GetBlockByHeight @@ -7391,6 +5436,7 @@ paths: title: PartsetHeader title: BlockID block: + title: 'Deprecated: please use `sdk_block` instead' type: object properties: header: @@ -7927,11 +5973,563 @@ paths: description: >- Commit contains the evidence that a block was committed by a set of validators. + sdk_block: + title: 'Since: cosmos-sdk 0.47' + 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 + description: >- + proposer_address is the original block proposer + address, formatted as a Bech32 string. + + In Tendermint, this type is `bytes`, but in the SDK, + we convert it to a Bech32 string + + for better UX. + 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: + 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: >- + Block is tendermint type Block, with the Header proposer + address + + field converted to bech32 string. description: >- GetBlockByHeightResponse is the response type for the - Query/GetBlockByHeight RPC method. + Query/GetBlockByHeight + + RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -8204,12 +6802,15 @@ paths: title: Module is the type for VersionInfo cosmos_sdk_version: type: string + title: 'Since: cosmos-sdk 0.43' description: VersionInfo is the type for the GetNodeInfoResponse message. description: >- - GetNodeInfoResponse is the request type for the Query/GetNodeInfo - RPC method. + GetNodeInfoResponse is the response type for the Query/GetNodeInfo + RPC + + method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -8411,12 +7012,11 @@ paths: properties: syncing: type: boolean - format: boolean description: >- GetSyncingResponse is the response type for the Query/GetSyncing RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -8817,9 +7417,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -8828,11 +7429,11 @@ paths: PageRequest.count_total was set, its value is undefined otherwise - description: >- + description: |- GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -9067,18 +7668,19 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Service - '/cosmos/base/tendermint/v1beta1/validatorsets/{height}': + /cosmos/base/tendermint/v1beta1/validatorsets/{height}: get: summary: GetValidatorSetByHeight queries validator-set at a given height. operationId: GetValidatorSetByHeight @@ -9289,9 +7891,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -9300,11 +7903,11 @@ paths: PageRequest.count_total was set, its value is undefined otherwise - description: >- + description: |- GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -9544,15 +8147,16 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Service /cosmos/distribution/v1beta1/community_pool: @@ -9590,7 +8194,7 @@ paths: RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -9613,7 +8217,7 @@ paths: format: byte tags: - Query - '/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards': + /cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards: get: summary: |- DelegationTotalRewards queries the total rewards accrued by a each @@ -9677,7 +8281,7 @@ paths: QueryDelegationTotalRewardsResponse is the response type for the Query/DelegationTotalRewards RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -9706,7 +8310,7 @@ paths: type: string tags: - Query - '/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}': + /cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}: get: summary: DelegationRewards queries the total rewards accrued by a delegation. operationId: DelegationRewards @@ -9739,7 +8343,7 @@ paths: QueryDelegationRewardsResponse is the response type for the Query/DelegationRewards RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -9773,7 +8377,7 @@ paths: type: string tags: - Query - '/cosmos/distribution/v1beta1/delegators/{delegator_address}/validators': + /cosmos/distribution/v1beta1/delegators/{delegator_address}/validators: get: summary: DelegatorValidators queries the validators of a delegator. operationId: DelegatorValidators @@ -9794,7 +8398,7 @@ paths: QueryDelegatorValidatorsResponse is the response type for the Query/DelegatorValidators RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -9823,7 +8427,7 @@ paths: type: string tags: - Query - '/cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address': + /cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address: get: summary: DelegatorWithdrawAddress queries withdraw address of a delegator. operationId: DelegatorWithdrawAddress @@ -9840,7 +8444,7 @@ paths: QueryDelegatorWithdrawAddressResponse is the response type for the Query/DelegatorWithdrawAddress RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -9891,12 +8495,11 @@ paths: type: string withdraw_addr_enabled: type: boolean - format: boolean description: >- QueryParamsResponse is the response type for the Query/Params RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -9919,7 +8522,7 @@ paths: format: byte tags: - Query - '/cosmos/distribution/v1beta1/validators/{validator_address}/commission': + /cosmos/distribution/v1beta1/validators/{validator_address}/commission: get: summary: ValidatorCommission queries accumulated commission for a validator. operationId: ValidatorCommission @@ -9955,7 +8558,7 @@ paths: QueryValidatorCommissionResponse is the response type for the Query/ValidatorCommission RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -9984,7 +8587,7 @@ paths: type: string tags: - Query - '/cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards': + /cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards: get: summary: ValidatorOutstandingRewards queries rewards of a validator address. operationId: ValidatorOutstandingRewards @@ -10027,7 +8630,7 @@ paths: Query/ValidatorOutstandingRewards RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -10056,7 +8659,7 @@ paths: type: string tags: - Query - '/cosmos/distribution/v1beta1/validators/{validator_address}/slashes': + /cosmos/distribution/v1beta1/validators/{validator_address}/slashes: get: summary: ValidatorSlashes queries slash events of a validator. operationId: ValidatorSlashes @@ -10094,9 +8697,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -10109,7 +8713,7 @@ paths: QueryValidatorSlashesResponse is the response type for the Query/ValidatorSlashes RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -10198,15 +8802,16 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Query /cosmos/evidence/v1beta1/evidence: @@ -10404,9 +9009,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -10421,7 +9027,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -10656,18 +9262,19 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Query - '/cosmos/evidence/v1beta1/evidence/{evidence_hash}': + /cosmos/evidence/v1beta1/evidence/{evidence_hash}: get: summary: Evidence queries evidence based on evidence hash. operationId: Evidence @@ -10852,7 +9459,7 @@ paths: QueryEvidenceResponse is the response type for the Query/Evidence RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -11049,7 +9656,7 @@ paths: format: byte tags: - Query - '/cosmos/gov/v1beta1/params/{params_type}': + /cosmos/gov/v1beta1/params/{params_type}: get: summary: Params queries all parameters of the gov module. operationId: GovParams @@ -11122,7 +9729,7 @@ paths: QueryParamsResponse is the response type for the Query/Params RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -11531,7 +10138,7 @@ paths: ProposalStatus enumerates the valid statuses of a proposal. - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal 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 @@ -11543,6 +10150,14 @@ paths: - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has failed. final_tally_result: + description: >- + final_tally_result is the final tally result of the + proposal. When + + querying a proposal via gRPC, this field is not + populated until the + + proposal's voting period has ended. type: object properties: 'yes': @@ -11553,9 +10168,6 @@ paths: type: string no_with_veto: type: string - description: >- - TallyResult defines a standard tally for a governance - proposal. submit_time: type: string format: date-time @@ -11596,9 +10208,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -11613,7 +10226,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -11806,7 +10419,7 @@ paths: description: |- proposal_status defines the status of the proposals. - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal 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 @@ -11884,18 +10497,19 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}': + /cosmos/gov/v1beta1/proposals/{proposal_id}: get: summary: Proposal queries proposal details based on ProposalID. operationId: Proposal @@ -12100,7 +10714,7 @@ paths: ProposalStatus enumerates the valid statuses of a proposal. - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal 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 @@ -12112,6 +10726,14 @@ paths: - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has failed. final_tally_result: + description: >- + final_tally_result is the final tally result of the + proposal. When + + querying a proposal via gRPC, this field is not populated + until the + + proposal's voting period has ended. type: object properties: 'yes': @@ -12122,9 +10744,6 @@ paths: type: string no_with_veto: type: string - description: >- - TallyResult defines a standard tally for a governance - proposal. submit_time: type: string format: date-time @@ -12161,7 +10780,7 @@ paths: QueryProposalResponse is the response type for the Query/Proposal RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -12358,7 +10977,7 @@ paths: format: uint64 tags: - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits': + /cosmos/gov/v1beta1/proposals/{proposal_id}/deposits: get: summary: Deposits queries all deposits of a single proposal. operationId: Deposits @@ -12408,9 +11027,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -12423,7 +11043,7 @@ paths: QueryDepositsResponse is the response type for the Query/Deposits RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -12664,18 +11284,19 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}': + /cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}: get: summary: >- Deposit queries single deposit information based proposalID, @@ -12721,7 +11342,7 @@ paths: QueryDepositResponse is the response type for the Query/Deposit RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -12923,7 +11544,7 @@ paths: type: string tags: - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}/tally': + /cosmos/gov/v1beta1/proposals/{proposal_id}/tally: get: summary: TallyResult queries the tally of a proposal vote. operationId: TallyResult @@ -12934,6 +11555,7 @@ paths: type: object properties: tally: + description: tally defines the requested tally. type: object properties: 'yes': @@ -12944,14 +11566,11 @@ paths: type: string no_with_veto: type: string - description: >- - TallyResult defines a standard tally for a governance - proposal. description: >- QueryTallyResultResponse is the response type for the Query/Tally RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -13148,7 +11767,7 @@ paths: format: uint64 tags: - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}/votes': + /cosmos/gov/v1beta1/proposals/{proposal_id}/votes: get: summary: Votes queries votes of a given proposal. operationId: Votes @@ -13214,6 +11833,10 @@ paths: description: >- WeightedVoteOption defines a unit of vote for vote split. + + + Since: cosmos-sdk 0.43 + title: 'Since: cosmos-sdk 0.43' description: >- Vote defines a vote on a governance proposal. @@ -13227,9 +11850,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -13242,7 +11866,7 @@ paths: QueryVotesResponse is the response type for the Query/Votes RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -13483,20 +12107,21 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}': + /cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}: get: - summary: 'Vote queries voted information based on proposalID, voterAddr.' + summary: Vote queries voted information based on proposalID, voterAddr. operationId: Vote responses: '200': @@ -13558,6 +12183,10 @@ paths: description: >- WeightedVoteOption defines a unit of vote for vote split. + + + Since: cosmos-sdk 0.43 + title: 'Since: cosmos-sdk 0.43' description: >- Vote defines a vote on a governance proposal. @@ -13567,7 +12196,7 @@ paths: QueryVoteResponse is the response type for the Query/Vote RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -13763,7 +12392,2728 @@ paths: type: string format: uint64 - name: voter - description: voter defines the oter address for the proposals. + description: voter defines the voter address for the proposals. + in: path + required: true + type: string + tags: + - Query + /cosmos/gov/v1/params/{params_type}: + get: + summary: Params queries all parameters of the gov module. + operationId: GovV1Params + responses: + '200': + description: A successful response. + schema: + 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 + description: >- + Minimum percentage of total stake needed to vote for a + result to be + considered valid. + threshold: + type: string + description: >- + Minimum proportion of Yes votes for proposal to pass. + Default value: 0.5. + veto_threshold: + type: string + 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. + 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: params_type + description: >- + params_type defines which parameters to query for, can be one of + "voting", + + "tallying" or "deposit". + in: path + required: true + type: string + tags: + - Query + /cosmos/gov/v1/proposals: + get: + summary: Proposals queries all proposals based on given status. + operationId: GovV1Proposal + responses: + '200': + description: A successful response. + schema: + type: object + properties: + proposals: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + 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" + } + 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 proposal 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: + description: >- + final_tally_result is the final tally result of the + proposal. When + + querying a proposal via gRPC, this field is not + populated until the + + proposal's voting period has ended. + type: object + properties: + yes_count: + type: string + abstain_count: + type: string + no_count: + type: string + no_with_veto_count: + type: string + 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. + + + 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 + metadata: + type: string + description: >- + metadata is any arbitrary metadata attached to the + proposal. + 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 + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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. + 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: proposal_status + description: |- + proposal_status defines the status of the proposals. + + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal 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. + in: query + required: false + 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 + - name: voter + description: voter defines the voter address for the proposals. + in: query + required: false + type: string + - name: depositor + description: depositor defines the deposit addresses from the proposals. + in: query + required: false + type: string + - 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 + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/gov/v1/proposals/{proposal_id}: + get: + summary: Proposal queries proposal details based on ProposalID. + operationId: GovV1Proposal + responses: + '200': + description: A successful response. + schema: + type: object + properties: + proposal: + type: object + properties: + id: + type: string + format: uint64 + 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" + } + 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 proposal 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: + description: >- + final_tally_result is the final tally result of the + proposal. When + + querying a proposal via gRPC, this field is not populated + until the + + proposal's voting period has ended. + type: object + properties: + yes_count: + type: string + abstain_count: + type: string + no_count: + type: string + no_with_veto_count: + type: string + 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. + + + 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 + metadata: + type: string + description: >- + metadata is any arbitrary metadata attached to the + proposal. + description: >- + Proposal defines the core field members of a governance + proposal. + description: >- + QueryProposalResponse is the response type for the Query/Proposal + 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 + + 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: proposal_id + description: proposal_id defines the unique id of the proposal. + in: path + required: true + type: string + format: uint64 + tags: + - Query + /cosmos/gov/v1/proposals/{proposal_id}/deposits: + get: + summary: Deposits queries all deposits of a single proposal. + operationId: GovV1Deposit + responses: + '200': + description: A successful response. + schema: + type: object + properties: + deposits: + type: array + items: + 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. + + + 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 + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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. + 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: proposal_id + description: proposal_id defines the unique id of the proposal. + in: path + required: true + type: string + format: uint64 + - 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 + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/gov/v1/proposals/{proposal_id}/deposits/{depositor}: + get: + summary: >- + Deposit queries single deposit information based proposalID, + depositAddr. + operationId: GovV1Deposit + responses: + '200': + description: A successful response. + schema: + 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. + + + 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. + description: >- + QueryDepositResponse is the response type for the Query/Deposit + 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 + + 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: proposal_id + description: proposal_id defines the unique id of the proposal. + in: path + required: true + type: string + format: uint64 + - name: depositor + description: depositor defines the deposit addresses from the proposals. + in: path + required: true + type: string + tags: + - Query + /cosmos/gov/v1/proposals/{proposal_id}/tally: + get: + summary: TallyResult queries the tally of a proposal vote. + operationId: GovV1TallyResult + responses: + '200': + description: A successful response. + schema: + type: object + properties: + tally: + description: tally defines the requested tally. + type: object + properties: + yes_count: + type: string + abstain_count: + type: string + no_count: + type: string + no_with_veto_count: + type: string + description: >- + QueryTallyResultResponse is the response type for the Query/Tally + 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 + + 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: proposal_id + description: proposal_id defines the unique id of the proposal. + in: path + required: true + type: string + format: uint64 + tags: + - Query + /cosmos/gov/v1/proposals/{proposal_id}/votes: + get: + summary: Votes queries votes of a given proposal. + operationId: GovV1Votes + responses: + '200': + description: A successful response. + schema: + type: object + properties: + votes: + type: array + items: + type: object + properties: + proposal_id: + type: string + 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. + + - 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. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + vote. + 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. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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. + 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: proposal_id + description: proposal_id defines the unique id of the proposal. + in: path + required: true + type: string + format: uint64 + - 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 + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/gov/v1/proposals/{proposal_id}/votes/{voter}: + get: + summary: Vote queries voted information based on proposalID, voterAddr. + operationId: GovV1Vote + responses: + '200': + description: A successful response. + schema: + type: object + properties: + vote: + type: object + properties: + proposal_id: + type: string + 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. + + - 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. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + vote. + 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. + 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: proposal_id + description: proposal_id defines the unique id of the proposal. + in: path + required: true + type: string + format: uint64 + - name: voter + description: voter defines the voter address for the proposals. in: path required: true type: string @@ -13789,7 +15139,7 @@ paths: QueryAnnualProvisionsResponse is the response type for the Query/AnnualProvisions RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -13832,7 +15182,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -13892,7 +15242,7 @@ paths: QueryParamsResponse is the response type for the Query/Params RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -13941,7 +15291,7 @@ paths: QueryParamsResponse is response type for the Query/Params RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -13975,6 +15325,70 @@ paths: type: string tags: - Query + /cosmos/params/v1beta1/subspaces: + get: + summary: >- + Subspaces queries for all registered subspaces and all keys for a + subspace. + description: 'Since: cosmos-sdk 0.46' + operationId: Subspaces + responses: + '200': + description: A successful response. + schema: + type: object + properties: + subspaces: + type: array + items: + type: object + properties: + subspace: + type: string + keys: + type: array + items: + type: string + description: >- + Subspace defines a parameter subspace name and all the keys + that exist for + + the subspace. + + + Since: cosmos-sdk 0.46 + description: >- + QuerySubspacesResponse defines the response types for querying for + all + + registered subspaces and all keys for a subspace. + + + Since: cosmos-sdk 0.46 + 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 + tags: + - Query /cosmos/slashing/v1beta1/params: get: summary: Params queries the parameters of slashing module @@ -14009,7 +15423,7 @@ paths: QueryParamsResponse is the response type for the Query/Params RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -14075,7 +15489,6 @@ paths: liveness downtime. tombstoned: type: boolean - format: boolean description: >- Whether or not a validator has been tombstoned (killed out of validator set). It is set @@ -14102,9 +15515,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -14129,7 +15543,7 @@ paths: method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -14197,18 +15611,19 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Query - '/cosmos/slashing/v1beta1/signing_infos/{cons_address}': + /cosmos/slashing/v1beta1/signing_infos/{cons_address}: get: summary: SigningInfo queries the signing info of given cons address operationId: SigningInfo @@ -14249,7 +15664,6 @@ paths: liveness downtime. tombstoned: type: boolean - format: boolean description: >- Whether or not a validator has been tombstoned (killed out of validator set). It is set @@ -14278,7 +15692,7 @@ paths: method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -14307,7 +15721,7 @@ paths: type: string tags: - Query - '/cosmos/staking/v1beta1/delegations/{delegator_addr}': + /cosmos/staking/v1beta1/delegations/{delegator_addr}: get: summary: >- DelegatorDelegations queries all delegations of a given delegator @@ -14379,9 +15793,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -14394,7 +15809,7 @@ paths: QueryDelegatorDelegationsResponse is response type for the Query/DelegatorDelegations RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -14634,18 +16049,19 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Query - '/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations': + /cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations: get: summary: Redelegations queries redelegations of given address. operationId: Redelegations @@ -14775,9 +16191,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -14792,7 +16209,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -15042,18 +16459,19 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Query - '/cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations': + /cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations: get: summary: >- DelegatorUnbondingDelegations queries all unbonding delegations of a @@ -15125,9 +16543,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -15142,7 +16561,7 @@ paths: Query/UnbondingDelegatorDelegations RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -15382,18 +16801,19 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Query - '/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators': + /cosmos/staking/v1beta1/delegators/{delegator_addr}/validators: get: summary: |- DelegatorValidators queries all validators info for given delegator @@ -15594,7 +17014,6 @@ paths: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -15695,6 +17114,9 @@ paths: description: >- min_self_delegation is the validator's self declared minimum self delegation. + + + Since: cosmos-sdk 0.46 description: >- Validator defines a validator, together with the total amount of the @@ -15718,7 +17140,7 @@ paths: bonded shares multiplied by exchange rate. - description: validators defines the the validators' info of a delegator. + description: validators defines the validators' info of a delegator. pagination: description: pagination defines the pagination in the response. type: object @@ -15726,9 +17148,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -15741,7 +17164,7 @@ paths: QueryDelegatorValidatorsResponse is response type for the Query/DelegatorValidators RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -15981,18 +17404,19 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Query - '/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}': + /cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}: get: summary: |- DelegatorValidator queries validator info for given delegator validator @@ -16189,7 +17613,6 @@ paths: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -16289,6 +17712,9 @@ paths: description: >- min_self_delegation is the validator's self declared minimum self delegation. + + + Since: cosmos-sdk 0.46 description: >- Validator defines a validator, together with the total amount of the @@ -16316,7 +17742,7 @@ paths: QueryDelegatorValidatorResponse response type for the Query/DelegatorValidator RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -16517,7 +17943,7 @@ paths: type: string tags: - Query - '/cosmos/staking/v1beta1/historical_info/{height}': + /cosmos/staking/v1beta1/historical_info/{height}: get: summary: HistoricalInfo queries the historical info for given height. operationId: HistoricalInfo @@ -16798,7 +18224,6 @@ paths: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -16900,6 +18325,9 @@ paths: description: >- min_self_delegation is the validator's self declared minimum self delegation. + + + Since: cosmos-sdk 0.46 description: >- Validator defines a validator, together with the total amount of the @@ -16929,7 +18357,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -17162,11 +18590,16 @@ paths: bond_denom: type: string description: bond_denom defines the bondable coin denomination. + min_commission_rate: + type: string + title: >- + min_commission_rate is the chain-wide minimum commission + rate that a validator can charge their delegators description: >- QueryParamsResponse is response type for the Query/Params RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -17376,7 +18809,7 @@ paths: type: string description: QueryPoolResponse is response type for the Query/Pool RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -17765,7 +19198,6 @@ paths: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -17866,6 +19298,9 @@ paths: description: >- min_self_delegation is the validator's self declared minimum self delegation. + + + Since: cosmos-sdk 0.46 description: >- Validator defines a validator, together with the total amount of the @@ -17897,9 +19332,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -17912,7 +19348,7 @@ paths: QueryValidatorsResponse is response type for the Query/Validators RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -18152,18 +19588,19 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Query - '/cosmos/staking/v1beta1/validators/{validator_addr}': + /cosmos/staking/v1beta1/validators/{validator_addr}: get: summary: Validator queries validator info for given validator address. operationId: Validator @@ -18358,7 +19795,6 @@ paths: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -18458,6 +19894,9 @@ paths: description: >- min_self_delegation is the validator's self declared minimum self delegation. + + + Since: cosmos-sdk 0.46 description: >- Validator defines a validator, together with the total amount of the @@ -18485,7 +19924,7 @@ paths: QueryValidatorResponse is response type for the Query/Validator RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -18681,7 +20120,7 @@ paths: type: string tags: - Query - '/cosmos/staking/v1beta1/validators/{validator_addr}/delegations': + /cosmos/staking/v1beta1/validators/{validator_addr}/delegations: get: summary: ValidatorDelegations queries delegate info for given validator. operationId: ValidatorDelegations @@ -18748,9 +20187,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -18763,7 +20203,7 @@ paths: QueryValidatorDelegationsResponse is response type for the Query/ValidatorDelegations RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -19003,18 +20443,19 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Query - '/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}': + /cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}: get: summary: Delegation queries delegate info for given validator delegator pair. operationId: Delegation @@ -19076,7 +20517,7 @@ paths: QueryDelegationResponse is response type for the Query/Delegation RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -19277,7 +20718,7 @@ paths: type: string tags: - Query - '/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation': + /cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation: get: summary: |- UnbondingDelegation queries unbonding info for given validator delegator @@ -19342,7 +20783,7 @@ paths: RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -19543,7 +20984,7 @@ paths: type: string tags: - Query - '/cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations': + /cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations: get: summary: >- ValidatorUnbondingDelegations queries unbonding delegations of a @@ -19613,9 +21054,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -19630,7 +21072,7 @@ paths: Query/ValidatorUnbondingDelegations RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -19870,15 +21312,16 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Query /cosmos/tx/v1beta1/simulate: @@ -19918,6 +21361,11 @@ paths: length prefixed in order to separate data from multiple message executions. + + Deprecated. This field is still populated, but prefer + msg_response instead + + because it also contains the Msg response typeURL. log: type: string description: >- @@ -19943,7 +21391,6 @@ paths: format: byte index: type: boolean - format: boolean description: >- EventAttribute is a single key-value pair, associated with an event. @@ -19960,11 +21407,196 @@ paths: during message or handler execution. + msg_responses: + 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: >- + msg_responses contains the Msg handler responses type + packed in Anys. + + + Since: cosmos-sdk 0.46 description: |- SimulateResponse is the response type for the Service.SimulateRPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -20170,7 +21802,7 @@ paths: schema: $ref: '#/definitions/cosmos.tx.v1beta1.GetTxsEventResponse' default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -20413,15 +22045,16 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 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. @@ -20435,6 +22068,24 @@ paths: - ORDER_BY_ASC - ORDER_BY_DESC default: ORDER_BY_UNSPECIFIED + - name: page + description: >- + page is the page number to query, starts at 1. If not provided, will + default to first page. + in: query + required: false + type: string + format: uint64 + - name: 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 tags: - Service post: @@ -20465,7 +22116,7 @@ paths: description: Response code. data: type: string - description: 'Result bytes, if any.' + description: Result bytes, if any. raw_log: type: string description: >- @@ -20717,6 +22368,52 @@ paths: For height == 1, it's genesis time. + 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 + 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. + + Later, transactions may be queried using these events. + description: >- + Events defines all the events emitted by processing a + transaction. Note, + + these events include those emitted by processing all the + messages and those + + emitted from the ante. Whereas Logs contains the events, + with + + additional metadata, emitted only by processing the + messages. + + + Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 description: >- TxResponse defines a structure containing relevant tx data and metadata. The @@ -20726,7 +22423,7 @@ paths: BroadcastTxResponse is the response type for the Service.BroadcastTx method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -20951,7 +22648,271 @@ paths: RPC method. tags: - Service - '/cosmos/tx/v1beta1/txs/{hash}': + /cosmos/tx/v1beta1/txs/block/{height}: + get: + summary: GetBlockWithTxs fetches a block with decoded txs. + description: 'Since: cosmos-sdk 0.45.2' + operationId: GetBlockWithTxs + responses: + '200': + description: A successful response. + schema: + $ref: '#/definitions/cosmos.tx.v1beta1.GetBlockWithTxsResponse' + 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: height + description: height is the height of the block to query. + in: path + required: true + type: string + format: int64 + - 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 + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Service + /cosmos/tx/v1beta1/txs/{hash}: get: summary: GetTx fetches a tx by hash. operationId: GetTx @@ -20961,7 +22922,7 @@ paths: schema: $ref: '#/definitions/cosmos.tx.v1beta1.GetTxResponse' default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -21151,13 +23112,13 @@ paths: } parameters: - name: hash - description: 'hash is the tx hash to query, encoded as a hex string.' + description: hash is the tx hash to query, encoded as a hex string. in: path required: true type: string tags: - Service - '/cosmos/upgrade/v1beta1/applied_plan/{name}': + /cosmos/upgrade/v1beta1/applied_plan/{name}: get: summary: AppliedPlan queries a previously applied upgrade plan by its name. operationId: AppliedPlan @@ -21177,7 +23138,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -21373,6 +23334,212 @@ paths: type: string tags: - Query + /cosmos/upgrade/v1beta1/authority: + get: + summary: Returns the account with authority to conduct upgrades + description: 'Since: cosmos-sdk 0.46' + operationId: Authority + responses: + '200': + description: A successful response. + schema: + type: object + properties: + address: + type: string + description: 'Since: cosmos-sdk 0.46' + title: QueryAuthorityResponse is the response type for Query/Authority + 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" + } + tags: + - Query /cosmos/upgrade/v1beta1/current_plan: get: summary: CurrentPlan queries the current upgrade plan. @@ -21614,7 +23781,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -21807,6 +23974,7 @@ paths: /cosmos/upgrade/v1beta1/module_versions: get: summary: ModuleVersions queries the list of module versions from state. + description: 'Since: cosmos-sdk 0.43' operationId: ModuleVersions responses: '200': @@ -21826,7 +23994,10 @@ paths: type: string format: uint64 title: consensus version of the app module - description: ModuleVersion specifies a module and its consensus version. + description: |- + ModuleVersion specifies a module and its consensus version. + + Since: cosmos-sdk 0.43 description: >- module_versions is a list of module names with their consensus versions. @@ -21835,8 +24006,11 @@ paths: Query/ModuleVersions RPC method. + + + Since: cosmos-sdk 0.43 default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -22035,13 +24209,20 @@ paths: type: string tags: - Query - '/cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}': + /cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}: get: - summary: |- + summary: >- UpgradedConsensusState queries the consensus state that will serve + as a trusted kernel for the next version of this chain. It will only be + stored at the last height of this chain. + UpgradedConsensusState RPC not supported with legacy querier + + This rpc is deprecated now that IBC has its own replacement + + (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) operationId: UpgradedConsensusState responses: '200': @@ -22052,13 +24233,14 @@ paths: upgraded_consensus_state: type: string format: byte + title: 'Since: cosmos-sdk 0.43' description: >- QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -22259,7 +24441,7 @@ paths: - Query /cosmos/authz/v1beta1/grants: get: - summary: 'Returns list of `Authorization`, granted to the grantee by the granter.' + summary: Returns list of `Authorization`, granted to the grantee by the granter. operationId: Grants responses: '200': @@ -22452,6 +24634,14 @@ paths: expiration: type: string format: date-time + title: >- + time when the grant will expire and will be pruned. If + null, then the grant + + doesn't have a time expiration (other conditions in + `authorization` + + may apply to invalidate the grant) description: |- Grant gives permissions to execute the provide method with expiration time. @@ -22465,9 +24655,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -22480,7 +24671,7 @@ paths: QueryGrantsResponse is the response type for the Query/Authorizations RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -22730,350 +24921,39 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Query - '/cosmos/feegrant/v1beta1/allowance/{granter}/{grantee}': + /cosmos/authz/v1beta1/grants/grantee/{grantee}: get: - summary: Allowance returns fee granted to the grantee by the granter. - operationId: Allowance + summary: GranteeGrants returns a list of `GrantAuthorization` by grantee. + description: 'Since: cosmos-sdk 0.46' + operationId: GranteeGrants responses: '200': description: A successful response. schema: type: object properties: - allowance: - description: allowance is a allowance granted for grantee by granter. - type: object - properties: - granter: - type: string - description: >- - granter is the address of the user granting an allowance - of their funds. - grantee: - type: string - description: >- - grantee is the address of the user being granted an - allowance of another user's funds. - allowance: - description: allowance can be any of basic and filtered fee allowance. - 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. - title: >- - Grant is stored in the KVStore to record a grant with full - context - description: >- - QueryAllowanceResponse is the response type for the - Query/Allowance 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 - - 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 - description: >- - granter is the address of the user granting an allowance of their - funds. - in: path - required: true - type: string - - name: grantee - description: >- - grantee is the address of the user being granted an allowance of - another user's funds. - in: path - required: true - type: string - tags: - - Query - '/cosmos/feegrant/v1beta1/allowances/{grantee}': - get: - summary: Allowances returns all the grants for address. - operationId: Allowances - responses: - '200': - description: A successful response. - schema: - type: object - properties: - allowances: + grants: type: array items: type: object properties: granter: type: string - description: >- - granter is the address of the user granting an allowance - of their funds. grantee: type: string - description: >- - grantee is the address of the user being granted an - allowance of another user's funds. - allowance: - description: >- - allowance can be any of basic and filtered fee - allowance. + authorization: type: object properties: type_url: @@ -23140,10 +25020,125 @@ paths: 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: >- - Grant is stored in the KVStore to record a grant with full - context - description: allowances are allowance's granted for grantee by granter. + GrantAuthorization extends a grant with both the addresses + of the grantee and granter. + + It is used in genesis.proto and query.proto + description: grants is a list of grants granted to the grantee. pagination: description: pagination defines an pagination for the response. type: object @@ -23151,9 +25146,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -23163,10 +25159,10 @@ paths: was set, its value is undefined otherwise description: >- - QueryAllowancesResponse is the response type for the - Query/Allowances RPC method. + QueryGranteeGrantsResponse is the response type for the + Query/GranteeGrants RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -23405,1298 +25401,8955 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean 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: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - ValidatorAddress: - type: string - description: bech32 encoded address - example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - Coin: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - 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: + /cosmos/authz/v1beta1/grants/granter/{granter}: + get: + summary: GranterGrants returns list of `GrantAuthorization`, granted by granter. + description: 'Since: cosmos-sdk 0.46' + operationId: GranterGrants + responses: + '200': + description: A successful response. + schema: type: object properties: - gas: - type: string - amount: + grants: type: array items: type: object properties: - denom: + granter: type: string - example: stake - amount: + grantee: type: string - example: '50' - memo: - type: string - signature: - type: object - properties: - signature: - type: string - example: >- - MEUCIQD02fsDPra8MtbRsyB1w7bqTM55Wu138zQbFcWx4+CFyAIge5WNPfKIuvzBZ69MyqHsqD8S1IwiEp+iUb6VSdtlpgY= - pub_key: + 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: >- + GrantAuthorization extends a grant with both the addresses + of the grantee and granter. + + It is used in genesis.proto and query.proto + description: grants is a list of grants granted by the granter. + pagination: + description: pagination defines an pagination for the response. type: object properties: - type: + next_key: type: string - example: tendermint/PubKeySecp256k1 - value: + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: type: string - example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH - account_number: + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryGranterGrantsResponse is the response type for the + Query/GranterGrants RPC method. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: type: string - example: '0' - sequence: + code: + type: integer + format: int32 + message: 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: + details: + type: array + items: type: object properties: - gas: + 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: >- + `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 + in: path + required: true + type: string + - 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 + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/feegrant/v1beta1/allowance/{granter}/{grantee}: + get: + summary: Allowance returns fee granted to the grantee by the granter. + operationId: Allowance + responses: + '200': + description: A successful response. + schema: + type: object + properties: + allowance: + description: allowance is a allowance granted for grantee by granter. + type: object + properties: + granter: + type: string + description: >- + granter is the address of the user granting an allowance + of their funds. + grantee: + type: string + description: >- + grantee is the address of the user being granted an + allowance of another user's funds. + allowance: + description: >- + allowance can be any of basic, periodic, allowed fee + allowance. + 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. + title: >- + Grant is stored in the KVStore to record a grant with full + context + description: >- + QueryAllowanceResponse is the response type for the + Query/Allowance 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 + + 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 + description: >- + granter is the address of the user granting an allowance of their + funds. + in: path + required: true + type: string + - name: grantee + description: >- + grantee is the address of the user being granted an allowance of + another user's funds. + in: path + required: true + type: string + tags: + - Query + /cosmos/feegrant/v1beta1/allowances/{grantee}: + get: + summary: Allowances returns all the grants for address. + operationId: Allowances + responses: + '200': + description: A successful response. + schema: + type: object + properties: + allowances: + type: array + items: + type: object + properties: + granter: + type: string + description: >- + granter is the address of the user granting an allowance + of their funds. + grantee: + type: string + description: >- + grantee is the address of the user being granted an + allowance of another user's funds. + allowance: + description: >- + allowance can be any of basic, periodic, allowed fee + allowance. + 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. + title: >- + Grant is stored in the KVStore to record a grant with full + context + description: allowances are allowance's granted for grantee by granter. + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QueryAllowancesResponse is the response type for the + Query/Allowances 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 + + 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: grantee + in: path + required: true + type: string + - 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 + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/feegrant/v1beta1/issued/{granter}: + get: + summary: AllowancesByGranter returns all the grants given by an address + description: 'Since: cosmos-sdk 0.46' + operationId: AllowancesByGranter + responses: + '200': + description: A successful response. + schema: + type: object + properties: + allowances: + type: array + items: + type: object + properties: + granter: + type: string + description: >- + granter is the address of the user granting an allowance + of their funds. + grantee: + type: string + description: >- + grantee is the address of the user being granted an + allowance of another user's funds. + allowance: + description: >- + allowance can be any of basic, periodic, allowed fee + allowance. + 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. + title: >- + Grant is stored in the KVStore to record a grant with full + context + description: allowances that have been issued by the granter. + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QueryAllowancesByGranterResponse is the response type for the + Query/AllowancesByGranter RPC method. + + + Since: cosmos-sdk 0.46 + 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: granter + in: path + required: true + type: string + - 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 + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/nft/v1beta1/balance/{owner}/{class_id}: + get: + summary: >- + Balance queries the number of NFTs of a given class owned by the owner, + same as balanceOf in ERC721 + operationId: NftBalance + responses: + '200': + description: A successful response. + schema: + type: object + properties: + amount: + type: string + format: uint64 + title: >- + QueryBalanceResponse is the response type for the Query/Balance + 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 + + 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: owner + in: path + required: true + type: string + - name: class_id + in: path + required: true + type: string + tags: + - Query + /cosmos/nft/v1beta1/classes: + get: + summary: Classes queries all NFT classes + operationId: Classes + responses: + '200': + description: A successful response. + schema: + type: object + properties: + classes: + type: array + items: + type: object + properties: + id: + type: string + title: >- + id defines the unique identifier of the NFT + classification, similar to the contract address of + ERC721 + name: + type: string + title: >- + name defines the human-readable name of the NFT + classification. Optional + symbol: + type: string + title: >- + symbol is an abbreviated name for nft classification. + Optional + description: + type: string + title: >- + description is a brief description of nft + classification. Optional + uri: + type: string + title: >- + uri for the class metadata stored off chain. It can + define schema for Class and NFT `Data` attributes. + Optional + uri_hash: + type: string + title: >- + uri_hash is a hash of the document pointed by uri. + Optional + data: + 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: >- + data is the app specific metadata of the NFT class. + Optional + description: Class defines the class of the nft type. + pagination: + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QueryClassesResponse is the response type for the Query/Classes + 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 + + 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: 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 + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/nft/v1beta1/classes/{class_id}: + get: + summary: Class queries an NFT class based on its id + operationId: Class + responses: + '200': + description: A successful response. + schema: + type: object + properties: + class: + type: object + properties: + id: + type: string + title: >- + id defines the unique identifier of the NFT + classification, similar to the contract address of ERC721 + name: + type: string + title: >- + name defines the human-readable name of the NFT + classification. Optional + symbol: + type: string + title: >- + symbol is an abbreviated name for nft classification. + Optional + description: + type: string + title: >- + description is a brief description of nft classification. + Optional + uri: + type: string + title: >- + uri for the class metadata stored off chain. It can define + schema for Class and NFT `Data` attributes. Optional + uri_hash: + type: string + title: >- + uri_hash is a hash of the document pointed by uri. + Optional + data: + 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: >- + data is the app specific metadata of the NFT class. + Optional + description: Class defines the class of the nft type. + title: >- + QueryClassResponse is the response type for the Query/Class 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 + + 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: class_id + in: path + required: true + type: string + tags: + - Query + /cosmos/nft/v1beta1/nfts: + get: + summary: >- + NFTs queries all NFTs of a given class or owner,choose at least one of + the two, similar to tokenByIndex in + + ERC721Enumerable + operationId: NFTs + responses: + '200': + description: A successful response. + schema: + type: object + properties: + nfts: + type: array + items: + type: object + properties: + class_id: + type: string + title: >- + class_id associated with the NFT, similar to the + contract address of ERC721 + id: + type: string + title: id is a unique identifier of the NFT + uri: + type: string + title: uri for the NFT metadata stored off chain + uri_hash: + type: string + title: uri_hash is a hash of the document pointed by uri + data: + 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: data is an app specific data of the NFT. Optional + description: NFT defines the NFT. + pagination: + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QueryNFTsResponse is the response type for the Query/NFTs RPC + methods + 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: class_id + in: query + required: false + type: string + - name: owner + in: query + required: false + type: string + - 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 + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/nft/v1beta1/nfts/{class_id}/{id}: + get: + summary: NFT queries an NFT based on its class and id. + operationId: NFT + responses: + '200': + description: A successful response. + schema: + type: object + properties: + nft: + type: object + properties: + class_id: + type: string + title: >- + class_id associated with the NFT, similar to the contract + address of ERC721 + id: + type: string + title: id is a unique identifier of the NFT + uri: + type: string + title: uri for the NFT metadata stored off chain + uri_hash: + type: string + title: uri_hash is a hash of the document pointed by uri + data: + 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: data is an app specific data of the NFT. Optional + description: NFT defines the NFT. + title: QueryNFTResponse is the response type for the Query/NFT 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 + + 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: class_id + in: path + required: true + type: string + - name: id + in: path + required: true + type: string + tags: + - Query + /cosmos/nft/v1beta1/owner/{class_id}/{id}: + get: + summary: >- + Owner queries the owner of the NFT based on its class and id, same as + ownerOf in ERC721 + operationId: Owner + responses: + '200': + description: A successful response. + schema: + type: object + properties: + owner: + type: string + title: >- + QueryOwnerResponse is the response type for the Query/Owner 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 + + 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: class_id + in: path + required: true + type: string + - name: id + in: path + required: true + type: string + tags: + - Query + /cosmos/nft/v1beta1/supply/{class_id}: + get: + summary: >- + Supply queries the number of NFTs from the given class, same as + totalSupply of ERC721. + operationId: Supply + responses: + '200': + description: A successful response. + schema: + type: object + properties: + amount: + type: string + format: uint64 + title: >- + QuerySupplyResponse is the response type for the Query/Supply 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 + + 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: class_id + in: path + required: true + type: string + tags: + - Query + /cosmos/group/v1/group_info/{group_id}: + get: + summary: GroupInfo queries group info based on group id. + operationId: GroupInfo + responses: + '200': + description: A successful response. + schema: + type: object + properties: + info: + description: info is the GroupInfo for the group. + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group's admin. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + group. + version: + type: string + format: uint64 + title: >- + version is used to track changes to a group's membership + structure that + + would break existing proposals. Whenever any members + weight is changed, + + or any member is added or removed this version is + incremented and will + + cause proposals based on older versions of this group to + fail + total_weight: + type: string + description: total_weight is the sum of the group members' weights. + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group was + created. + description: QueryGroupInfoResponse is the Query/GroupInfo response type. + 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: group_id + description: group_id is the unique ID of the group. + in: path + required: true + type: string + format: uint64 + tags: + - Query + /cosmos/group/v1/group_members/{group_id}: + get: + summary: GroupMembers queries members of a group + operationId: GroupMembers + responses: + '200': + description: A successful response. + schema: + type: object + properties: + members: + type: array + items: + type: object + properties: + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + member: + description: member is the member data. + type: object + properties: + address: + type: string + description: address is the member's account address. + weight: + type: string + description: >- + weight is the member's voting weight that should be + greater than 0. + metadata: + type: string + description: >- + metadata is any arbitrary metadata attached to the + member. + added_at: + type: string + format: date-time + description: >- + added_at is a timestamp specifying when a member was + added. + description: >- + GroupMember represents the relationship between a group and + a member. + description: members are the members of the group with given group_id. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QueryGroupMembersResponse is the Query/GroupMembersResponse + response type. + 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: group_id + description: group_id is the unique ID of the group. + in: path + required: true + type: string + format: uint64 + - 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 + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/group/v1/group_policies_by_admin/{admin}: + get: + summary: GroupsByAdmin queries group policies by admin address. + operationId: GroupPoliciesByAdmin + responses: + '200': + description: A successful response. + schema: + type: object + properties: + group_policies: + type: array + items: + type: object + properties: + address: + type: string + description: address is the account address of group policy. + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group admin. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + group policy. + version: + type: string + format: uint64 + description: >- + version is used to track changes to a group's + GroupPolicyInfo structure that + + would create a different result on a running proposal. + decision_policy: + 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" + } + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group policy + was created. + description: >- + GroupPolicyInfo represents the high-level on-chain + information for a group policy. + description: >- + group_policies are the group policies info with provided + admin. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QueryGroupPoliciesByAdminResponse is the + Query/GroupPoliciesByAdmin response type. + 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: admin + description: admin is the admin address of the group policy. + in: path + required: true + type: string + - 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 + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/group/v1/group_policies_by_group/{group_id}: + get: + summary: GroupPoliciesByGroup queries group policies by group id. + operationId: GroupPoliciesByGroup + responses: + '200': + description: A successful response. + schema: + type: object + properties: + group_policies: + type: array + items: + type: object + properties: + address: + type: string + description: address is the account address of group policy. + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group admin. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + group policy. + version: + type: string + format: uint64 + description: >- + version is used to track changes to a group's + GroupPolicyInfo structure that + + would create a different result on a running proposal. + decision_policy: + 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" + } + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group policy + was created. + description: >- + GroupPolicyInfo represents the high-level on-chain + information for a group policy. + description: >- + group_policies are the group policies info associated with the + provided group. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QueryGroupPoliciesByGroupResponse is the + Query/GroupPoliciesByGroup response type. + 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: group_id + description: group_id is the unique ID of the group policy's group. + in: path + required: true + type: string + format: uint64 + - 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 + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/group/v1/group_policy_info/{address}: + get: + summary: >- + GroupPolicyInfo queries group policy info based on account address of + group policy. + operationId: GroupPolicyInfo + responses: + '200': + description: A successful response. + schema: + type: object + properties: + info: + type: object + properties: + address: + type: string + description: address is the account address of group policy. + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group admin. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + group policy. + version: + type: string + format: uint64 + description: >- + version is used to track changes to a group's + GroupPolicyInfo structure that + + would create a different result on a running proposal. + decision_policy: + 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" + } + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group policy + was created. + description: >- + GroupPolicyInfo represents the high-level on-chain information + for a group policy. + description: >- + QueryGroupPolicyInfoResponse is the Query/GroupPolicyInfo response + type. + 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: address + description: address is the account address of the group policy. + in: path + required: true + type: string + tags: + - Query + /cosmos/group/v1/groups_by_admin/{admin}: + get: + summary: GroupsByAdmin queries groups by admin address. + operationId: GroupsByAdmin + responses: + '200': + description: A successful response. + schema: + type: object + properties: + groups: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group's admin. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + group. + version: + type: string + format: uint64 + title: >- + version is used to track changes to a group's membership + structure that + + would break existing proposals. Whenever any members + weight is changed, + + or any member is added or removed this version is + incremented and will + + cause proposals based on older versions of this group to + fail + total_weight: + type: string + description: total_weight is the sum of the group members' weights. + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group was + created. + description: >- + GroupInfo represents the high-level on-chain information for + a group. + description: groups are the groups info with the provided admin. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QueryGroupsByAdminResponse is the Query/GroupsByAdminResponse + response type. + 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: admin + description: admin is the account address of a group's admin. + in: path + required: true + type: string + - 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 + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/group/v1/groups_by_member/{address}: + get: + summary: GroupsByMember queries groups by member address. + operationId: GroupsByMember + responses: + '200': + description: A successful response. + schema: + type: object + properties: + groups: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group's admin. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + group. + version: + type: string + format: uint64 + title: >- + version is used to track changes to a group's membership + structure that + + would break existing proposals. Whenever any members + weight is changed, + + or any member is added or removed this version is + incremented and will + + cause proposals based on older versions of this group to + fail + total_weight: + type: string + description: total_weight is the sum of the group members' weights. + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group was + created. + description: >- + GroupInfo represents the high-level on-chain information for + a group. + description: groups are the groups info with the provided group member. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QueryGroupsByMemberResponse is the Query/GroupsByMember response + type. + 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: address + description: address is the group member address. + in: path + required: true + type: string + - 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 + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/group/v1/proposal/{proposal_id}: + get: + summary: Proposal queries a proposal based on proposal id. + operationId: GroupProposal + responses: + '200': + description: A successful response. + schema: + type: object + properties: + proposal: + description: proposal is the proposal info. + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique id of the proposal. + group_policy_address: + type: string + description: >- + group_policy_address is the account address of group + policy. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + proposal. + proposers: + type: array + items: + type: string + description: proposers are the account addresses of the proposers. + submit_time: + type: string + format: date-time + description: >- + submit_time is a timestamp specifying when a proposal was + submitted. + group_version: + type: string + format: uint64 + description: >- + group_version tracks the version of the group at proposal + submission. + + This field is here for informational purposes only. + group_policy_version: + type: string + format: uint64 + description: >- + group_policy_version tracks the version of the group + policy at proposal submission. + + When a decision policy is changed, existing proposals from + previous policy + + versions will become invalid with the `ABORTED` status. + + This field is here for informational purposes only. + status: + description: >- + status represents the high level position in the life + cycle of the proposal. Initial value is Submitted. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_SUBMITTED + - PROPOSAL_STATUS_ACCEPTED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_ABORTED + - PROPOSAL_STATUS_WITHDRAWN + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: >- + final_tally_result contains the sums of all weighted votes + for this + + proposal for each vote option. It is empty at submission, + and only + + populated after tallying, at voting period end or at + proposal execution, + + whichever happens first. + type: object + properties: + yes_count: + type: string + description: yes_count is the weighted sum of yes votes. + abstain_count: + type: string + description: abstain_count is the weighted sum of abstainers. + no_count: + type: string + description: no_count is the weighted sum of no votes. + no_with_veto_count: + type: string + description: no_with_veto_count is the weighted sum of veto. + voting_period_end: + type: string + format: date-time + description: >- + voting_period_end is the timestamp before which voting + must be done. + + Unless a successfull MsgExec is called before (to execute + a proposal whose + + tally is successful before the voting period ends), + tallying will be done + + at this point, and the `final_tally_result`and `status` + fields will be + + accordingly updated. + executor_result: + description: >- + executor_result is the final result of the proposal + execution. Initial value is NotRun. + type: string + enum: + - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + - PROPOSAL_EXECUTOR_RESULT_NOT_RUN + - PROPOSAL_EXECUTOR_RESULT_SUCCESS + - PROPOSAL_EXECUTOR_RESULT_FAILURE + default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + 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 `sdk.Msg`s that will be executed if + the proposal passes. + description: QueryProposalResponse is the Query/Proposal response type. + 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: proposal_id + description: proposal_id is the unique ID of a proposal. + in: path + required: true + type: string + format: uint64 + tags: + - Query + /cosmos/group/v1/proposals/{proposal_id}/tally: + get: + summary: >- + TallyResult returns the tally result of a proposal. If the proposal is + + still in voting period, then this query computes the current tally + state, + + which might not be final. On the other hand, if the proposal is final, + + then it simply returns the `final_tally_result` state stored in the + + proposal itself. + operationId: GroupTallyResult + responses: + '200': + description: A successful response. + schema: + type: object + properties: + tally: + description: tally defines the requested tally. + type: object + properties: + yes_count: + type: string + description: yes_count is the weighted sum of yes votes. + abstain_count: + type: string + description: abstain_count is the weighted sum of abstainers. + no_count: + type: string + description: no_count is the weighted sum of no votes. + no_with_veto_count: + type: string + description: no_with_veto_count is the weighted sum of veto. + description: QueryTallyResultResponse is the Query/TallyResult response type. + 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: proposal_id + description: proposal_id is the unique id of a proposal. + in: path + required: true + type: string + format: uint64 + tags: + - Query + /cosmos/group/v1/proposals_by_group_policy/{address}: + get: + summary: >- + ProposalsByGroupPolicy queries proposals based on account address of + group policy. + operationId: ProposalsByGroupPolicy + responses: + '200': + description: A successful response. + schema: + type: object + properties: + proposals: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique id of the proposal. + group_policy_address: + type: string + description: >- + group_policy_address is the account address of group + policy. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + proposal. + proposers: + type: array + items: + type: string + description: proposers are the account addresses of the proposers. + submit_time: + type: string + format: date-time + description: >- + submit_time is a timestamp specifying when a proposal + was submitted. + group_version: + type: string + format: uint64 + description: >- + group_version tracks the version of the group at + proposal submission. + + This field is here for informational purposes only. + group_policy_version: + type: string + format: uint64 + description: >- + group_policy_version tracks the version of the group + policy at proposal submission. + + When a decision policy is changed, existing proposals + from previous policy + + versions will become invalid with the `ABORTED` status. + + This field is here for informational purposes only. + status: + description: >- + status represents the high level position in the life + cycle of the proposal. Initial value is Submitted. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_SUBMITTED + - PROPOSAL_STATUS_ACCEPTED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_ABORTED + - PROPOSAL_STATUS_WITHDRAWN + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: >- + final_tally_result contains the sums of all weighted + votes for this + + proposal for each vote option. It is empty at + submission, and only + + populated after tallying, at voting period end or at + proposal execution, + + whichever happens first. + type: object + properties: + yes_count: + type: string + description: yes_count is the weighted sum of yes votes. + abstain_count: + type: string + description: abstain_count is the weighted sum of abstainers. + no_count: + type: string + description: no_count is the weighted sum of no votes. + no_with_veto_count: + type: string + description: no_with_veto_count is the weighted sum of veto. + voting_period_end: + type: string + format: date-time + description: >- + voting_period_end is the timestamp before which voting + must be done. + + Unless a successfull MsgExec is called before (to + execute a proposal whose + + tally is successful before the voting period ends), + tallying will be done + + at this point, and the `final_tally_result`and `status` + fields will be + + accordingly updated. + executor_result: + description: >- + executor_result is the final result of the proposal + execution. Initial value is NotRun. + type: string + enum: + - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + - PROPOSAL_EXECUTOR_RESULT_NOT_RUN + - PROPOSAL_EXECUTOR_RESULT_SUCCESS + - PROPOSAL_EXECUTOR_RESULT_FAILURE + default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + messages: type: array items: type: object properties: - denom: + type_url: type: string - example: stake - 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 - 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: stake - 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' - 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: cosmoshub-2 - 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: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - 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: cosmoshub-2 - 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: + 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 `sdk.Msg`s that will be executed + if the proposal passes. + description: >- + Proposal defines a group proposal. Any member of a group can + submit a proposal + + for a group policy to decide upon. + + A proposal consists of a set of `sdk.Msg`s that will be + executed if the proposal + + passes as well as some optional metadata associated with the + proposal. + description: proposals are the proposals with given group policy. + pagination: + description: pagination defines the pagination in the response. type: object properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. 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: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - version: + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryProposalsByGroupPolicyResponse is the + Query/ProposalByGroupPolicy response type. + default: + description: An unexpected error response. + schema: type: object properties: - block: + error: type: string - example: 10 - app: + code: + type: integer + format: int32 + message: 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: cosmoshub-2 - 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: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - 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: cosmoshub-2 - 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: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - 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: + details: type: array items: type: object properties: - validator_address: + type_url: type: string - validator_index: + 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 - 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: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - reward: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - 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: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - reward: - type: array - items: + 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: address + description: >- + address is the account address of the group policy related to + proposals. + in: path + required: true + type: string + - 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 + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/group/v1/vote_by_proposal_voter/{proposal_id}/{voter}: + get: + summary: VoteByProposalVoter queries a vote by proposal id and voter. + operationId: VoteByProposalVoter + responses: + '200': + description: A successful response. + schema: + type: object + properties: + vote: + description: vote is the vote with given proposal_id and voter. type: object properties: - denom: + proposal_id: type: string - example: stake - amount: + format: uint64 + description: proposal is the unique ID of the proposal. + voter: type: string - example: '50' - total: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - BaseReq: + description: voter is the account address of the voter. + option: + description: option is the voter's choice on the proposal. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + vote. + submit_time: + type: string + format: date-time + description: submit_time is the timestamp when the vote was submitted. + description: >- + QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter + response type. + 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: proposal_id + description: proposal_id is the unique ID of a proposal. + in: path + required: true + type: string + format: uint64 + - name: voter + description: voter is a proposal voter account address. + in: path + required: true + type: string + tags: + - Query + /cosmos/group/v1/votes_by_proposal/{proposal_id}: + get: + summary: VotesByProposal queries a vote by proposal. + operationId: VotesByProposal + responses: + '200': + description: A successful response. + schema: + type: object + properties: + votes: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal is the unique ID of the proposal. + voter: + type: string + description: voter is the account address of the voter. + option: + description: option is the voter's choice on the proposal. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + vote. + submit_time: + type: string + format: date-time + description: >- + submit_time is the timestamp when the vote was + submitted. + description: Vote represents a vote for a proposal. + description: votes are the list of votes for given proposal_id. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QueryVotesByProposalResponse is the Query/VotesByProposal response + type. + 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: proposal_id + description: proposal_id is the unique ID of a proposal. + in: path + required: true + type: string + format: uint64 + - 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 + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/group/v1/votes_by_voter/{voter}: + get: + summary: VotesByVoter queries a vote by voter. + operationId: VotesByVoter + responses: + '200': + description: A successful response. + schema: + type: object + properties: + votes: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal is the unique ID of the proposal. + voter: + type: string + description: voter is the account address of the voter. + option: + description: option is the voter's choice on the proposal. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + vote. + submit_time: + type: string + format: date-time + description: >- + submit_time is the timestamp when the vote was + submitted. + description: Vote represents a vote for a proposal. + description: votes are the list of votes by given voter. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: QueryVotesByVoterResponse is the Query/VotesByVoter response type. + 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: voter + description: voter is a proposal voter account address. + in: path + required: true + type: string + - 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 + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query +definitions: + cosmos.auth.v1beta1.AddressBytesToStringResponse: type: object properties: - from: + address_string: type: string - example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: "Sent via Cosmos Voyager \U0001F680" - chain_id: - type: string - example: Cosmos-Hub - 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: stake - 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: + description: >- + AddressBytesToStringResponse is the response type for AddressString rpc + method. + + + Since: cosmos-sdk 0.46 + cosmos.auth.v1beta1.AddressStringToBytesResponse: type: object properties: - address: + address_bytes: type: string - description: bech32 encoded address - example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - pub_key: - type: string - example: >- - cosmosvalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf - voting_power: - type: string - example: '1000' - proposer_priority: - type: string - example: '1000' - TextProposal: + format: byte + description: >- + AddressStringToBytesResponse is the response type for AddressBytes rpc + method. + + + Since: cosmos-sdk 0.46 + cosmos.auth.v1beta1.Bech32PrefixResponse: type: object properties: - proposal_id: - type: integer - title: + bech32_prefix: 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: stake - 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: stake - amount: - type: string - example: '50' - proposal_id: - type: string - depositor: - type: string - description: bech32 encoded address - example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - 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: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - consensus_pubkey: - type: string - example: >- - cosmosvalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf - 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 - security_contact: - 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: stake - amount: - type: string - example: '50' - UnbondingDelegationPair: - 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 - min_time: - type: string - UnbondingEntries: - type: object - properties: - initial_balance: - type: string - balance: - type: string - creation_height: - type: string - min_time: - type: string - UnbondingDelegation: - type: object - properties: - delegator_address: - type: string - validator_address: - type: string - initial_balance: - type: string - balance: - type: string - creation_height: - type: integer - min_time: - type: integer - Redelegation: - type: object - properties: - delegator_address: - type: string - validator_src_address: - type: string - validator_dst_address: - type: string - entries: - type: array - items: - $ref: '#/definitions/Redelegation' - 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: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - self_bond_rewards: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - val_commission: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - PublicKey: - type: object - properties: - type: - type: string - value: - type: string - SigningInfo: - type: object - properties: - start_height: - type: string - index_offset: - type: string - jailed_until: - type: string - 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: stake - amount: - type: string - example: '50' + description: |- + Bech32PrefixResponse is the response type for Bech32Prefix rpc method. + + Since: cosmos-sdk 0.46 cosmos.auth.v1beta1.Params: type: object properties: @@ -24716,6 +34369,15 @@ definitions: type: string format: uint64 description: Params defines the parameters for the auth module. + cosmos.auth.v1beta1.QueryAccountAddressByIDResponse: + type: object + properties: + account_address: + type: string + description: 'Since: cosmos-sdk 0.46.2' + title: >- + QueryAccountAddressByIDResponse is the response type for + AccountAddressByID rpc method cosmos.auth.v1beta1.QueryAccountResponse: type: object properties: @@ -25056,9 +34718,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -25070,6 +34733,347 @@ definitions: description: >- QueryAccountsResponse is the response type for the Query/Accounts RPC method. + + + Since: cosmos-sdk 0.43 + cosmos.auth.v1beta1.QueryModuleAccountByNameResponse: + type: object + properties: + account: + 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: >- + QueryModuleAccountByNameResponse is the response type for the + Query/ModuleAccountByName RPC method. + cosmos.auth.v1beta1.QueryModuleAccountsResponse: + type: object + properties: + accounts: + 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: >- + QueryModuleAccountsResponse is the response type for the + Query/ModuleAccounts RPC method. + + + Since: cosmos-sdk 0.46 cosmos.auth.v1beta1.QueryParamsResponse: type: object properties: @@ -25120,7 +35124,6 @@ definitions: 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 @@ -25133,10 +35136,12 @@ definitions: is set. reverse: type: boolean - format: boolean description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 description: |- message SomeRequest { Foo some_parameter = 1; @@ -25151,9 +35156,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -25519,6 +35525,8 @@ definitions: DenomOwner defines structure representing an account that owns or holds a particular denominated token. It contains the account address and account balance of the denominated token. + + Since: cosmos-sdk 0.46 cosmos.bank.v1beta1.DenomUnit: type: object properties: @@ -25533,7 +35541,7 @@ definitions: raise the base_denom to in order to equal the given DenomUnit's denom - 1 denom = 1^exponent base_denom + 1 denom = 10^exponent base_denom (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with @@ -25571,7 +35579,7 @@ definitions: raise the base_denom to in order to equal the given DenomUnit's denom - 1 denom = 1^exponent base_denom + 1 denom = 10^exponent base_denom (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with @@ -25598,6 +35606,7 @@ definitions: displayed in clients. name: type: string + description: 'Since: cosmos-sdk 0.43' title: 'name defines the name of the token (eg: Cosmos Atom)' symbol: type: string @@ -25606,11 +35615,17 @@ definitions: can be the same as the display. + + + Since: cosmos-sdk 0.43 uri: type: string description: >- URI to a document (on or off-chain) that contains additional information. Optional. + + + Since: cosmos-sdk 0.46 uri_hash: type: string description: >- @@ -25618,6 +35633,9 @@ definitions: verify that the document didn't change. Optional. + + + Since: cosmos-sdk 0.46 description: |- Metadata represents a struct that describes a basic token. @@ -25633,7 +35651,6 @@ definitions: type: string enabled: type: boolean - format: boolean description: >- SendEnabled maps coin denom to a send_enabled status (whether a denom is @@ -25641,7 +35658,6 @@ definitions: sendable). default_send_enabled: type: boolean - format: boolean description: Params defines the parameters for the bank module. cosmos.bank.v1beta1.QueryAllBalancesResponse: type: object @@ -25668,9 +35684,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -25729,7 +35746,7 @@ definitions: raise the base_denom to in order to equal the given DenomUnit's denom - 1 denom = 1^exponent base_denom + 1 denom = 10^exponent base_denom (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with @@ -25756,6 +35773,7 @@ definitions: displayed in clients. name: type: string + description: 'Since: cosmos-sdk 0.43' title: 'name defines the name of the token (eg: Cosmos Atom)' symbol: type: string @@ -25764,11 +35782,17 @@ definitions: This can be the same as the display. + + + Since: cosmos-sdk 0.43 uri: type: string description: >- URI to a document (on or off-chain) that contains additional information. Optional. + + + Since: cosmos-sdk 0.46 uri_hash: type: string description: >- @@ -25776,6 +35800,9 @@ definitions: to verify that the document didn't change. Optional. + + + Since: cosmos-sdk 0.46 description: |- Metadata represents a struct that describes a basic token. @@ -25818,6 +35845,9 @@ definitions: account balance of the denominated token. + + + Since: cosmos-sdk 0.46 pagination: description: pagination defines the pagination in the response. type: object @@ -25825,9 +35855,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -25839,6 +35870,9 @@ definitions: description: >- QueryDenomOwnersResponse defines the RPC response of a DenomOwners RPC query. + + + Since: cosmos-sdk 0.46 cosmos.bank.v1beta1.QueryDenomsMetadataResponse: type: object properties: @@ -25868,7 +35902,7 @@ definitions: raise the base_denom to in order to equal the given DenomUnit's denom - 1 denom = 1^exponent base_denom + 1 denom = 10^exponent base_denom (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with @@ -25895,6 +35929,7 @@ definitions: displayed in clients. name: type: string + description: 'Since: cosmos-sdk 0.43' title: 'name defines the name of the token (eg: Cosmos Atom)' symbol: type: string @@ -25903,11 +35938,17 @@ definitions: ATOM). This can be the same as the display. + + + Since: cosmos-sdk 0.43 uri: type: string description: >- URI to a document (on or off-chain) that contains additional information. Optional. + + + Since: cosmos-sdk 0.46 uri_hash: type: string description: >- @@ -25915,6 +35956,9 @@ definitions: to verify that the document didn't change. Optional. + + + Since: cosmos-sdk 0.46 description: |- Metadata represents a struct that describes a basic token. @@ -25928,9 +35972,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -25959,7 +36004,6 @@ definitions: type: string enabled: type: boolean - format: boolean description: >- SendEnabled maps coin denom to a send_enabled status (whether a denom is @@ -25967,11 +36011,55 @@ definitions: 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.QuerySpendableBalancesResponse: + 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 spendable balances of all the coins. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QuerySpendableBalancesResponse defines the gRPC response structure for + querying + + an account's spendable balances. + + + Since: cosmos-sdk 0.46 cosmos.bank.v1beta1.QuerySupplyOfResponse: type: object properties: @@ -26009,15 +36097,19 @@ definitions: signatures required by gogoproto. title: supply is the supply of the coins pagination: - description: pagination defines the pagination in the response. + description: |- + pagination defines the pagination in the response. + + Since: cosmos-sdk 0.43 type: object properties: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -26038,7 +36130,6 @@ definitions: type: string enabled: type: boolean - format: boolean description: |- SendEnabled maps coin denom to a send_enabled status (whether a denom is sendable). @@ -26054,6 +36145,608 @@ definitions: NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. + cosmos.base.tendermint.v1beta1.ABCIQueryResponse: + type: object + properties: + code: + type: integer + format: int64 + log: + type: string + info: + type: string + index: + type: string + format: int64 + key: + type: string + format: byte + value: + type: string + format: byte + proof_ops: + type: object + properties: + ops: + type: array + items: + type: object + properties: + type: + type: string + key: + type: string + format: byte + data: + type: string + format: byte + description: >- + ProofOp defines an operation used for calculating Merkle root. + The data could + + be arbitrary format, providing nessecary data for example + neighbouring node + + hash. + + + Note: This type is a duplicate of the ProofOp proto type defined + in + + Tendermint. + description: |- + ProofOps is Merkle proof defined by the list of ProofOps. + + Note: This type is a duplicate of the ProofOps proto type defined in + Tendermint. + height: + type: string + format: int64 + codespace: + type: string + description: |- + ABCIQueryResponse defines the response structure for the ABCIQuery gRPC + query. + + Note: This type is a duplicate of the ResponseQuery proto type defined in + Tendermint. + cosmos.base.tendermint.v1beta1.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 + description: >- + proposer_address is the original block proposer address, formatted + as a Bech32 string. + + In Tendermint, this type is `bytes`, but in the SDK, we convert it + to a Bech32 string + + for better UX. + 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: + 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: |- + Block is tendermint type Block, with the Header proposer address + field converted to bech32 string. cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse: type: object properties: @@ -26075,6 +36768,7 @@ definitions: title: PartsetHeader title: BlockID block: + title: 'Deprecated: please use `sdk_block` instead' type: object properties: header: @@ -26602,9 +37296,550 @@ definitions: description: >- Commit contains the evidence that a block was committed by a set of validators. + sdk_block: + title: 'Since: cosmos-sdk 0.47' + 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 + description: >- + proposer_address is the original block proposer address, + formatted as a Bech32 string. + + In Tendermint, this type is `bytes`, but in the SDK, we + convert it to a Bech32 string + + for better UX. + 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: + 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: |- + Block is tendermint type Block, with the Header proposer address + field converted to bech32 string. description: >- GetBlockByHeightResponse is the response type for the - Query/GetBlockByHeight RPC method. + Query/GetBlockByHeight + + RPC method. cosmos.base.tendermint.v1beta1.GetLatestBlockResponse: type: object properties: @@ -26626,6 +37861,7 @@ definitions: title: PartsetHeader title: BlockID block: + title: 'Deprecated: please use `sdk_block` instead' type: object properties: header: @@ -27153,9 +38389,550 @@ definitions: description: >- Commit contains the evidence that a block was committed by a set of validators. + sdk_block: + title: 'Since: cosmos-sdk 0.47' + 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 + description: >- + proposer_address is the original block proposer address, + formatted as a Bech32 string. + + In Tendermint, this type is `bytes`, but in the SDK, we + convert it to a Bech32 string + + for better UX. + 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: + 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: |- + Block is tendermint type Block, with the Header proposer address + field converted to bech32 string. description: >- GetLatestBlockResponse is the response type for the Query/GetLatestBlock - RPC method. + RPC + + method. cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse: type: object properties: @@ -27352,9 +39129,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -27363,7 +39141,7 @@ definitions: PageRequest.count_total was set, its value is undefined otherwise - description: >- + description: |- GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. cosmos.base.tendermint.v1beta1.GetNodeInfoResponse: @@ -27436,16 +39214,16 @@ definitions: title: Module is the type for VersionInfo cosmos_sdk_version: type: string + title: 'Since: cosmos-sdk 0.43' description: VersionInfo is the type for the GetNodeInfoResponse message. - description: >- - GetNodeInfoResponse is the request type for the Query/GetNodeInfo RPC + description: |- + GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC method. cosmos.base.tendermint.v1beta1.GetSyncingResponse: type: object properties: syncing: type: boolean - format: boolean description: >- GetSyncingResponse is the response type for the Query/GetSyncing RPC method. @@ -27645,9 +39423,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -27656,9 +39435,93 @@ definitions: PageRequest.count_total was set, its value is undefined otherwise - description: >- + description: |- GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. + cosmos.base.tendermint.v1beta1.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 + description: >- + proposer_address is the original block proposer address, formatted as + a Bech32 string. + + In Tendermint, this type is `bytes`, but in the SDK, we convert it to + a Bech32 string + + for better UX. + description: Header defines the structure of a Tendermint block header. cosmos.base.tendermint.v1beta1.Module: type: object properties: @@ -27672,6 +39535,64 @@ definitions: type: string title: checksum title: Module is the type for VersionInfo + cosmos.base.tendermint.v1beta1.ProofOp: + type: object + properties: + type: + type: string + key: + type: string + format: byte + data: + type: string + format: byte + description: >- + ProofOp defines an operation used for calculating Merkle root. The data + could + + be arbitrary format, providing nessecary data for example neighbouring + node + + hash. + + + Note: This type is a duplicate of the ProofOp proto type defined in + + Tendermint. + cosmos.base.tendermint.v1beta1.ProofOps: + type: object + properties: + ops: + type: array + items: + type: object + properties: + type: + type: string + key: + type: string + format: byte + data: + type: string + format: byte + description: >- + ProofOp defines an operation used for calculating Merkle root. The + data could + + be arbitrary format, providing nessecary data for example + neighbouring node + + hash. + + + Note: This type is a duplicate of the ProofOp proto type defined in + + Tendermint. + description: |- + ProofOps is Merkle proof defined by the list of ProofOps. + + Note: This type is a duplicate of the ProofOps proto type defined in + Tendermint. cosmos.base.tendermint.v1beta1.Validator: type: object properties: @@ -27875,6 +39796,7 @@ definitions: title: Module is the type for VersionInfo cosmos_sdk_version: type: string + title: 'Since: cosmos-sdk 0.43' description: VersionInfo is the type for the GetNodeInfoResponse message. tendermint.crypto.PublicKey: type: object @@ -30310,7 +42232,6 @@ definitions: 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 @@ -30441,7 +42362,6 @@ definitions: 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 @@ -30529,9 +42449,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -30771,9 +42692,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -31180,7 +43102,7 @@ definitions: description: |- ProposalStatus enumerates the valid statuses of a proposal. - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal 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 @@ -31192,6 +43114,10 @@ definitions: - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has failed. final_tally_result: + description: |- + final_tally_result is the final tally result of the proposal. When + querying a proposal via gRPC, this field is not populated until the + proposal's voting period has ended. type: object properties: 'yes': @@ -31202,7 +43128,6 @@ definitions: type: string no_with_veto: type: string - description: TallyResult defines a standard tally for a governance proposal. submit_time: type: string format: date-time @@ -31243,7 +43168,7 @@ definitions: description: |- ProposalStatus enumerates the valid statuses of a proposal. - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal 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 @@ -31330,9 +43255,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -31594,7 +43520,7 @@ definitions: description: |- ProposalStatus enumerates the valid statuses of a proposal. - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal 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 @@ -31606,6 +43532,13 @@ definitions: - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has failed. final_tally_result: + description: >- + final_tally_result is the final tally result of the proposal. When + + querying a proposal via gRPC, this field is not populated until + the + + proposal's voting period has ended. type: object properties: 'yes': @@ -31616,7 +43549,6 @@ definitions: type: string no_with_veto: type: string - description: TallyResult defines a standard tally for a governance proposal. submit_time: type: string format: date-time @@ -31843,7 +43775,7 @@ definitions: description: |- ProposalStatus enumerates the valid statuses of a proposal. - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal 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 @@ -31855,6 +43787,14 @@ definitions: - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has failed. final_tally_result: + description: >- + final_tally_result is the final tally result of the proposal. + When + + querying a proposal via gRPC, this field is not populated until + the + + proposal's voting period has ended. type: object properties: 'yes': @@ -31865,7 +43805,6 @@ definitions: type: string no_with_veto: type: string - description: TallyResult defines a standard tally for a governance proposal. submit_time: type: string format: date-time @@ -31903,9 +43842,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -31921,6 +43861,7 @@ definitions: type: object properties: tally: + description: tally defines the requested tally. type: object properties: 'yes': @@ -31931,7 +43872,6 @@ definitions: type: string no_with_veto: type: string - description: TallyResult defines a standard tally for a governance proposal. description: >- QueryTallyResultResponse is the response type for the Query/Tally RPC method. @@ -31988,7 +43928,11 @@ definitions: - 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: |- + WeightedVoteOption defines a unit of vote for vote split. + + Since: cosmos-sdk 0.43 + title: 'Since: cosmos-sdk 0.43' description: |- Vote defines a vote on a governance proposal. A Vote consists of a proposal ID, the voter, and the vote option. @@ -32048,7 +43992,11 @@ definitions: - 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: |- + WeightedVoteOption defines a unit of vote for vote split. + + Since: cosmos-sdk 0.43 + title: 'Since: cosmos-sdk 0.43' description: |- Vote defines a vote on a governance proposal. A Vote consists of a proposal ID, the voter, and the vote option. @@ -32060,9 +44008,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -32156,7 +44105,11 @@ definitions: - 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: |- + WeightedVoteOption defines a unit of vote for vote split. + + Since: cosmos-sdk 0.43 + title: 'Since: cosmos-sdk 0.43' description: |- Vote defines a vote on a governance proposal. A Vote consists of a proposal ID, the voter, and the vote option. @@ -32186,6 +44139,1261 @@ definitions: 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: >- + 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. + + Since: cosmos-sdk 0.43 + cosmos.gov.v1.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. + + 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.v1.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.v1.Proposal: + type: object + properties: + id: + type: string + format: uint64 + 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" + } + 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 proposal 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: + description: |- + final_tally_result is the final tally result of the proposal. When + querying a proposal via gRPC, this field is not populated until the + proposal's voting period has ended. + type: object + properties: + yes_count: + type: string + abstain_count: + type: string + no_count: + type: string + no_with_veto_count: + type: string + 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. + + 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 + metadata: + type: string + description: metadata is any arbitrary metadata attached to the proposal. + description: Proposal defines the core field members of a governance proposal. + cosmos.gov.v1.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. + + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal 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.v1.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. + + + 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. + description: >- + QueryDepositResponse is the response type for the Query/Deposit RPC + method. + cosmos.gov.v1.QueryDepositsResponse: + type: object + properties: + deposits: + type: array + items: + 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. + + + 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 + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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.v1.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 + description: >- + Minimum percentage of total stake needed to vote for a result to + be + considered valid. + threshold: + type: string + description: >- + Minimum proportion of Yes votes for proposal to pass. Default + value: 0.5. + veto_threshold: + type: string + 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.v1.QueryProposalResponse: + type: object + properties: + proposal: + type: object + properties: + id: + type: string + format: uint64 + 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" + } + 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 proposal 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: + description: >- + final_tally_result is the final tally result of the proposal. When + + querying a proposal via gRPC, this field is not populated until + the + + proposal's voting period has ended. + type: object + properties: + yes_count: + type: string + abstain_count: + type: string + no_count: + type: string + no_with_veto_count: + type: string + 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. + + + 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 + metadata: + type: string + description: metadata is any arbitrary metadata attached to the proposal. + 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.v1.QueryProposalsResponse: + type: object + properties: + proposals: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + 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" + } + 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 proposal 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: + description: >- + final_tally_result is the final tally result of the proposal. + When + + querying a proposal via gRPC, this field is not populated until + the + + proposal's voting period has ended. + type: object + properties: + yes_count: + type: string + abstain_count: + type: string + no_count: + type: string + no_with_veto_count: + type: string + 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. + + + 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 + metadata: + type: string + description: metadata is any arbitrary metadata attached to the proposal. + 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 + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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.v1.QueryTallyResultResponse: + type: object + properties: + tally: + description: tally defines the requested tally. + type: object + properties: + yes_count: + type: string + abstain_count: + type: string + no_count: + type: string + no_with_veto_count: + type: string + description: >- + QueryTallyResultResponse is the response type for the Query/Tally RPC + method. + cosmos.gov.v1.QueryVoteResponse: + type: object + properties: + vote: + type: object + properties: + proposal_id: + type: string + 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. + + - 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. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the vote. + 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.v1.QueryVotesResponse: + type: object + properties: + votes: + type: array + items: + type: object + properties: + proposal_id: + type: string + 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. + + - 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. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the vote. + 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. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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.v1.TallyParams: + type: object + properties: + quorum: + type: string + description: |- + Minimum percentage of total stake needed to vote for a result to be + considered valid. + threshold: + type: string + description: >- + Minimum proportion of Yes votes for proposal to pass. Default value: + 0.5. + veto_threshold: + type: string + 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.v1.TallyResult: + type: object + properties: + yes_count: + type: string + abstain_count: + type: string + no_count: + type: string + no_with_veto_count: + type: string + description: TallyResult defines a standard tally for a governance proposal. + cosmos.gov.v1.Vote: + type: object + properties: + proposal_id: + type: string + 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. + + - 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. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the vote. + description: |- + Vote defines a vote on a governance proposal. + A Vote consists of a proposal ID, the voter, and the vote option. + cosmos.gov.v1.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.v1.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.v1.WeightedVoteOption: type: object properties: option: @@ -32305,6 +45513,47 @@ definitions: value: type: string description: QueryParamsResponse is response type for the Query/Params RPC method. + cosmos.params.v1beta1.QuerySubspacesResponse: + type: object + properties: + subspaces: + type: array + items: + type: object + properties: + subspace: + type: string + keys: + type: array + items: + type: string + description: >- + Subspace defines a parameter subspace name and all the keys that + exist for + + the subspace. + + + Since: cosmos-sdk 0.46 + description: |- + QuerySubspacesResponse defines the response types for querying for all + registered subspaces and all keys for a subspace. + + Since: cosmos-sdk 0.46 + cosmos.params.v1beta1.Subspace: + type: object + properties: + subspace: + type: string + keys: + type: array + items: + type: string + description: |- + Subspace defines a parameter subspace name and all the keys that exist for + the subspace. + + Since: cosmos-sdk 0.46 cosmos.slashing.v1beta1.Params: type: object properties: @@ -32376,7 +45625,6 @@ definitions: downtime. tombstoned: type: boolean - format: boolean description: >- Whether or not a validator has been tombstoned (killed out of validator set). It is set @@ -32435,7 +45683,6 @@ definitions: downtime. tombstoned: type: boolean - format: boolean description: >- Whether or not a validator has been tombstoned (killed out of validator set). It is set @@ -32462,9 +45709,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -32514,7 +45762,6 @@ definitions: downtime. tombstoned: type: boolean - format: boolean description: >- Whether or not a validator has been tombstoned (killed out of validator set). It is set @@ -32560,7 +45807,7 @@ definitions: properties: rate: type: string - description: 'rate is the commission rate charged to delegators, as a fraction.' + description: rate is the commission rate charged to delegators, as a fraction. max_rate: type: string description: >- @@ -32581,7 +45828,7 @@ definitions: properties: rate: type: string - description: 'rate is the commission rate charged to delegators, as a fraction.' + description: rate is the commission rate charged to delegators, as a fraction. max_rate: type: string description: >- @@ -32929,7 +46176,6 @@ definitions: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -33021,6 +46267,9 @@ definitions: description: >- min_self_delegation is the validator's self declared minimum self delegation. + + + Since: cosmos-sdk 0.46 description: >- Validator defines a validator, together with the total amount of the @@ -33075,6 +46324,11 @@ definitions: bond_denom: type: string description: bond_denom defines the bondable coin denomination. + min_commission_rate: + type: string + title: >- + min_commission_rate is the chain-wide minimum commission rate that a + validator can charge their delegators description: Params defines the parameters for the staking module. cosmos.staking.v1beta1.Pool: type: object @@ -33201,9 +46455,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -33272,9 +46527,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -33464,7 +46720,6 @@ definitions: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -33554,6 +46809,9 @@ definitions: description: >- min_self_delegation is the validator's self declared minimum self delegation. + + + Since: cosmos-sdk 0.46 description: >- Validator defines a validator, together with the total amount of the @@ -33762,7 +47020,6 @@ definitions: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -33854,6 +47111,9 @@ definitions: description: >- min_self_delegation is the validator's self declared minimum self delegation. + + + Since: cosmos-sdk 0.46 description: >- Validator defines a validator, together with the total amount of the @@ -33875,7 +47135,7 @@ definitions: 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. + description: validators defines the validators' info of a delegator. pagination: description: pagination defines the pagination in the response. type: object @@ -33883,9 +47143,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -34168,7 +47429,6 @@ definitions: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -34260,6 +47520,9 @@ definitions: description: >- min_self_delegation is the validator's self declared minimum self delegation. + + + Since: cosmos-sdk 0.46 description: >- Validator defines a validator, together with the total amount of the @@ -34315,6 +47578,11 @@ definitions: bond_denom: type: string description: bond_denom defines the bondable coin denomination. + min_commission_rate: + type: string + title: >- + min_commission_rate is the chain-wide minimum commission rate that + a validator can charge their delegators description: QueryParamsResponse is response type for the Query/Params RPC method. cosmos.staking.v1beta1.QueryPoolResponse: type: object @@ -34449,9 +47717,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -34570,9 +47839,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -34762,7 +48032,6 @@ definitions: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -34852,6 +48121,9 @@ definitions: description: >- min_self_delegation is the validator's self declared minimum self delegation. + + + Since: cosmos-sdk 0.46 description: >- Validator defines a validator, together with the total amount of the @@ -34931,9 +48203,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -35129,7 +48402,6 @@ definitions: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -35221,6 +48493,9 @@ definitions: description: >- min_self_delegation is the validator's self declared minimum self delegation. + + + Since: cosmos-sdk 0.46 description: >- Validator defines a validator, together with the total amount of the @@ -35250,9 +48525,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -35708,7 +48984,6 @@ definitions: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -35796,6 +49071,9 @@ definitions: description: >- min_self_delegation is the validator's self declared minimum self delegation. + + + Since: cosmos-sdk 0.46 description: >- Validator defines a validator, together with the total amount of the @@ -35888,6 +49166,11 @@ definitions: length prefixed in order to separate data from multiple message executions. + + Deprecated. This field is still populated, but prefer msg_response + instead + + because it also contains the Msg response typeURL. log: type: string description: Log contains the log information from message or handler execution. @@ -35911,7 +49194,6 @@ definitions: format: byte index: type: boolean - format: boolean description: >- EventAttribute is a single key-value pair, associated with an event. @@ -35928,6 +49210,174 @@ definitions: message or handler execution. + msg_responses: + 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: |- + msg_responses contains the Msg handler responses type packed in Anys. + + Since: cosmos-sdk 0.46 description: Result is the union of ResponseFormat and ResponseCheckTx. cosmos.base.abci.v1beta1.StringEvent: type: object @@ -35968,7 +49418,7 @@ definitions: description: Response code. data: type: string - description: 'Result bytes, if any.' + description: Result bytes, if any. raw_log: type: string description: |- @@ -36201,6 +49651,50 @@ definitions: == 1, it's genesis time. + 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 + 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. + + Later, transactions may be queried using these events. + description: >- + Events defines all the events emitted by processing a transaction. + Note, + + these events include those emitted by processing all the messages and + those + + emitted from the ante. Whereas Logs contains the events, with + + additional metadata, emitted only by processing the messages. + + + Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 description: >- TxResponse defines a structure containing relevant tx data and metadata. The @@ -36226,20 +49720,45 @@ definitions: - SIGN_MODE_UNSPECIFIED - SIGN_MODE_DIRECT - SIGN_MODE_TEXTUAL + - SIGN_MODE_DIRECT_AUX - SIGN_MODE_LEGACY_AMINO_JSON + - SIGN_MODE_EIP_191 default: SIGN_MODE_UNSPECIFIED description: |- SignMode represents a signing mode with its own security guarantees. + This enum should be considered a registry of all known sign modes + in the Cosmos ecosystem. Apps are not expected to support all known + sign modes. Apps that would like to support custom sign modes are + encouraged to open a small PR against this file to add a new case + to this SignMode enum describing their sign mode so that different + apps have a consistent version of this enum. + - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be - rejected + rejected. - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is - verified with raw bytes from Tx + 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 + from SIGN_MODE_DIRECT. It is currently not supported. + - SIGN_MODE_DIRECT_AUX: SIGN_MODE_DIRECT_AUX specifies a signing mode which uses + SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not + require signers signing over other signers' `signer_info`. It also allows + for adding Tips in transactions. + + Since: cosmos-sdk 0.46 - 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 + Amino JSON and will be removed in the future. + - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos + SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 + + Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, + but is not implemented on the SDK by default. To enable EIP-191, you need + to pass a custom `TxConfig` that has an implementation of + `SignModeHandler` for EIP-191. The SDK may decide to fully support + EIP-191 in the future. + + Since: cosmos-sdk 0.45.2 cosmos.tx.v1beta1.AuthInfo: type: object properties: @@ -36318,6 +49837,42 @@ definitions: appropriate fee grant does not exist or the chain does not support fee grants, this will fail + tip: + description: >- + Tip is the optional tip used for transactions fees paid in another + denom. + + + This field is ignored if the chain didn't enable tips, i.e. didn't add + the + + `TipDecorator` in its posthandler. + + + Since: cosmos-sdk 0.46 + 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 the tip + tipper: + type: string + title: tipper is the address of the account paying for the tip description: |- AuthInfo describes the fee and signer modes that are used to sign a transaction. @@ -36391,7 +49946,7 @@ definitions: description: Response code. data: type: string - description: 'Result bytes, if any.' + description: Result bytes, if any. raw_log: type: string description: |- @@ -36631,6 +50186,50 @@ definitions: height == 1, it's genesis time. + 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 + 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. + + Later, transactions may be queried using these events. + description: >- + Events defines all the events emitted by processing a transaction. + Note, + + these events include those emitted by processing all the messages + and those + + emitted from the ante. Whereas Logs contains the events, with + + additional metadata, emitted only by processing the messages. + + + Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 description: >- TxResponse defines a structure containing relevant tx data and metadata. The @@ -36693,6 +50292,584 @@ definitions: "gasprice", which must be above some miminum to be accepted into the mempool. + cosmos.tx.v1beta1.GetBlockWithTxsResponse: + type: object + properties: + txs: + type: array + items: + $ref: '#/definitions/cosmos.tx.v1beta1.Tx' + description: txs are the transactions in the block. + 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, + + 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: + 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. + pagination: + description: pagination defines a pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + GetBlockWithTxsResponse is the response type for the + Service.GetBlockWithTxs method. + + + Since: cosmos-sdk 0.45.2 cosmos.tx.v1beta1.GetTxResponse: type: object properties: @@ -36718,7 +50895,7 @@ definitions: description: Response code. data: type: string - description: 'Result bytes, if any.' + description: Result bytes, if any. raw_log: type: string description: |- @@ -36958,6 +51135,50 @@ definitions: height == 1, it's genesis time. + 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 + 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. + + Later, transactions may be queried using these events. + description: >- + Events defines all the events emitted by processing a transaction. + Note, + + these events include those emitted by processing all the messages + and those + + emitted from the ante. Whereas Logs contains the events, with + + additional metadata, emitted only by processing the messages. + + + Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 description: >- TxResponse defines a structure containing relevant tx data and metadata. The @@ -36993,7 +51214,7 @@ definitions: description: Response code. data: type: string - description: 'Result bytes, if any.' + description: Result bytes, if any. raw_log: type: string description: |- @@ -37237,6 +51458,50 @@ definitions: height == 1, it's genesis time. + 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 + 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. + + Later, transactions may be queried using these events. + description: >- + Events defines all the events emitted by processing a + transaction. Note, + + these events include those emitted by processing all the + messages and those + + emitted from the ante. Whereas Logs contains the events, with + + additional metadata, emitted only by processing the messages. + + + Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 description: >- TxResponse defines a structure containing relevant tx data and metadata. The @@ -37244,15 +51509,18 @@ definitions: 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. + description: |- + pagination defines a pagination for the response. + Deprecated post v0.46.x: use total instead. type: object properties: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -37261,6 +51529,10 @@ definitions: PageRequest.count_total was set, its value is undefined otherwise + total: + type: string + format: uint64 + title: total is total number of results available description: |- GetTxsEventResponse is the response type for the Service.TxsByEvents RPC method. @@ -37278,23 +51550,68 @@ definitions: - SIGN_MODE_UNSPECIFIED - SIGN_MODE_DIRECT - SIGN_MODE_TEXTUAL + - SIGN_MODE_DIRECT_AUX - SIGN_MODE_LEGACY_AMINO_JSON + - SIGN_MODE_EIP_191 default: SIGN_MODE_UNSPECIFIED description: >- SignMode represents a signing mode with its own security guarantees. + + This enum should be considered a registry of all known sign modes + + in the Cosmos ecosystem. Apps are not expected to support all + known + + sign modes. Apps that would like to support custom sign modes are + + encouraged to open a small PR against this file to add a new case + + to this SignMode enum describing their sign mode so that different + + apps have a consistent version of this enum. + - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be - rejected + rejected. - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is - verified with raw bytes from Tx + 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 + from SIGN_MODE_DIRECT. It is currently not supported. + - SIGN_MODE_DIRECT_AUX: SIGN_MODE_DIRECT_AUX specifies a signing mode which uses + SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode + does not + + require signers signing over other signers' `signer_info`. It also + allows + + for adding Tips in transactions. + + + Since: cosmos-sdk 0.46 - 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 + Amino JSON and will be removed in the future. + - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos + SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 + + + Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum + variant, + + but is not implemented on the SDK by default. To enable EIP-191, + you need + + to pass a custom `TxConfig` that has an implementation of + + `SignModeHandler` for EIP-191. The SDK may decide to fully support + + EIP-191 in the future. + + + Since: cosmos-sdk 0.45.2 multi: $ref: '#/definitions/cosmos.tx.v1beta1.ModeInfo.Multi' title: multi represents a nested multisig signer @@ -37339,22 +51656,65 @@ definitions: - SIGN_MODE_UNSPECIFIED - SIGN_MODE_DIRECT - SIGN_MODE_TEXTUAL + - SIGN_MODE_DIRECT_AUX - SIGN_MODE_LEGACY_AMINO_JSON + - SIGN_MODE_EIP_191 default: SIGN_MODE_UNSPECIFIED description: >- SignMode represents a signing mode with its own security guarantees. + + This enum should be considered a registry of all known sign modes + + in the Cosmos ecosystem. Apps are not expected to support all known + + sign modes. Apps that would like to support custom sign modes are + + encouraged to open a small PR against this file to add a new case + + to this SignMode enum describing their sign mode so that different + + apps have a consistent version of this enum. + - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be - rejected + rejected. - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is - verified with raw bytes from Tx + 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 + from SIGN_MODE_DIRECT. It is currently not supported. + - SIGN_MODE_DIRECT_AUX: SIGN_MODE_DIRECT_AUX specifies a signing mode which uses + SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does + not + + require signers signing over other signers' `signer_info`. It also + allows + + for adding Tips in transactions. + + + Since: cosmos-sdk 0.46 - 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 + Amino JSON and will be removed in the future. + - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos + SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 + + + Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, + + but is not implemented on the SDK by default. To enable EIP-191, you + need + + to pass a custom `TxConfig` that has an implementation of + + `SignModeHandler` for EIP-191. The SDK may decide to fully support + + EIP-191 in the future. + + + Since: cosmos-sdk 0.45.2 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 @@ -37563,7 +51923,10 @@ definitions: tx_bytes: type: string format: byte - description: tx_bytes is the raw transaction. + description: |- + tx_bytes is the raw transaction. + + Since: cosmos-sdk 0.43 description: |- SimulateRequest is the request type for the Service.Simulate RPC method. @@ -37597,6 +51960,11 @@ definitions: length prefixed in order to separate data from multiple message executions. + + Deprecated. This field is still populated, but prefer msg_response + instead + + because it also contains the Msg response typeURL. log: type: string description: >- @@ -37622,7 +51990,6 @@ definitions: format: byte index: type: boolean - format: boolean description: >- EventAttribute is a single key-value pair, associated with an event. @@ -37639,9 +52006,211 @@ definitions: message or handler execution. + msg_responses: + 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: >- + msg_responses contains the Msg handler responses type packed in + Anys. + + + Since: cosmos-sdk 0.46 description: |- SimulateResponse is the response type for the Service.SimulateRPC method. + cosmos.tx.v1beta1.Tip: + 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 the tip + tipper: + type: string + title: tipper is the address of the account paying for the tip + description: |- + Tip is the tip used for meta-transactions. + + Since: cosmos-sdk 0.46 cosmos.tx.v1beta1.Tx: type: object properties: @@ -38793,8 +53362,7 @@ definitions: format: byte index: type: boolean - format: boolean - description: 'EventAttribute is a single key-value pair, associated with an event.' + description: EventAttribute is a single key-value pair, associated with an event. description: >- Event allows application developers to attach additional information to @@ -38813,8 +53381,7 @@ definitions: format: byte index: type: boolean - format: boolean - description: 'EventAttribute is a single key-value pair, associated with an event.' + description: EventAttribute is a single key-value pair, associated with an event. cosmos.upgrade.v1beta1.ModuleVersion: type: object properties: @@ -38825,7 +53392,10 @@ definitions: type: string format: uint64 title: consensus version of the app module - description: ModuleVersion specifies a module and its consensus version. + description: |- + ModuleVersion specifies a module and its consensus version. + + Since: cosmos-sdk 0.43 cosmos.upgrade.v1beta1.Plan: type: object properties: @@ -39044,6 +53614,13 @@ definitions: RPC method. + cosmos.upgrade.v1beta1.QueryAuthorityResponse: + type: object + properties: + address: + type: string + description: 'Since: cosmos-sdk 0.46' + title: QueryAuthorityResponse is the response type for Query/Authority cosmos.upgrade.v1beta1.QueryCurrentPlanResponse: type: object properties: @@ -39281,7 +53858,10 @@ definitions: type: string format: uint64 title: consensus version of the app module - description: ModuleVersion specifies a module and its consensus version. + description: |- + ModuleVersion specifies a module and its consensus version. + + Since: cosmos-sdk 0.43 description: >- module_versions is a list of module names with their consensus versions. @@ -39290,12 +53870,16 @@ definitions: Query/ModuleVersions RPC method. + + + Since: cosmos-sdk 0.43 cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse: type: object properties: upgraded_consensus_state: type: string format: byte + title: 'Since: cosmos-sdk 0.43' description: >- QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState @@ -39466,9 +54050,614 @@ definitions: expiration: type: string format: date-time + title: >- + time when the grant will expire and will be pruned. If null, then the + grant + + doesn't have a time expiration (other conditions in `authorization` + + may apply to invalidate the grant) description: |- Grant gives permissions to execute the provide method with expiration time. + cosmos.authz.v1beta1.GrantAuthorization: + type: object + properties: + granter: + type: string + grantee: + type: string + 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: >- + GrantAuthorization extends a grant with both the addresses of the grantee + and granter. + + It is used in genesis.proto and query.proto + cosmos.authz.v1beta1.QueryGranteeGrantsResponse: + type: object + properties: + grants: + type: array + items: + type: object + properties: + granter: + type: string + grantee: + type: string + 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: >- + GrantAuthorization extends a grant with both the addresses of the + grantee and granter. + + It is used in genesis.proto and query.proto + description: grants is a list of grants granted to the grantee. + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QueryGranteeGrantsResponse is the response type for the + Query/GranteeGrants RPC method. + cosmos.authz.v1beta1.QueryGranterGrantsResponse: + type: object + properties: + grants: + type: array + items: + type: object + properties: + granter: + type: string + grantee: + type: string + 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: >- + GrantAuthorization extends a grant with both the addresses of the + grantee and granter. + + It is used in genesis.proto and query.proto + description: grants is a list of grants granted by the granter. + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QueryGranterGrantsResponse is the response type for the + Query/GranterGrants RPC method. cosmos.authz.v1beta1.QueryGrantsResponse: type: object properties: @@ -39649,6 +54838,14 @@ definitions: expiration: type: string format: date-time + title: >- + time when the grant will expire and will be pruned. If null, + then the grant + + doesn't have a time expiration (other conditions in + `authorization` + + may apply to invalidate the grant) description: |- Grant gives permissions to execute the provide method with expiration time. @@ -39660,9 +54857,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -39688,7 +54886,7 @@ definitions: grantee is the address of the user being granted an allowance of another user's funds. allowance: - description: allowance can be any of basic and filtered fee allowance. + description: allowance can be any of basic, periodic, allowed fee allowance. type: object properties: type_url: @@ -39768,7 +54966,7 @@ definitions: grantee is the address of the user being granted an allowance of another user's funds. allowance: - description: allowance can be any of basic and filtered fee allowance. + description: allowance can be any of basic, periodic, allowed fee allowance. type: object properties: type_url: @@ -39836,6 +55034,118 @@ definitions: description: >- QueryAllowanceResponse is the response type for the Query/Allowance RPC method. + cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse: + type: object + properties: + allowances: + type: array + items: + type: object + properties: + granter: + type: string + description: >- + granter is the address of the user granting an allowance of + their funds. + grantee: + type: string + description: >- + grantee is the address of the user being granted an allowance of + another user's funds. + allowance: + description: allowance can be any of basic, periodic, allowed fee allowance. + 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. + title: Grant is stored in the KVStore to record a grant with full context + description: allowances that have been issued by the granter. + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QueryAllowancesByGranterResponse is the response type for the + Query/AllowancesByGranter RPC method. + + + Since: cosmos-sdk 0.46 cosmos.feegrant.v1beta1.QueryAllowancesResponse: type: object properties: @@ -39855,7 +55165,7 @@ definitions: grantee is the address of the user being granted an allowance of another user's funds. allowance: - description: allowance can be any of basic and filtered fee allowance. + description: allowance can be any of basic, periodic, allowed fee allowance. type: object properties: type_url: @@ -39930,9 +55240,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -39944,3 +55255,3549 @@ definitions: description: >- QueryAllowancesResponse is the response type for the Query/Allowances RPC method. + cosmos.nft.v1beta1.Class: + type: object + properties: + id: + type: string + title: >- + id defines the unique identifier of the NFT classification, similar to + the contract address of ERC721 + name: + type: string + title: >- + name defines the human-readable name of the NFT classification. + Optional + symbol: + type: string + title: symbol is an abbreviated name for nft classification. Optional + description: + type: string + title: description is a brief description of nft classification. Optional + uri: + type: string + title: >- + uri for the class metadata stored off chain. It can define schema for + Class and NFT `Data` attributes. Optional + uri_hash: + type: string + title: uri_hash is a hash of the document pointed by uri. Optional + data: + 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: data is the app specific metadata of the NFT class. Optional + description: Class defines the class of the nft type. + cosmos.nft.v1beta1.NFT: + type: object + properties: + class_id: + type: string + title: >- + class_id associated with the NFT, similar to the contract address of + ERC721 + id: + type: string + title: id is a unique identifier of the NFT + uri: + type: string + title: uri for the NFT metadata stored off chain + uri_hash: + type: string + title: uri_hash is a hash of the document pointed by uri + data: + 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: data is an app specific data of the NFT. Optional + description: NFT defines the NFT. + cosmos.nft.v1beta1.QueryBalanceResponse: + type: object + properties: + amount: + type: string + format: uint64 + title: QueryBalanceResponse is the response type for the Query/Balance RPC method + cosmos.nft.v1beta1.QueryClassResponse: + type: object + properties: + class: + type: object + properties: + id: + type: string + title: >- + id defines the unique identifier of the NFT classification, + similar to the contract address of ERC721 + name: + type: string + title: >- + name defines the human-readable name of the NFT classification. + Optional + symbol: + type: string + title: symbol is an abbreviated name for nft classification. Optional + description: + type: string + title: description is a brief description of nft classification. Optional + uri: + type: string + title: >- + uri for the class metadata stored off chain. It can define schema + for Class and NFT `Data` attributes. Optional + uri_hash: + type: string + title: uri_hash is a hash of the document pointed by uri. Optional + data: + 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: data is the app specific metadata of the NFT class. Optional + description: Class defines the class of the nft type. + title: QueryClassResponse is the response type for the Query/Class RPC method + cosmos.nft.v1beta1.QueryClassesResponse: + type: object + properties: + classes: + type: array + items: + type: object + properties: + id: + type: string + title: >- + id defines the unique identifier of the NFT classification, + similar to the contract address of ERC721 + name: + type: string + title: >- + name defines the human-readable name of the NFT classification. + Optional + symbol: + type: string + title: symbol is an abbreviated name for nft classification. Optional + description: + type: string + title: >- + description is a brief description of nft classification. + Optional + uri: + type: string + title: >- + uri for the class metadata stored off chain. It can define + schema for Class and NFT `Data` attributes. Optional + uri_hash: + type: string + title: uri_hash is a hash of the document pointed by uri. Optional + data: + 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: data is the app specific metadata of the NFT class. Optional + description: Class defines the class of the nft type. + pagination: + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: QueryClassesResponse is the response type for the Query/Classes RPC method + cosmos.nft.v1beta1.QueryNFTResponse: + type: object + properties: + nft: + type: object + properties: + class_id: + type: string + title: >- + class_id associated with the NFT, similar to the contract address + of ERC721 + id: + type: string + title: id is a unique identifier of the NFT + uri: + type: string + title: uri for the NFT metadata stored off chain + uri_hash: + type: string + title: uri_hash is a hash of the document pointed by uri + data: + 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: data is an app specific data of the NFT. Optional + description: NFT defines the NFT. + title: QueryNFTResponse is the response type for the Query/NFT RPC method + cosmos.nft.v1beta1.QueryNFTsResponse: + type: object + properties: + nfts: + type: array + items: + type: object + properties: + class_id: + type: string + title: >- + class_id associated with the NFT, similar to the contract + address of ERC721 + id: + type: string + title: id is a unique identifier of the NFT + uri: + type: string + title: uri for the NFT metadata stored off chain + uri_hash: + type: string + title: uri_hash is a hash of the document pointed by uri + data: + 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: data is an app specific data of the NFT. Optional + description: NFT defines the NFT. + pagination: + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: QueryNFTsResponse is the response type for the Query/NFTs RPC methods + cosmos.nft.v1beta1.QueryOwnerResponse: + type: object + properties: + owner: + type: string + title: QueryOwnerResponse is the response type for the Query/Owner RPC method + cosmos.nft.v1beta1.QuerySupplyResponse: + type: object + properties: + amount: + type: string + format: uint64 + title: QuerySupplyResponse is the response type for the Query/Supply RPC method + cosmos.group.v1.GroupInfo: + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group's admin. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the group. + version: + type: string + format: uint64 + title: >- + version is used to track changes to a group's membership structure + that + + would break existing proposals. Whenever any members weight is + changed, + + or any member is added or removed this version is incremented and will + + cause proposals based on older versions of this group to fail + total_weight: + type: string + description: total_weight is the sum of the group members' weights. + created_at: + type: string + format: date-time + description: created_at is a timestamp specifying when a group was created. + description: GroupInfo represents the high-level on-chain information for a group. + cosmos.group.v1.GroupMember: + type: object + properties: + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + member: + description: member is the member data. + type: object + properties: + address: + type: string + description: address is the member's account address. + weight: + type: string + description: >- + weight is the member's voting weight that should be greater than + 0. + metadata: + type: string + description: metadata is any arbitrary metadata attached to the member. + added_at: + type: string + format: date-time + description: added_at is a timestamp specifying when a member was added. + description: GroupMember represents the relationship between a group and a member. + cosmos.group.v1.GroupPolicyInfo: + type: object + properties: + address: + type: string + description: address is the account address of group policy. + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group admin. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the group policy. + version: + type: string + format: uint64 + description: >- + version is used to track changes to a group's GroupPolicyInfo + structure that + + would create a different result on a running proposal. + decision_policy: + 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" + } + created_at: + type: string + format: date-time + description: created_at is a timestamp specifying when a group policy was created. + description: >- + GroupPolicyInfo represents the high-level on-chain information for a group + policy. + cosmos.group.v1.Member: + type: object + properties: + address: + type: string + description: address is the member's account address. + weight: + type: string + description: weight is the member's voting weight that should be greater than 0. + metadata: + type: string + description: metadata is any arbitrary metadata attached to the member. + added_at: + type: string + format: date-time + description: added_at is a timestamp specifying when a member was added. + description: |- + Member represents a group member with an account address, + non-zero weight, metadata and added_at timestamp. + cosmos.group.v1.Proposal: + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique id of the proposal. + group_policy_address: + type: string + description: group_policy_address is the account address of group policy. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the proposal. + proposers: + type: array + items: + type: string + description: proposers are the account addresses of the proposers. + submit_time: + type: string + format: date-time + description: submit_time is a timestamp specifying when a proposal was submitted. + group_version: + type: string + format: uint64 + description: |- + group_version tracks the version of the group at proposal submission. + This field is here for informational purposes only. + group_policy_version: + type: string + format: uint64 + description: >- + group_policy_version tracks the version of the group policy at + proposal submission. + + When a decision policy is changed, existing proposals from previous + policy + + versions will become invalid with the `ABORTED` status. + + This field is here for informational purposes only. + status: + description: >- + status represents the high level position in the life cycle of the + proposal. Initial value is Submitted. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_SUBMITTED + - PROPOSAL_STATUS_ACCEPTED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_ABORTED + - PROPOSAL_STATUS_WITHDRAWN + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: >- + final_tally_result contains the sums of all weighted votes for this + + proposal for each vote option. It is empty at submission, and only + + populated after tallying, at voting period end or at proposal + execution, + + whichever happens first. + type: object + properties: + yes_count: + type: string + description: yes_count is the weighted sum of yes votes. + abstain_count: + type: string + description: abstain_count is the weighted sum of abstainers. + no_count: + type: string + description: no_count is the weighted sum of no votes. + no_with_veto_count: + type: string + description: no_with_veto_count is the weighted sum of veto. + voting_period_end: + type: string + format: date-time + description: >- + voting_period_end is the timestamp before which voting must be done. + + Unless a successfull MsgExec is called before (to execute a proposal + whose + + tally is successful before the voting period ends), tallying will be + done + + at this point, and the `final_tally_result`and `status` fields will be + + accordingly updated. + executor_result: + description: >- + executor_result is the final result of the proposal execution. Initial + value is NotRun. + type: string + enum: + - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + - PROPOSAL_EXECUTOR_RESULT_NOT_RUN + - PROPOSAL_EXECUTOR_RESULT_SUCCESS + - PROPOSAL_EXECUTOR_RESULT_FAILURE + default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + 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 `sdk.Msg`s that will be executed if the proposal + passes. + description: >- + Proposal defines a group proposal. Any member of a group can submit a + proposal + + for a group policy to decide upon. + + A proposal consists of a set of `sdk.Msg`s that will be executed if the + proposal + + passes as well as some optional metadata associated with the proposal. + cosmos.group.v1.ProposalExecutorResult: + type: string + enum: + - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + - PROPOSAL_EXECUTOR_RESULT_NOT_RUN + - PROPOSAL_EXECUTOR_RESULT_SUCCESS + - PROPOSAL_EXECUTOR_RESULT_FAILURE + default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + description: |- + ProposalExecutorResult defines types of proposal executor results. + + - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED: An empty value is not allowed. + - PROPOSAL_EXECUTOR_RESULT_NOT_RUN: We have not yet run the executor. + - PROPOSAL_EXECUTOR_RESULT_SUCCESS: The executor was successful and proposed action updated state. + - PROPOSAL_EXECUTOR_RESULT_FAILURE: The executor returned an error and proposed action didn't update state. + cosmos.group.v1.ProposalStatus: + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_SUBMITTED + - PROPOSAL_STATUS_ACCEPTED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_ABORTED + - PROPOSAL_STATUS_WITHDRAWN + default: PROPOSAL_STATUS_UNSPECIFIED + description: |- + ProposalStatus defines proposal statuses. + + - PROPOSAL_STATUS_UNSPECIFIED: An empty value is invalid and not allowed. + - PROPOSAL_STATUS_SUBMITTED: Initial status of a proposal when submitted. + - PROPOSAL_STATUS_ACCEPTED: Final status of a proposal when the final tally is done and the outcome + passes the group policy's decision policy. + - PROPOSAL_STATUS_REJECTED: Final status of a proposal when the final tally is done and the outcome + is rejected by the group policy's decision policy. + - PROPOSAL_STATUS_ABORTED: Final status of a proposal when the group policy is modified before the + final tally. + - PROPOSAL_STATUS_WITHDRAWN: A proposal can be withdrawn before the voting start time by the owner. + When this happens the final status is Withdrawn. + cosmos.group.v1.QueryGroupInfoResponse: + type: object + properties: + info: + description: info is the GroupInfo for the group. + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group's admin. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the group. + version: + type: string + format: uint64 + title: >- + version is used to track changes to a group's membership structure + that + + would break existing proposals. Whenever any members weight is + changed, + + or any member is added or removed this version is incremented and + will + + cause proposals based on older versions of this group to fail + total_weight: + type: string + description: total_weight is the sum of the group members' weights. + created_at: + type: string + format: date-time + description: created_at is a timestamp specifying when a group was created. + description: QueryGroupInfoResponse is the Query/GroupInfo response type. + cosmos.group.v1.QueryGroupMembersResponse: + type: object + properties: + members: + type: array + items: + type: object + properties: + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + member: + description: member is the member data. + type: object + properties: + address: + type: string + description: address is the member's account address. + weight: + type: string + description: >- + weight is the member's voting weight that should be greater + than 0. + metadata: + type: string + description: metadata is any arbitrary metadata attached to the member. + added_at: + type: string + format: date-time + description: added_at is a timestamp specifying when a member was added. + description: >- + GroupMember represents the relationship between a group and a + member. + description: members are the members of the group with given group_id. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: QueryGroupMembersResponse is the Query/GroupMembersResponse response type. + cosmos.group.v1.QueryGroupPoliciesByAdminResponse: + type: object + properties: + group_policies: + type: array + items: + type: object + properties: + address: + type: string + description: address is the account address of group policy. + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group admin. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the group + policy. + version: + type: string + format: uint64 + description: >- + version is used to track changes to a group's GroupPolicyInfo + structure that + + would create a different result on a running proposal. + decision_policy: + 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" + } + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group policy was + created. + description: >- + GroupPolicyInfo represents the high-level on-chain information for a + group policy. + description: group_policies are the group policies info with provided admin. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QueryGroupPoliciesByAdminResponse is the Query/GroupPoliciesByAdmin + response type. + cosmos.group.v1.QueryGroupPoliciesByGroupResponse: + type: object + properties: + group_policies: + type: array + items: + type: object + properties: + address: + type: string + description: address is the account address of group policy. + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group admin. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the group + policy. + version: + type: string + format: uint64 + description: >- + version is used to track changes to a group's GroupPolicyInfo + structure that + + would create a different result on a running proposal. + decision_policy: + 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" + } + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group policy was + created. + description: >- + GroupPolicyInfo represents the high-level on-chain information for a + group policy. + description: >- + group_policies are the group policies info associated with the + provided group. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QueryGroupPoliciesByGroupResponse is the Query/GroupPoliciesByGroup + response type. + cosmos.group.v1.QueryGroupPolicyInfoResponse: + type: object + properties: + info: + type: object + properties: + address: + type: string + description: address is the account address of group policy. + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group admin. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the group + policy. + version: + type: string + format: uint64 + description: >- + version is used to track changes to a group's GroupPolicyInfo + structure that + + would create a different result on a running proposal. + decision_policy: + 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" + } + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group policy was + created. + description: >- + GroupPolicyInfo represents the high-level on-chain information for a + group policy. + description: QueryGroupPolicyInfoResponse is the Query/GroupPolicyInfo response type. + cosmos.group.v1.QueryGroupsByAdminResponse: + type: object + properties: + groups: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group's admin. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the group. + version: + type: string + format: uint64 + title: >- + version is used to track changes to a group's membership + structure that + + would break existing proposals. Whenever any members weight is + changed, + + or any member is added or removed this version is incremented + and will + + cause proposals based on older versions of this group to fail + total_weight: + type: string + description: total_weight is the sum of the group members' weights. + created_at: + type: string + format: date-time + description: created_at is a timestamp specifying when a group was created. + description: >- + GroupInfo represents the high-level on-chain information for a + group. + description: groups are the groups info with the provided admin. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QueryGroupsByAdminResponse is the Query/GroupsByAdminResponse response + type. + cosmos.group.v1.QueryGroupsByMemberResponse: + type: object + properties: + groups: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group's admin. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the group. + version: + type: string + format: uint64 + title: >- + version is used to track changes to a group's membership + structure that + + would break existing proposals. Whenever any members weight is + changed, + + or any member is added or removed this version is incremented + and will + + cause proposals based on older versions of this group to fail + total_weight: + type: string + description: total_weight is the sum of the group members' weights. + created_at: + type: string + format: date-time + description: created_at is a timestamp specifying when a group was created. + description: >- + GroupInfo represents the high-level on-chain information for a + group. + description: groups are the groups info with the provided group member. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: QueryGroupsByMemberResponse is the Query/GroupsByMember response type. + cosmos.group.v1.QueryProposalResponse: + type: object + properties: + proposal: + description: proposal is the proposal info. + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique id of the proposal. + group_policy_address: + type: string + description: group_policy_address is the account address of group policy. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the proposal. + proposers: + type: array + items: + type: string + description: proposers are the account addresses of the proposers. + submit_time: + type: string + format: date-time + description: >- + submit_time is a timestamp specifying when a proposal was + submitted. + group_version: + type: string + format: uint64 + description: >- + group_version tracks the version of the group at proposal + submission. + + This field is here for informational purposes only. + group_policy_version: + type: string + format: uint64 + description: >- + group_policy_version tracks the version of the group policy at + proposal submission. + + When a decision policy is changed, existing proposals from + previous policy + + versions will become invalid with the `ABORTED` status. + + This field is here for informational purposes only. + status: + description: >- + status represents the high level position in the life cycle of the + proposal. Initial value is Submitted. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_SUBMITTED + - PROPOSAL_STATUS_ACCEPTED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_ABORTED + - PROPOSAL_STATUS_WITHDRAWN + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: >- + final_tally_result contains the sums of all weighted votes for + this + + proposal for each vote option. It is empty at submission, and only + + populated after tallying, at voting period end or at proposal + execution, + + whichever happens first. + type: object + properties: + yes_count: + type: string + description: yes_count is the weighted sum of yes votes. + abstain_count: + type: string + description: abstain_count is the weighted sum of abstainers. + no_count: + type: string + description: no_count is the weighted sum of no votes. + no_with_veto_count: + type: string + description: no_with_veto_count is the weighted sum of veto. + voting_period_end: + type: string + format: date-time + description: >- + voting_period_end is the timestamp before which voting must be + done. + + Unless a successfull MsgExec is called before (to execute a + proposal whose + + tally is successful before the voting period ends), tallying will + be done + + at this point, and the `final_tally_result`and `status` fields + will be + + accordingly updated. + executor_result: + description: >- + executor_result is the final result of the proposal execution. + Initial value is NotRun. + type: string + enum: + - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + - PROPOSAL_EXECUTOR_RESULT_NOT_RUN + - PROPOSAL_EXECUTOR_RESULT_SUCCESS + - PROPOSAL_EXECUTOR_RESULT_FAILURE + default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + 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 `sdk.Msg`s that will be executed if the + proposal passes. + description: QueryProposalResponse is the Query/Proposal response type. + cosmos.group.v1.QueryProposalsByGroupPolicyResponse: + type: object + properties: + proposals: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique id of the proposal. + group_policy_address: + type: string + description: group_policy_address is the account address of group policy. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the proposal. + proposers: + type: array + items: + type: string + description: proposers are the account addresses of the proposers. + submit_time: + type: string + format: date-time + description: >- + submit_time is a timestamp specifying when a proposal was + submitted. + group_version: + type: string + format: uint64 + description: >- + group_version tracks the version of the group at proposal + submission. + + This field is here for informational purposes only. + group_policy_version: + type: string + format: uint64 + description: >- + group_policy_version tracks the version of the group policy at + proposal submission. + + When a decision policy is changed, existing proposals from + previous policy + + versions will become invalid with the `ABORTED` status. + + This field is here for informational purposes only. + status: + description: >- + status represents the high level position in the life cycle of + the proposal. Initial value is Submitted. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_SUBMITTED + - PROPOSAL_STATUS_ACCEPTED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_ABORTED + - PROPOSAL_STATUS_WITHDRAWN + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: >- + final_tally_result contains the sums of all weighted votes for + this + + proposal for each vote option. It is empty at submission, and + only + + populated after tallying, at voting period end or at proposal + execution, + + whichever happens first. + type: object + properties: + yes_count: + type: string + description: yes_count is the weighted sum of yes votes. + abstain_count: + type: string + description: abstain_count is the weighted sum of abstainers. + no_count: + type: string + description: no_count is the weighted sum of no votes. + no_with_veto_count: + type: string + description: no_with_veto_count is the weighted sum of veto. + voting_period_end: + type: string + format: date-time + description: >- + voting_period_end is the timestamp before which voting must be + done. + + Unless a successfull MsgExec is called before (to execute a + proposal whose + + tally is successful before the voting period ends), tallying + will be done + + at this point, and the `final_tally_result`and `status` fields + will be + + accordingly updated. + executor_result: + description: >- + executor_result is the final result of the proposal execution. + Initial value is NotRun. + type: string + enum: + - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + - PROPOSAL_EXECUTOR_RESULT_NOT_RUN + - PROPOSAL_EXECUTOR_RESULT_SUCCESS + - PROPOSAL_EXECUTOR_RESULT_FAILURE + default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + 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 `sdk.Msg`s that will be executed if the + proposal passes. + description: >- + Proposal defines a group proposal. Any member of a group can submit + a proposal + + for a group policy to decide upon. + + A proposal consists of a set of `sdk.Msg`s that will be executed if + the proposal + + passes as well as some optional metadata associated with the + proposal. + description: proposals are the proposals with given group policy. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QueryProposalsByGroupPolicyResponse is the Query/ProposalByGroupPolicy + response type. + cosmos.group.v1.QueryTallyResultResponse: + type: object + properties: + tally: + description: tally defines the requested tally. + type: object + properties: + yes_count: + type: string + description: yes_count is the weighted sum of yes votes. + abstain_count: + type: string + description: abstain_count is the weighted sum of abstainers. + no_count: + type: string + description: no_count is the weighted sum of no votes. + no_with_veto_count: + type: string + description: no_with_veto_count is the weighted sum of veto. + description: QueryTallyResultResponse is the Query/TallyResult response type. + cosmos.group.v1.QueryVoteByProposalVoterResponse: + type: object + properties: + vote: + description: vote is the vote with given proposal_id and voter. + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal is the unique ID of the proposal. + voter: + type: string + description: voter is the account address of the voter. + option: + description: option is the voter's choice on the proposal. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the vote. + submit_time: + type: string + format: date-time + description: submit_time is the timestamp when the vote was submitted. + description: >- + QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter response + type. + cosmos.group.v1.QueryVotesByProposalResponse: + type: object + properties: + votes: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal is the unique ID of the proposal. + voter: + type: string + description: voter is the account address of the voter. + option: + description: option is the voter's choice on the proposal. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the vote. + submit_time: + type: string + format: date-time + description: submit_time is the timestamp when the vote was submitted. + description: Vote represents a vote for a proposal. + description: votes are the list of votes for given proposal_id. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: QueryVotesByProposalResponse is the Query/VotesByProposal response type. + cosmos.group.v1.QueryVotesByVoterResponse: + type: object + properties: + votes: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal is the unique ID of the proposal. + voter: + type: string + description: voter is the account address of the voter. + option: + description: option is the voter's choice on the proposal. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the vote. + submit_time: + type: string + format: date-time + description: submit_time is the timestamp when the vote was submitted. + description: Vote represents a vote for a proposal. + description: votes are the list of votes by given voter. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: QueryVotesByVoterResponse is the Query/VotesByVoter response type. + cosmos.group.v1.TallyResult: + type: object + properties: + yes_count: + type: string + description: yes_count is the weighted sum of yes votes. + abstain_count: + type: string + description: abstain_count is the weighted sum of abstainers. + no_count: + type: string + description: no_count is the weighted sum of no votes. + no_with_veto_count: + type: string + description: no_with_veto_count is the weighted sum of veto. + description: TallyResult represents the sum of weighted votes for each vote option. + cosmos.group.v1.Vote: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal is the unique ID of the proposal. + voter: + type: string + description: voter is the account address of the voter. + option: + description: option is the voter's choice on the proposal. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the vote. + submit_time: + type: string + format: date-time + description: submit_time is the timestamp when the vote was submitted. + description: Vote represents a vote for a proposal. + cosmos.group.v1.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 proposal. + + - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines an unspecified vote option which will + return an error. + - 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. diff --git a/client/docs/ibc-go-swagger.yml b/client/docs/ibc-go-swagger.yml index 084926dc..c750fda6 100644 --- a/client/docs/ibc-go-swagger.yml +++ b/client/docs/ibc-go-swagger.yml @@ -143,9 +143,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -229,6 +230,17 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean tags: - Query '/ibc/apps/transfer/v1/denom_traces/{hash}': @@ -502,32 +514,25 @@ paths: format: byte tags: - Query - /ibc/client/v1/params: + '/ibc/apps/fee/v1/channels/{channel_id}/ports/{port_id}/fee_enabled': get: - summary: ClientParams queries all parameters of the ibc client. - operationId: ClientParams + summary: >- + FeeEnabledChannel returns true if the provided port and channel + identifiers belong to a fee enabled channel + operationId: FeeEnabledChannel responses: '200': description: A successful response. schema: 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 - - method. + fee_enabled: + type: boolean + format: boolean + title: boolean flag representing the fee enabled channel status + title: >- + QueryFeeEnabledChannelResponse defines the response type for the + FeeEnabledChannel rpc default: description: An unexpected error response schema: @@ -717,6 +722,2557 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + parameters: + - name: channel_id + description: unique channel identifier + in: path + required: true + type: string + - name: port_id + description: unique port identifier + in: path + required: true + type: string + tags: + - Query + '/ibc/apps/fee/v1/channels/{channel_id}/ports/{port_id}/incentivized_packets': + get: + summary: Gets all incentivized packets for a specific channel + operationId: IncentivizedPacketsForChannel + responses: + '200': + description: A successful response. + schema: + type: object + properties: + incentivized_packets: + type: array + items: + type: object + properties: + packet_id: + title: >- + unique packet identifier comprised of the channel ID, + port ID and sequence + type: object + properties: + port_id: + type: string + title: channel port identifier + channel_id: + type: string + title: channel unique identifier + sequence: + type: string + format: uint64 + title: packet sequence + packet_fees: + type: array + items: + type: object + properties: + fee: + title: >- + fee encapsulates the recv, ack and timeout fees + associated with an IBC packet + type: object + properties: + recv_fee: + 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: the packet receive fee + ack_fee: + 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: the packet acknowledgement fee + timeout_fee: + 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: the packet timeout fee + refund_address: + type: string + title: the refund address for unspent fees + relayers: + type: array + items: + type: string + title: >- + optional list of relayers permitted to receive + fees + title: >- + PacketFee contains ICS29 relayer fees, refund address + and optional list of permitted relayers + title: list of packet fees + title: >- + IdentifiedPacketFees contains a list of type PacketFee and + associated PacketId + title: Map of all incentivized_packets + title: >- + QueryIncentivizedPacketsResponse defines the response type for the + incentivized packets RPC + 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: channel_id + in: path + required: true + type: string + - name: port_id + in: path + required: true + type: string + - 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 if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean + - name: query_height + description: Height to query at. + in: query + required: false + type: string + format: uint64 + tags: + - Query + '/ibc/apps/fee/v1/channels/{channel_id}/relayers/{relayer}/counterparty_payee': + get: + summary: >- + CounterpartyPayee returns the registered counterparty payee for forward + relaying + operationId: CounterpartyPayee + responses: + '200': + description: A successful response. + schema: + type: object + properties: + counterparty_payee: + type: string + title: >- + the counterparty payee address used to compensate forward + relaying + title: >- + QueryCounterpartyPayeeResponse defines the response type for the + CounterpartyPayee rpc + 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: channel_id + description: unique channel identifier + in: path + required: true + type: string + - name: relayer + description: the relayer address to which the counterparty is registered + in: path + required: true + type: string + tags: + - Query + '/ibc/apps/fee/v1/channels/{channel_id}/relayers/{relayer}/payee': + get: + summary: >- + Payee returns the registered payee address for a specific channel given + the relayer address + operationId: Payee + responses: + '200': + description: A successful response. + schema: + type: object + properties: + payee_address: + type: string + title: the payee address to which packet fees are paid out + title: QueryPayeeResponse defines the response type for the Payee rpc + 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: channel_id + description: unique channel identifier + in: path + required: true + type: string + - name: relayer + description: the relayer address to which the distribution address is registered + in: path + required: true + type: string + tags: + - Query + '/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/sequences/{packet_id.sequence}/incentivized_packet': + get: + summary: >- + IncentivizedPacket returns all packet fees for a packet given its + identifier + operationId: IncentivizedPacket + responses: + '200': + description: A successful response. + schema: + type: object + properties: + incentivized_packet: + type: object + properties: + packet_id: + title: >- + unique packet identifier comprised of the channel ID, port + ID and sequence + type: object + properties: + port_id: + type: string + title: channel port identifier + channel_id: + type: string + title: channel unique identifier + sequence: + type: string + format: uint64 + title: packet sequence + packet_fees: + type: array + items: + type: object + properties: + fee: + title: >- + fee encapsulates the recv, ack and timeout fees + associated with an IBC packet + type: object + properties: + recv_fee: + 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: the packet receive fee + ack_fee: + 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: the packet acknowledgement fee + timeout_fee: + 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: the packet timeout fee + refund_address: + type: string + title: the refund address for unspent fees + relayers: + type: array + items: + type: string + title: optional list of relayers permitted to receive fees + title: >- + PacketFee contains ICS29 relayer fees, refund address + and optional list of permitted relayers + title: list of packet fees + title: >- + IdentifiedPacketFees contains a list of type PacketFee and + associated PacketId + title: >- + QueryIncentivizedPacketsResponse defines the response type for the + IncentivizedPacket rpc + 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: packet_id.channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: packet_id.port_id + description: channel port identifier + in: path + required: true + type: string + - name: packet_id.sequence + description: packet sequence + in: path + required: true + type: string + format: uint64 + - name: query_height + description: block height at which to query. + in: query + required: false + type: string + format: uint64 + tags: + - Query + '/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/sequences/{packet_id.sequence}/total_ack_fees': + get: + summary: >- + TotalAckFees returns the total acknowledgement fees for a packet given + its identifier + operationId: TotalAckFees + responses: + '200': + description: A successful response. + schema: + type: object + properties: + ack_fees: + 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: the total packet acknowledgement fees + title: >- + QueryTotalAckFeesResponse defines the response type for the + TotalAckFees rpc + 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: packet_id.channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: packet_id.port_id + description: channel port identifier + in: path + required: true + type: string + - name: packet_id.sequence + description: packet sequence + in: path + required: true + type: string + format: uint64 + tags: + - Query + '/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/sequences/{packet_id.sequence}/total_recv_fees': + get: + summary: >- + TotalRecvFees returns the total receive fees for a packet given its + identifier + operationId: TotalRecvFees + responses: + '200': + description: A successful response. + schema: + type: object + properties: + recv_fees: + 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: the total packet receive fees + title: >- + QueryTotalRecvFeesResponse defines the response type for the + TotalRecvFees rpc + 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: packet_id.channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: packet_id.port_id + description: channel port identifier + in: path + required: true + type: string + - name: packet_id.sequence + description: packet sequence + in: path + required: true + type: string + format: uint64 + tags: + - Query + '/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/sequences/{packet_id.sequence}/total_timeout_fees': + get: + summary: >- + TotalTimeoutFees returns the total timeout fees for a packet given its + identifier + operationId: TotalTimeoutFees + responses: + '200': + description: A successful response. + schema: + type: object + properties: + timeout_fees: + 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: the total packet timeout fees + title: >- + QueryTotalTimeoutFeesResponse defines the response type for the + TotalTimeoutFees rpc + 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: packet_id.channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: packet_id.port_id + description: channel port identifier + in: path + required: true + type: string + - name: packet_id.sequence + description: packet sequence + in: path + required: true + type: string + format: uint64 + tags: + - Query + /ibc/apps/fee/v1/fee_enabled: + get: + summary: FeeEnabledChannels returns a list of all fee enabled channels + operationId: FeeEnabledChannels + responses: + '200': + description: A successful response. + schema: + type: object + properties: + fee_enabled_channels: + type: array + items: + type: object + properties: + port_id: + type: string + title: unique port identifier + channel_id: + type: string + title: unique channel identifier + title: >- + FeeEnabledChannel contains the PortID & ChannelID for a fee + enabled channel + title: list of fee enabled channels + title: >- + QueryFeeEnabledChannelsResponse defines the response type for the + FeeEnabledChannels rpc + 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: 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 if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean + - name: query_height + description: block height at which to query. + in: query + required: false + type: string + format: uint64 + tags: + - Query + /ibc/apps/fee/v1/incentivized_packets: + get: + summary: >- + IncentivizedPackets returns all incentivized packets and their + associated fees + operationId: IncentivizedPackets + responses: + '200': + description: A successful response. + schema: + type: object + properties: + incentivized_packets: + type: array + items: + type: object + properties: + packet_id: + title: >- + unique packet identifier comprised of the channel ID, + port ID and sequence + type: object + properties: + port_id: + type: string + title: channel port identifier + channel_id: + type: string + title: channel unique identifier + sequence: + type: string + format: uint64 + title: packet sequence + packet_fees: + type: array + items: + type: object + properties: + fee: + title: >- + fee encapsulates the recv, ack and timeout fees + associated with an IBC packet + type: object + properties: + recv_fee: + 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: the packet receive fee + ack_fee: + 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: the packet acknowledgement fee + timeout_fee: + 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: the packet timeout fee + refund_address: + type: string + title: the refund address for unspent fees + relayers: + type: array + items: + type: string + title: >- + optional list of relayers permitted to receive + fees + title: >- + PacketFee contains ICS29 relayer fees, refund address + and optional list of permitted relayers + title: list of packet fees + title: >- + IdentifiedPacketFees contains a list of type PacketFee and + associated PacketId + title: list of identified fees for incentivized packets + title: >- + QueryIncentivizedPacketsResponse defines the response type for the + IncentivizedPackets rpc + 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: 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 if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean + - name: query_height + description: block height at which to query. + in: query + required: false + type: string + format: uint64 tags: - Query /ibc/core/client/v1/client_states: @@ -738,6 +3294,7 @@ paths: type: string title: client identifier client_state: + title: client state type: object properties: type_url: @@ -914,7 +3471,6 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: client state description: >- IdentifiedClientState defines a client state with an additional client @@ -928,9 +3484,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -1191,6 +3748,17 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean tags: - Query '/ibc/core/client/v1/client_states/{client_id}': @@ -2064,9 +4632,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -2330,6 +4899,17 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean tags: - Query '/ibc/core/client/v1/consensus_states/{client_id}/heights': @@ -2389,9 +4969,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -2655,6 +5236,17 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean tags: - Query '/ibc/core/client/v1/consensus_states/{client_id}/revision/{revision_number}/height/{revision_height}': @@ -3108,6 +5700,223 @@ paths: format: boolean tags: - Query + /ibc/core/client/v1/params: + get: + summary: ClientParams queries all parameters of the ibc client submodule. + operationId: ClientParams + responses: + '200': + description: A successful response. + schema: + 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 + + 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 + + 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" + } + tags: + - Query /ibc/core/client/v1/upgraded_client_states: get: summary: UpgradedClientState queries an Upgraded IBC light client. @@ -4214,9 +7023,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -4506,6 +7316,17 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean tags: - Query '/ibc/core/connection/v1/connections/{connection_id}': @@ -5712,6 +8533,229 @@ paths: format: uint64 tags: - Query + /ibc/core/connection/v1/params: + get: + summary: ConnectionParams queries all parameters of the ibc connection submodule. + operationId: ConnectionParams + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + max_expected_time_per_block: + type: string + format: uint64 + description: >- + maximum expected time per block (in nanoseconds), used to + enforce block delay. This parameter should reflect the + + largest amount of time that the chain might reasonably + take to produce the next block under normal operating + + conditions. A safe choice is 3-5x the expected time per + block. + description: >- + QueryConnectionParamsResponse is the response type for the + Query/ConnectionParams 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 + + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(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 /ibc/core/channel/v1/channels: get: summary: Channels queries all the IBC channels of a chain. @@ -5809,9 +8853,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -6099,6 +9144,17 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean tags: - Query '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}': @@ -7609,9 +10665,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -7909,6 +10966,17 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean - name: packet_commitment_sequences description: list of packet sequences. in: query @@ -8230,9 +11298,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -8530,6 +11599,17 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean tags: - Query '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_ack_sequences}/unreceived_acks': @@ -9689,9 +12769,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -9984,6 +13065,17 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean tags: - Query definitions: @@ -10025,6 +13117,15 @@ definitions: key is set. + reverse: + type: boolean + format: boolean + description: >- + reverse is set to true if results are to be returned in the descending + order. + + + Since: cosmos-sdk 0.43 description: |- message SomeRequest { Foo some_parameter = 1; @@ -10039,9 +13140,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -10495,9 +13597,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -10610,6 +13713,709 @@ definitions: allow_messages defines a list of sdk message typeURLs allowed to be executed on a host chain. description: QueryParamsResponse is the response type for the Query/Params RPC method. + cosmos.base.v1beta1.Coin: + 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. + ibc.applications.fee.v1.Fee: + type: object + properties: + recv_fee: + 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: the packet receive fee + ack_fee: + 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: the packet acknowledgement fee + timeout_fee: + 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: the packet timeout fee + title: 'Fee defines the ICS29 receive, acknowledgement and timeout fees' + ibc.applications.fee.v1.FeeEnabledChannel: + type: object + properties: + port_id: + type: string + title: unique port identifier + channel_id: + type: string + title: unique channel identifier + title: >- + FeeEnabledChannel contains the PortID & ChannelID for a fee enabled + channel + ibc.applications.fee.v1.IdentifiedPacketFees: + type: object + properties: + packet_id: + title: >- + unique packet identifier comprised of the channel ID, port ID and + sequence + type: object + properties: + port_id: + type: string + title: channel port identifier + channel_id: + type: string + title: channel unique identifier + sequence: + type: string + format: uint64 + title: packet sequence + packet_fees: + type: array + items: + type: object + properties: + fee: + title: >- + fee encapsulates the recv, ack and timeout fees associated with + an IBC packet + type: object + properties: + recv_fee: + 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: the packet receive fee + ack_fee: + 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: the packet acknowledgement fee + timeout_fee: + 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: the packet timeout fee + refund_address: + type: string + title: the refund address for unspent fees + relayers: + type: array + items: + type: string + title: optional list of relayers permitted to receive fees + title: >- + PacketFee contains ICS29 relayer fees, refund address and optional + list of permitted relayers + title: list of packet fees + title: >- + IdentifiedPacketFees contains a list of type PacketFee and associated + PacketId + ibc.applications.fee.v1.PacketFee: + type: object + properties: + fee: + title: >- + fee encapsulates the recv, ack and timeout fees associated with an IBC + packet + type: object + properties: + recv_fee: + 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: the packet receive fee + ack_fee: + 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: the packet acknowledgement fee + timeout_fee: + 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: the packet timeout fee + refund_address: + type: string + title: the refund address for unspent fees + relayers: + type: array + items: + type: string + title: optional list of relayers permitted to receive fees + title: >- + PacketFee contains ICS29 relayer fees, refund address and optional list of + permitted relayers + ibc.applications.fee.v1.QueryCounterpartyPayeeResponse: + type: object + properties: + counterparty_payee: + type: string + title: the counterparty payee address used to compensate forward relaying + title: >- + QueryCounterpartyPayeeResponse defines the response type for the + CounterpartyPayee rpc + ibc.applications.fee.v1.QueryFeeEnabledChannelResponse: + type: object + properties: + fee_enabled: + type: boolean + format: boolean + title: boolean flag representing the fee enabled channel status + title: >- + QueryFeeEnabledChannelResponse defines the response type for the + FeeEnabledChannel rpc + ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse: + type: object + properties: + fee_enabled_channels: + type: array + items: + type: object + properties: + port_id: + type: string + title: unique port identifier + channel_id: + type: string + title: unique channel identifier + title: >- + FeeEnabledChannel contains the PortID & ChannelID for a fee enabled + channel + title: list of fee enabled channels + title: >- + QueryFeeEnabledChannelsResponse defines the response type for the + FeeEnabledChannels rpc + ibc.applications.fee.v1.QueryIncentivizedPacketResponse: + type: object + properties: + incentivized_packet: + type: object + properties: + packet_id: + title: >- + unique packet identifier comprised of the channel ID, port ID and + sequence + type: object + properties: + port_id: + type: string + title: channel port identifier + channel_id: + type: string + title: channel unique identifier + sequence: + type: string + format: uint64 + title: packet sequence + packet_fees: + type: array + items: + type: object + properties: + fee: + title: >- + fee encapsulates the recv, ack and timeout fees associated + with an IBC packet + type: object + properties: + recv_fee: + 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: the packet receive fee + ack_fee: + 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: the packet acknowledgement fee + timeout_fee: + 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: the packet timeout fee + refund_address: + type: string + title: the refund address for unspent fees + relayers: + type: array + items: + type: string + title: optional list of relayers permitted to receive fees + title: >- + PacketFee contains ICS29 relayer fees, refund address and + optional list of permitted relayers + title: list of packet fees + title: >- + IdentifiedPacketFees contains a list of type PacketFee and associated + PacketId + title: >- + QueryIncentivizedPacketsResponse defines the response type for the + IncentivizedPacket rpc + ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse: + type: object + properties: + incentivized_packets: + type: array + items: + type: object + properties: + packet_id: + title: >- + unique packet identifier comprised of the channel ID, port ID + and sequence + type: object + properties: + port_id: + type: string + title: channel port identifier + channel_id: + type: string + title: channel unique identifier + sequence: + type: string + format: uint64 + title: packet sequence + packet_fees: + type: array + items: + type: object + properties: + fee: + title: >- + fee encapsulates the recv, ack and timeout fees associated + with an IBC packet + type: object + properties: + recv_fee: + 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: the packet receive fee + ack_fee: + 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: the packet acknowledgement fee + timeout_fee: + 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: the packet timeout fee + refund_address: + type: string + title: the refund address for unspent fees + relayers: + type: array + items: + type: string + title: optional list of relayers permitted to receive fees + title: >- + PacketFee contains ICS29 relayer fees, refund address and + optional list of permitted relayers + title: list of packet fees + title: >- + IdentifiedPacketFees contains a list of type PacketFee and + associated PacketId + title: Map of all incentivized_packets + title: >- + QueryIncentivizedPacketsResponse defines the response type for the + incentivized packets RPC + ibc.applications.fee.v1.QueryIncentivizedPacketsResponse: + type: object + properties: + incentivized_packets: + type: array + items: + type: object + properties: + packet_id: + title: >- + unique packet identifier comprised of the channel ID, port ID + and sequence + type: object + properties: + port_id: + type: string + title: channel port identifier + channel_id: + type: string + title: channel unique identifier + sequence: + type: string + format: uint64 + title: packet sequence + packet_fees: + type: array + items: + type: object + properties: + fee: + title: >- + fee encapsulates the recv, ack and timeout fees associated + with an IBC packet + type: object + properties: + recv_fee: + 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: the packet receive fee + ack_fee: + 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: the packet acknowledgement fee + timeout_fee: + 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: the packet timeout fee + refund_address: + type: string + title: the refund address for unspent fees + relayers: + type: array + items: + type: string + title: optional list of relayers permitted to receive fees + title: >- + PacketFee contains ICS29 relayer fees, refund address and + optional list of permitted relayers + title: list of packet fees + title: >- + IdentifiedPacketFees contains a list of type PacketFee and + associated PacketId + title: list of identified fees for incentivized packets + title: >- + QueryIncentivizedPacketsResponse defines the response type for the + IncentivizedPackets rpc + ibc.applications.fee.v1.QueryPayeeResponse: + type: object + properties: + payee_address: + type: string + title: the payee address to which packet fees are paid out + title: QueryPayeeResponse defines the response type for the Payee rpc + ibc.applications.fee.v1.QueryTotalAckFeesResponse: + type: object + properties: + ack_fees: + 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: the total packet acknowledgement fees + title: >- + QueryTotalAckFeesResponse defines the response type for the TotalAckFees + rpc + ibc.applications.fee.v1.QueryTotalRecvFeesResponse: + type: object + properties: + recv_fees: + 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: the total packet receive fees + title: >- + QueryTotalRecvFeesResponse defines the response type for the TotalRecvFees + rpc + ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse: + type: object + properties: + timeout_fees: + 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: the total packet timeout fees + title: >- + QueryTotalTimeoutFeesResponse defines the response type for the + TotalTimeoutFees rpc + ibc.core.channel.v1.PacketId: + type: object + properties: + port_id: + type: string + title: channel port identifier + channel_id: + type: string + title: channel unique identifier + sequence: + type: string + format: uint64 + title: packet sequence + title: |- + PacketId is an identifer for a unique Packet + Source chains refer to packets by source port/channel + Destination chains refer to packets by destination port/channel ibc.core.client.v1.ConsensusStateWithHeight: type: object properties: @@ -10838,6 +14644,7 @@ definitions: type: string title: client identifier client_state: + title: client state type: object properties: type_url: @@ -10996,7 +14803,6 @@ definitions: "@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. @@ -11240,6 +15046,7 @@ definitions: type: string title: client identifier client_state: + title: client state type: object properties: type_url: @@ -11408,7 +15215,6 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: client state description: >- IdentifiedClientState defines a client state with an additional client @@ -11422,9 +15228,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -11504,9 +15311,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -11954,9 +15762,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -12517,6 +16326,21 @@ definitions: description: |- IdentifiedConnection defines a connection with additional connection identifier field. + ibc.core.connection.v1.Params: + type: object + properties: + max_expected_time_per_block: + type: string + format: uint64 + description: >- + maximum expected time per block (in nanoseconds), used to enforce + block delay. This parameter should reflect the + + largest amount of time that the chain might reasonably take to produce + the next block under normal operating + + conditions. A safe choice is 3-5x the expected time per block. + description: Params defines the set of Connection parameters. ibc.core.connection.v1.QueryClientConnectionsResponse: type: object properties: @@ -12975,6 +16799,27 @@ definitions: title: |- QueryConnectionConsensusStateResponse is the response type for the Query/ConnectionConsensusState RPC method + ibc.core.connection.v1.QueryConnectionParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + max_expected_time_per_block: + type: string + format: uint64 + description: >- + maximum expected time per block (in nanoseconds), used to enforce + block delay. This parameter should reflect the + + largest amount of time that the chain might reasonably take to + produce the next block under normal operating + + conditions. A safe choice is 3-5x the expected time per block. + description: >- + QueryConnectionParamsResponse is the response type for the + Query/ConnectionParams RPC method. ibc.core.connection.v1.QueryConnectionResponse: type: object properties: @@ -13201,9 +17046,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -14073,9 +17919,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -14208,9 +18055,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -14381,9 +18229,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -14515,9 +18364,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 diff --git a/client/docs/legacy-swagger.yml b/client/docs/legacy-swagger.yml deleted file mode 100644 index 60538ce6..00000000 --- a/client/docs/legacy-swagger.yml +++ /dev/null @@ -1,3480 +0,0 @@ ---- -swagger: "2.0" -info: - version: "3.0" - title: Kava Light Client RPC - description: A REST interface for state queries, transaction generation and broadcasting. -tags: - - name: CDP - description: CDP module APIs - - name: Auction - description: Auction module APIs - - name: BEP3 - description: BEP3 module APIs - - name: Incentive - description: Incentive module APIs - - name: Pricefeed - description: Auction module APIs - - name: Hard - description: Hard module APIs - - name: Swap - description: Swap module APIs - - name: Committee - description: Committee module APIs - - name: Kavadist - description: Kavadist module APIs - - name: Issuance - description: Issuance module APIs - - name: Vesting - description: Validator vesting module APIs -schemes: - - https -host: api.data.kava.io -securityDefinitions: - kms: - type: basic -paths: - /cdp: - post: - deprecated: true - summary: Create a cdp transaction - tags: - - CDP - consumes: - - application/json - produces: - - application/json - parameters: - - description: create cdp post parameters - name: post_cdp_req - in: body - required: true - schema: - type: object - properties: - base_req: - $ref: "#/definitions/LegacyBaseReq" - owner: - $ref: "#/definitions/LegacyAddress" - collateral: - $ref: "#/definitions/LegacyCoinCollateral" - principal: - $ref: "#/definitions/LegacyCoinPrincipal" - collateral_type: - $ref: "#/definitions/LegacyCollateralType" - responses: - 200: - description: Tx was successfully generated - schema: - $ref: "#/definitions/LegacyStdTx" - 400: - description: Invalid request - 500: - description: Server internal error - /cdp/{owner}/{collateral_type}/deposits: - post: - deprecated: true - summary: Create a deposit to cdp transaction - tags: - - CDP - consumes: - - application/json - produces: - - application/json - parameters: - - in: path - name: owner - description: Owner address in bech32 format - required: true - type: string - x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - - in: path - name: collateral_type - description: Collateral type - required: true - type: string - x-example: xrpb-a - - description: deposit cdp post parameters - name: post_deposit_req - in: body - required: true - schema: - type: object - properties: - base_req: - $ref: "#/definitions/LegacyBaseReq" - owner: - $ref: "#/definitions/LegacyAddress" - depositor: - $ref: "#/definitions/LegacyAddress" - collateral: - $ref: "#/definitions/LegacyCoinCollateral" - collateral_type: - $ref: "#/definitions/LegacyCollateralType" - responses: - 200: - description: Tx was successfully generated - schema: - $ref: "#/definitions/LegacyStdTx" - 400: - description: Invalid request - 500: - description: Server internal error - /cdp/{owner}/{collateral_type}/withdraw: - post: - deprecated: true - summary: create a withdraw collateral transaction - tags: - - CDP - consumes: - - application/json - produces: - - application/json - parameters: - - in: path - name: owner - description: Owner address in bech32 format - required: true - type: string - x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - - in: path - name: collateral_type - description: Collateral type - required: true - type: string - x-example: xrpb-a - - description: withdraw cdp post parameters - name: post_withdraw_req - in: body - required: true - schema: - type: object - properties: - base_req: - $ref: "#/definitions/LegacyBaseReq" - owner: - $ref: "#/definitions/LegacyAddress" - depositor: - $ref: "#/definitions/LegacyAddress" - collateral: - $ref: "#/definitions/LegacyCoinCollateral" - collateral_type: - $ref: "#/definitions/LegacyCollateralType" - responses: - 200: - description: Tx was successfully generated - schema: - $ref: "#/definitions/LegacyStdTx" - 400: - description: Invalid request - 500: - description: Server internal error - /cdp/{owner}/{collateral_type}/draw: - post: - deprecated: true - summary: Create a draw debt transaction - tags: - - CDP - consumes: - - application/json - produces: - - application/json - parameters: - - in: path - name: owner - description: Owner address in bech32 format - required: true - type: string - x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - - in: path - name: collateral_type - description: Collateral type - required: true - type: string - x-example: xrpb-a - - description: draw cdp post parameters - name: post_draw_req - in: body - required: true - schema: - type: object - properties: - base_req: - $ref: "#/definitions/LegacyBaseReq" - owner: - $ref: "#/definitions/LegacyAddress" - principal: - $ref: "#/definitions/LegacyCoinPrincipal" - collateral_type: - $ref: "#/definitions/LegacyCollateralType" - responses: - 200: - description: Tx was successfully generated - schema: - $ref: "#/definitions/LegacyStdTx" - 400: - description: Invalid request - 500: - description: Server internal error - /cdp/{owner}/{collateral_type}/repay: - post: - deprecated: true - summary: Repay debt from a CDP - tags: - - CDP - consumes: - - application/json - produces: - - application/json - parameters: - - in: path - name: owner - description: Owner address in bech32 format - required: true - type: string - x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - - in: path - name: collateral_type - description: Collateral type - required: true - type: string - x-example: xrpb-a - - description: repay cdp post parameters - name: post_repay_req - in: body - required: true - schema: - type: object - properties: - base_req: - $ref: "#/definitions/LegacyBaseReq" - owner: - $ref: "#/definitions/LegacyAddress" - payment: - $ref: "#/definitions/LegacyCoinPrincipal" - collateral_type: - $ref: "#/definitions/LegacyCollateralType" - responses: - 200: - description: Tx was successfully generated - schema: - $ref: "#/definitions/LegacyStdTx" - 400: - description: Invalid request - 500: - description: Server internal error - /cdp/{owner}/{collateral_type}/liquidate: - post: - deprecated: true - summary: Attempt to liquidate a CDP whose collateralization ratio is under its liquidaiton ratio - tags: - - CDP - consumes: - - application/json - produces: - - application/json - parameters: - - in: path - name: owner - description: Owner address in bech32 format - required: true - type: string - x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - - in: path - name: collateral_type - description: Collateral type - required: true - type: string - x-example: xrpb-a - - description: liquidate cdp post parameters - name: post_liquidate_req - in: body - required: true - schema: - type: object - properties: - base_req: - $ref: "#/definitions/LegacyBaseReq" - owner: - $ref: "#/definitions/LegacyAddress" - collateral_type: - $ref: "#/definitions/LegacyCollateralType" - responses: - 200: - description: Tx was successfully generated - schema: - $ref: "#/definitions/LegacyStdTx" - 400: - description: Invalid request - 500: - description: Server internal error - /cdp/accounts: - get: - deprecated: true - summary: Get the cdp module accounts - tags: - - CDP - produces: - - application/json - responses: - 200: - description: The cdp module accounts - schema: - type: object - properties: - height: - type: string - example: "100" - result: - type: array - items: - type: object - properties: - account_number: - type: number - address: - $ref: "#/definitions/LegacyAddress" - coins: - type: array - items: - $ref: "#/definitions/LegacyCoin" - name: - type: string - permissions: - type: array - items: - type: string - public_key: - $ref: "#/definitions/LegacyPublicKey" - sequence: - type: number - 500: - description: Server internal error - /cdp/parameters: - get: - deprecated: true - summary: Get the parameters of the cdp module - tags: - - CDP - produces: - - application/json - responses: - 200: - description: The parameters of the cdp module - schema: - type: object - properties: - collateral_params: - type: array - items: - $ref: "#/definitions/LegacyCollateralParam" - debt_params: - type: array - items: - $ref: "#/definitions/LegacyDebtParam" - global_debt_limit: - type: array - items: - $ref: "#/definitions/LegacyCoinCollateral" - surplus_auction_threshold: - type: string - example: "1000000000" - surplus_auction_lot: - type: string - example: "10000000" - debt_auction_threshold: - type: string - example: "1000000000" - savings_distribution_frequency: - type: string - example: "60000000" - circuit_breaker: - type: boolean - example: false - 500: - description: Server internal error - /cdp/cdps/cdp/{owner}/{collateral_type}: - get: - deprecated: true - summary: Get the cdp associated with the input owner address and collateral type - tags: - - CDP - produces: - - application/json - parameters: - - in: path - name: owner - description: Owner address in bech32 format - required: true - type: string - x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - - in: path - name: collateral_type - description: Collateral type - required: true - type: string - x-example: xrpb-a - responses: - 200: - description: CDP associated with owner - schema: - $ref: "#/definitions/LegacyCdpResponse" - 500: - description: Server internal error - /cdp/cdps/collateralType/{collateral_type}: - get: - deprecated: true - summary: Get all cdps with collateral type equal to the input collateral type - tags: - - CDP - produces: - - application/json - parameters: - - in: path - name: collateral_type - description: Collateral Type - required: true - type: string - x-example: xrpb-a - responses: - 200: - description: All CDPs with the input collateral type - schema: - type: object - properties: - height: - type: string - example: "100" - result: - type: array - x-nullable: true - items: - $ref: "#/definitions/LegacyCdpResponse" - 500: - description: Server internal error - /cdp/cdps/ratio/{collateral_type}/{ratio}: - get: - deprecated: true - summary: Get all cdps with collateral type equal to the input collateral type and collateralization ratio strictly less than the input ratio - tags: - - CDP - produces: - - application/json - parameters: - - in: path - name: collateral_type - description: Collateral type - required: true - type: string - x-example: xrpb-a - - in: path - name: ratio - description: Collateralization ratio - required: true - type: string - x-example: "2.0" - responses: - 200: - description: All CDPs with the input collateral type and collateralization ratio less than the input ratio - schema: - type: object - properties: - height: - type: string - example: "100" - result: - type: array - x-nullable: true - items: - $ref: "#/definitions/LegacyCdpResponse" - 500: - description: Server internal error - /cdp/cdps/cdp/deposits/{owner}/{collateral_type}: - get: - deprecated: true - summary: Get the deposits associated with the cdp owned by an address for a collateral type - tags: - - CDP - produces: - - application/json - parameters: - - in: path - name: owner - description: Owner address in bech32 format - required: true - type: string - x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - - in: path - name: collateral_type - description: Collateral type - required: true - type: string - x-example: xrpb-a - responses: - 200: - description: Deposits associated with the cdp - schema: - type: object - properties: - height: - type: string - example: "100" - result: - type: array - items: - $ref: "#/definitions/LegacyCdpDepositResponse" - 500: - description: Server internal error - /cdp/cdps: - get: - deprecated: true - summary: Query all active cdps - tags: - - CDP - produces: - - application/json - parameters: - - in: query - name: owner - description: Owner address in bech32 format - required: false - type: string - x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - - in: query - name: collateral_type - description: Collateral type - required: false - type: string - x-example: xrpb-a - - in: query - name: id - description: CDP ID - required: false - type: string - x-example: "4" - - in: query - name: ratio - description: Collateralization ratio - required: false - type: string - x-example: "2.75" - responses: - 200: - description: Query cdps - schema: - type: object - properties: - height: - type: string - example: "100" - result: - type: array - items: - $ref: "#/definitions/LegacyCdpResponse" - 500: - description: Internal Server Error - /bep3/swap/create: - post: - deprecated: true - summary: Generate a create atomic swap transaction - consumes: - - application/json - produces: - - application/json - tags: - - BEP3 - parameters: - - in: body - name: Create atomic swap request body - schema: - properties: - base_req: - $ref: "#/definitions/LegacyBaseReq" - from: - $ref: "#/definitions/LegacyAddress" - to: - $ref: "#/definitions/LegacyAddress" - recipient_other_chain: - $ref: "#/definitions/LegacyBinanceChainAddress" - sender_other_chain: - $ref: "#/definitions/LegacyBinanceChainAddress2" - random_number_hash: - $ref: "#/definitions/LegacyRandomNumberHash" - timestamp: - $ref: "#/definitions/LegacyTimestamp" - height_span: - $ref: "#/definitions/LegacyHeightSpan" - cross_chain: - $ref: "#/definitions/LegacyCrossChain" - responses: - 200: - description: The transaction was successfully generated - schema: - $ref: "#/definitions/LegacyStdTx" - 400: - description: Invalid request - 500: - description: Internal server error - /bep3/swap/claim: - post: - deprecated: true - summary: Generate a claim atomic swap transaction - consumes: - - application/json - produces: - - application/json - tags: - - BEP3 - parameters: - - in: body - name: Create atomic swap request body - schema: - properties: - base_req: - $ref: "#/definitions/LegacyBaseReq" - from: - $ref: "#/definitions/LegacyAddress" - swap_id: - type: string - example: "3ca20f0152f03b0aabe73e7aa1ddf78b9048ede5a9a73846e1ef53bebbfa4185" - random_number: - type: string - example: "e3d0a98b459f72231da69c3bd771c1e721fef4be83c14b80dc805ba71019eebe" - responses: - 200: - description: The transaction was successfully generated - schema: - $ref: "#/definitions/LegacyStdTx" - 400: - description: Invalid request - 500: - description: Internal server error - /bep3/swap/refund: - post: - deprecated: true - summary: Generate a refund atomic swap transaction - consumes: - - application/json - produces: - - application/json - tags: - - BEP3 - parameters: - - in: body - name: Create atomic swap request body - schema: - properties: - base_req: - $ref: "#/definitions/LegacyBaseReq" - from: - $ref: "#/definitions/LegacyAddress" - swap_id: - type: string - example: "1b00244021ec239867e5b8c44bcd98e40f3148806a8c0a8fd3418872986becba" - responses: - 200: - description: The transaction was successfully generated - schema: - $ref: "#/definitions/LegacyStdTx" - 400: - description: Invalid request - 500: - description: Internal server error - /bep3/swap/{swap-id}: - get: - deprecated: true - summary: Get the atomic swap object associated with the input swap ID - tags: - - BEP3 - produces: - - application/json - parameters: - - in: path - required: true - name: swap-id - description: the swap ID - type: string - x-example: 1b00244021ec239867e5b8c44bcd98e40f3148806a8c0a8fd3418872986becba - responses: - 200: - description: Atomic swap - schema: - type: object - properties: - height: - type: string - example: "548883" - result: - $ref: "#/definitions/LegacyAtomicSwapResponse" - 500: - description: Server internal error - /bep3/swaps: - get: - deprecated: true - summary: Get all atomic swaps - tags: - - BEP3 - produces: - - application/json - responses: - 200: - description: All atomic swaps - schema: - type: object - properties: - height: - type: string - example: "100" - result: - type: array - x-nullable: true - items: - $ref: "#/definitions/LegacyAtomicSwapResponse" - 500: - description: Server internal error - /bep3/supply/{denom}: - get: - deprecated: true - summary: Get the asset supply for the input denom - tags: - - BEP3 - produces: - - application/json - parameters: - - in: path - type: string - required: true - name: denom - x-example: bnb - responses: - 200: - description: Asset supply - schema: - type: object - properties: - height: - type: string - example: "100" - result: - type: object - $ref: "#/definitions/LegacyAssetSupplyResponse" - 500: - description: Server internal error - /bep3/parameters: - get: - deprecated: true - summary: Get the current parameters of the BEP3 module - tags: - - BEP3 - produces: - - application/json - responses: - 200: - description: BEP3 module parameters - schema: - type: object - properties: - height: - type: string - example: "548883" - result: - type: object - $ref: "#/definitions/LegacyBep3ParamsResponse" - 500: - description: Server internal error - /auction/auctions/{id}/bids: - post: - deprecated: true - summary: Generate a place bid transaction - consumes: - - application/json - produces: - - application/json - tags: - - Auction - parameters: - - in: path - name: id - description: Auction id - required: true - type: string - x-example: "1" - - in: body - name: Auction bid request body - schema: - properties: - base_req: - $ref: "#/definitions/LegacyBaseReq" - amount: - $ref: "#/definitions/LegacyCoinBid" - - responses: - 200: - description: The transaction was successfully generated - schema: - $ref: "#/definitions/LegacyStdTx" - 400: - description: Invalid request - 500: - description: Internal server error - /auction/parameters: - get: - deprecated: true - summary: Query auction parameters - produces: - - application/json - tags: - - Auction - responses: - 200: - description: OK - schema: - $ref: "#/definitions/LegacyAuctionParameters" - 500: - description: Internal Server Error - /auction/auctions: - get: - deprecated: true - summary: Query auctions - description: Query all ongoing auctions - produces: - - application/json - tags: - - Auction - responses: - 200: - description: OK - schema: - type: object - properties: - height: - type: string - example: "100" - result: - type: array - items: - $ref: "#/definitions/LegacyAuctionResponse" - 500: - description: Internal Server Error - /auction/auctions/{id}: - get: - deprecated: true - summary: Query auction - description: Query auction by id - produces: - - application/json - tags: - - Auction - parameters: - - in: path - name: id - description: Auction id - required: true - type: string - x-example: "1" - responses: - 200: - description: OK - schema: - $ref: "#/definitions/LegacyAuctionResponse" - 400: - description: invalid auction id - 500: - description: Internal Server Error - /pricefeed/postprice: - post: - deprecated: true - summary: Generate post price transaction - consumes: - - application/json - produces: - - application/json - tags: - - Pricefeed - parameters: - - description: post price request - name: post_price_req - in: body - required: true - schema: - type: object - properties: - base_req: - $ref: "#/definitions/LegacyBaseReq" - market_id: - type: string - example: "xrp:usd" - price: - type: string - example: "0.298464000000000007" - expiry: - type: string - example: "158551630291" - responses: - 200: - description: The transaction was successfully generated - schema: - $ref: "#/definitions/LegacyStdTx" - 400: - description: Invalid request - 500: - description: Internal server error - /pricefeed/parameters: - get: - deprecated: true - summary: Query pricefeed parameters - produces: - - application/json - tags: - - Pricefeed - responses: - 200: - description: OK - schema: - $ref: "#/definitions/LegacyPricefeedParameters" - 500: - description: Internal Server Error - /pricefeed/markets: - get: - deprecated: true - summary: Query markets in the pricefeed - produces: - - application/json - tags: - - Pricefeed - responses: - 200: - description: OK - schema: - type: object - properties: - height: - type: string - example: "100" - result: - type: array - items: - $ref: "#/definitions/LegacyMarket" - 500: - description: Internal Server Error - /pricefeed/oracles/{market_id}: - get: - deprecated: true - summary: Query markets in the pricefeed - produces: - - application/json - tags: - - Pricefeed - parameters: - - in: path - name: market_id - description: the market id of the market - required: true - type: string - x-example: "xrp:usd" - responses: - 200: - description: OK - schema: - type: object - properties: - height: - type: string - example: "100" - result: - type: array - items: - $ref: "#/definitions/LegacyAddress" - 500: - description: Internal Server Error - /pricefeed/rawprices/{market_id}: - get: - deprecated: true - summary: Query markets in the pricefeed - produces: - - application/json - tags: - - Pricefeed - parameters: - - in: path - name: market_id - description: the market id of the market - required: true - type: string - x-example: "xrp:usd" - responses: - 200: - description: OK - schema: - type: object - properties: - height: - type: string - example: "100" - result: - type: array - items: - $ref: "#/definitions/LegacyPostedPrice" - - 500: - description: Internal Server Error - /pricefeed/price/{market_id}: - get: - deprecated: true - summary: Query markets in the pricefeed - produces: - - application/json - tags: - - Pricefeed - parameters: - - in: path - name: market_id - description: the market id of the market - required: true - type: string - x-example: "xrp:usd" - responses: - 200: - description: OK - schema: - $ref: "#/definitions/LegacyPrice" - 500: - description: Internal Server Error - /incentive/claim-cdp: - post: - deprecated: true - summary: Claim USDX incentive rewards from earned from CDPs - tags: - - Incentive - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: Incentive claim CDP body - schema: - properties: - base_req: - $ref: "#/definitions/LegacyBaseReq" - sender: - $ref: "#/definitions/LegacyAddress" - multiplier_name: - type: string - example: "small" - denoms_to_claim: - type: array - items: - type: string - example: "ukava" - responses: - 200: - description: OK - schema: - $ref: "#/definitions/LegacyStdTx" - 400: - description: Invalid request - 500: - description: Internal server error - /incentive/claim-hard: - post: - deprecated: true - summary: Claim Hard supply/borrow rewards - tags: - - Incentive - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: Incentive claim Hard body - schema: - properties: - base_req: - $ref: "#/definitions/LegacyBaseReq" - sender: - $ref: "#/definitions/LegacyAddress" - multiplier_name: - type: string - example: "small" - denoms_to_claim: - type: array - items: - type: string - example: "ukava" - responses: - 200: - description: OK - schema: - $ref: "#/definitions/LegacyStdTx" - 400: - description: Invalid request - 500: - description: Internal server error - /incentive/claim-delegator: - post: - deprecated: true - summary: Claim Kava delegation rewards - tags: - - Incentive - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: Incentive claim delegator body - schema: - properties: - base_req: - $ref: "#/definitions/LegacyBaseReq" - sender: - $ref: "#/definitions/LegacyAddress" - multiplier_name: - type: string - example: "small" - denoms_to_claim: - type: array - items: - type: string - example: "ukava" - responses: - 200: - description: OK - schema: - $ref: "#/definitions/LegacyStdTx" - 400: - description: Invalid request - 500: - description: Internal server error - /incentive/claim-swap: - post: - deprecated: true - summary: Claim Swap liquidity provider rewards - tags: - - Incentive - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: Incentive claim swap body - schema: - properties: - base_req: - $ref: "#/definitions/LegacyBaseReq" - sender: - $ref: "#/definitions/LegacyAddress" - multiplier_name: - type: string - example: "small" - denoms_to_claim: - type: array - items: - type: string - example: "ukava" - responses: - 200: - description: OK - schema: - $ref: "#/definitions/LegacyStdTx" - 400: - description: Invalid request - 500: - description: Internal server error - /incentive/rewards: - get: - deprecated: true - summary: Get earned Incentive rewards - tags: - - Incentive - produces: - - application/json - responses: - 200: - description: Incentive rewards - schema: - type: object - properties: - height: - type: string - example: "100" - result: - type: array - x-nullable: true - items: - $ref: "#/definitions/LegacyRewardResult" - 500: - description: Server internal error - /incentive/parameters: - get: - deprecated: true - summary: Get the current parameters of the incentive module - tags: - - Incentive - produces: - - application/json - responses: - 200: - description: USDX Incentive Claims - schema: - type: object - properties: - height: - type: string - example: "100" - result: - type: array - x-nullable: true - items: - $ref: "#/definitions/LegacyIncentiveParams" - 500: - description: Server internal error - /vesting/circulatingsupply: - get: - deprecated: true - summary: Get the current circulating supply of KAVA - tags: - - Vesting - produces: - - application/json - responses: - 200: - description: KAVA circulating supply - schema: - properties: - height: - type: string - example: "100" - result: - type: string - example: "81443180" - 500: - description: Server internal error - /vesting/totalsupply: - get: - deprecated: true - summary: Get the total supply of KAVA - tags: - - Vesting - produces: - - application/json - responses: - 200: - description: KAVA total supply - schema: - properties: - height: - type: string - example: "100" - result: - type: string - example: "120000000" - 500: - description: Server internal error - /vesting/circulatingsupplyhard: - get: - deprecated: true - summary: Get the current circulating supply of HARD - tags: - - Vesting - produces: - - application/json - responses: - 200: - description: HARD circulating supply - schema: - properties: - height: - type: string - example: "100" - result: - type: string - example: "63750000" - 500: - description: Server internal error - /vesting/totalsupplyhard: - get: - deprecated: true - summary: Get the total supply of HARD - tags: - - Vesting - produces: - - application/json - responses: - 200: - description: HARD total supply - schema: - properties: - height: - type: string - example: "100" - result: - type: string - example: "200000000" - 500: - description: Server internal error - /vesting/circulatingsupplyswp: - get: - deprecated: true - summary: Get the current circulating supply of SWP - tags: - - Vesting - produces: - - application/json - responses: - 200: - description: SWP circulating supply - schema: - properties: - height: - type: string - example: "100" - result: - type: string - example: "63750000" - 500: - description: Server internal error - /vesting/circulatingsupplyusdx: - get: - deprecated: true - summary: Get the current circulating supply of USDX - tags: - - Vesting - produces: - - application/json - responses: - 200: - description: USDX circulating supply - schema: - properties: - height: - type: string - example: "100" - result: - type: string - example: "63750000" - 500: - description: Server internal error - /vesting/totalsupplyusdx: - get: - deprecated: true - summary: Get the total supply of USDX - tags: - - Vesting - produces: - - application/json - responses: - 200: - description: USDX total supply - schema: - properties: - height: - type: string - example: "100" - result: - type: string - example: "200000000" - 500: - description: Server internal error - /committee/committees/{committee-id}/proposals: - post: - deprecated: true - summary: Create a new proposal for a committee - tags: - - Committee - consumes: - - application/json - produces: - - application/json - parameters: - - in: path - name: committee-id - required: true - type: string - x-example: 1 - - in: body - name: proposal request body - schema: - properties: - base_req: - $ref: "#/definitions/LegacyBaseReq" - pub_proposal: - $ref: "#/definitions/LegacyPubProposal" - proposer: - $ref: "#/definitions/LegacyAddress" - responses: - 200: - description: The transaction was successfully generated - schema: - $ref: "#/definitions/LegacyStdTx" - 400: - description: Invalid request - 500: - description: Internal server error - get: - deprecated: true - summary: Query proposals - description: Query all proposals for a committee - produces: - - application/json - tags: - - Committee - parameters: - - in: path - name: committee-id - required: true - type: string - x-example: 1 - responses: - 200: - description: Committee governance proposals - schema: - type: object - properties: - height: - type: string - example: "100" - result: - type: array - items: - $ref: "#/definitions/LegacyCommitteeProposal" - 400: - description: Invalid query parameters - 500: - description: Internal Server Error - /committee/proposals/{proposal-id}/votes: - post: - deprecated: true - summary: Create a new vote for a proposal - tags: - - Committee - consumes: - - application/json - produces: - - application/json - parameters: - - in: path - name: proposal-id - required: true - type: string - x-example: 1 - - in: body - name: proposal request body - schema: - properties: - base_req: - $ref: "#/definitions/LegacyBaseReq" - voter: - $ref: "#/definitions/LegacyAddress" - vote_type: - type: string - example: "yes" - responses: - 200: - description: The transaction was successfully generated - schema: - $ref: "#/definitions/LegacyStdTx" - 400: - description: Invalid request - 500: - description: Internal server error - get: - deprecated: true - summary: Query proposal votes - description: Query proposal votes by proposal ID - tags: - - Committee - produces: - - application/json - parameters: - - in: path - name: proposal-id - required: true - type: string - x-example: 1 - responses: - 200: - description: Votes - schema: - type: object - properties: - height: - type: string - example: "100" - result: - type: array - items: - $ref: "#/definitions/LegacyCommitteeVote" - 400: - description: Invalid query parameters - 500: - description: Internal Server Error - /committee/committees: - get: - deprecated: true - summary: Query committees - description: Query all committees - tags: - - Committee - produces: - - application/json - responses: - 200: - description: Committees - schema: - type: object - properties: - height: - type: string - example: "100" - result: - type: array - items: - $ref: "#/definitions/LegacyCommittee" - 400: - description: Invalid query parameters - 500: - description: Internal Server Error - /committee/committees/{committee-id}: - get: - deprecated: true - summary: Query committee - description: Query committee by ID - tags: - - Committee - produces: - - application/json - parameters: - - in: path - name: committee-id - required: true - type: string - x-example: 1 - responses: - 200: - description: Committee - schema: - type: object - properties: - height: - type: string - example: "100" - result: - type: object - $ref: "#/definitions/LegacyCommittee" - 400: - description: Invalid query parameters - 500: - description: Internal Server Error - /committee/proposals/{proposal-id}: - get: - deprecated: true - summary: Query proposal - description: Query proposal by ID - tags: - - Committee - produces: - - application/json - parameters: - - in: path - name: proposal-id - required: true - type: string - x-example: 1 - responses: - 200: - description: Proposal - schema: - type: object - properties: - height: - type: string - example: "100" - result: - type: object - $ref: "#/definitions/LegacyCommitteeProposal" - 400: - description: Invalid query parameters - 500: - description: Internal Server Error - /committee/proposals/{proposal-id}/propser: - get: - deprecated: true - summary: Query proposer - description: Query proposer by proposal ID - tags: - - Committee - produces: - - application/json - parameters: - - in: path - name: proposal-id - required: true - type: string - x-example: 1 - responses: - 200: - description: Proposer - schema: - type: object - properties: - height: - type: string - example: "100" - result: - type: object - $ref: "#/definitions/LegacyProposer" - 400: - description: Invalid query parameters - 500: - description: Internal Server Error - /committee/proposals/{proposal-id}/tally: - get: - deprecated: true - summary: Query proposal tally - description: Query proposal tally by proposal ID - tags: - - Committee - produces: - - application/json - parameters: - - in: path - name: proposal-id - required: true - type: string - x-example: 1 - responses: - 200: - description: Vote tally - schema: - type: object - properties: - height: - type: string - example: "100" - result: - type: string - example: "3" - 400: - description: Invalid query parameters - 500: - description: Internal Server Error - /hard/deposit: - post: - deprecated: true - summary: Deposit funds to hard liquidity pool - tags: - - Hard - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: hard deposit body - schema: - properties: - base_req: - $ref: "#/definitions/LegacyBaseReq" - depositor: - $ref: "#/definitions/LegacyAddress" - amount: - $ref: "#/definitions/LegacyCoins" - responses: - 200: - description: OK - schema: - $ref: "#/definitions/LegacyStdTx" - 400: - description: Invalid request - 500: - description: Internal server error - /hard/withdraw: - post: - deprecated: true - summary: Withdraw funds from hard liquidity pool - tags: - - Hard - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: hard withdraw body - schema: - properties: - base_req: - $ref: "#/definitions/LegacyBaseReq" - depositor: - $ref: "#/definitions/LegacyAddress" - amount: - $ref: "#/definitions/LegacyCoins" - responses: - 200: - description: OK - schema: - $ref: "#/definitions/LegacyStdTx" - 400: - description: Invalid request - 500: - description: Internal server error - /hard/borrow: - post: - deprecated: true - summary: Borrow funds from hard liquidity pool - tags: - - Hard - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: hard borrow body - schema: - properties: - base_req: - $ref: "#/definitions/LegacyBaseReq" - depositor: - $ref: "#/definitions/LegacyAddress" - amount: - $ref: "#/definitions/LegacyCoins" - responses: - 200: - description: OK - schema: - $ref: "#/definitions/LegacyStdTx" - 400: - description: Invalid request - 500: - description: Internal server error - /hard/repay: - post: - deprecated: true - summary: Repay funds borrowed from hard liquidity pool - tags: - - Hard - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: hard repay body - schema: - properties: - base_req: - $ref: "#/definitions/LegacyBaseReq" - owner: - $ref: "#/definitions/LegacyAddress" - amount: - $ref: "#/definitions/LegacyCoins" - responses: - 200: - description: OK - schema: - $ref: "#/definitions/LegacyStdTx" - 400: - description: Invalid request - 500: - description: Internal server error - /hard/liquidate: - post: - deprecated: true - summary: Attempt to liquidate a borrower that is over their loan-to-value - tags: - - Hard - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: hard liquidate body - schema: - properties: - base_req: - $ref: "#/definitions/LegacyBaseReq" - borrower: - $ref: "#/definitions/LegacyAddress" - responses: - 200: - description: OK - schema: - $ref: "#/definitions/LegacyStdTx" - 400: - description: Invalid request - 500: - description: Internal server error - /hard/parameters: - get: - deprecated: true - summary: Get the current parameters of the hard module - tags: - - Hard - produces: - - application/json - responses: - 200: - description: Hard module parameters - schema: - type: object - properties: - height: - type: string - example: "100" - result: - type: array - x-nullable: true - items: - $ref: "#/definitions/LegacyHardParams" - 500: - description: Server internal error - /hard/total-deposited: - get: - deprecated: true - summary: Get total coins deposited to hard liquidity pools - tags: - - Hard - produces: - - application/json - parameters: - - in: query - name: denom - description: Coin denom - required: false - type: string - x-example: btc - responses: - 200: - description: total coins deposited - schema: - type: object - properties: - height: - type: string - example: "100" - result: - type: array - x-nullable: true - items: - $ref: "#/definitions/LegacyCoin" - 500: - description: Server internal error - /hard/total-borrowed: - get: - deprecated: true - summary: Get total coins borrowed from hard liquidity pools - tags: - - Hard - produces: - - application/json - parameters: - - in: query - name: denom - description: Coin denom - required: false - type: string - x-example: btc - responses: - 200: - description: total coins borrowed - schema: - type: object - properties: - height: - type: string - example: "100" - result: - type: array - x-nullable: true - items: - $ref: "#/definitions/LegacyCoin" - 500: - description: Server internal error - /hard/reserves: - get: - deprecated: true - summary: Get total hard reserve coins - tags: - - Hard - produces: - - application/json - parameters: - - in: query - name: denom - description: Coin denom - required: false - type: string - x-example: btc - responses: - 200: - description: reserve coins - schema: - type: object - properties: - height: - type: string - example: "100" - result: - type: array - x-nullable: true - items: - $ref: "#/definitions/LegacyCoin" - 500: - description: Server internal error - /hard/interest-rate: - get: - deprecated: true - summary: Get the hard module interest rates - tags: - - Hard - produces: - - application/json - parameters: - - in: query - name: denom - description: Money market denom - required: false - type: string - x-example: bnb - responses: - 200: - description: money market interest rates - schema: - type: object - properties: - height: - type: string - example: "100" - result: - type: array - x-nullable: true - items: - $ref: "#/definitions/LegacyMoneyMarketInterestRate" - 500: - description: Server internal error - /hard/accounts: - get: - deprecated: true - summary: Get the hard module accounts - tags: - - Hard - produces: - - application/json - responses: - 200: - description: The hard module accounts - schema: - type: object - properties: - height: - type: string - example: "100" - result: - type: array - items: - type: object - properties: - account_number: - type: number - address: - $ref: "#/definitions/LegacyAddress" - coins: - type: array - items: - $ref: "#/definitions/LegacyCoin" - name: - type: string - permissions: - type: array - items: - type: string - public_key: - $ref: "#/definitions/LegacyPublicKey" - sequence: - type: number - 500: - description: Server internal error - /hard/deposits: - get: - deprecated: true - summary: Get hard deposits - tags: - - Hard - produces: - - application/json - parameters: - - in: query - name: denom - description: Deposit coin denom - required: false - type: string - x-example: btc - - in: query - name: owner - description: Owner address in bech32 format - required: false - type: string - x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - - in: query - name: page - description: The page number. - type: integer - x-example: 1 - - in: query - name: limit - description: The maximum number of items per page. - type: integer - x-example: 100 - responses: - 200: - description: hard deposits - schema: - type: object - properties: - height: - type: string - example: "100" - result: - type: array - x-nullable: true - items: - $ref: "#/definitions/LegacyHardDepositResponse" - 500: - description: Server internal error - /hard/borrows: - get: - deprecated: true - summary: Get hard borrows - tags: - - Hard - produces: - - application/json - parameters: - - in: query - name: denom - description: Borrow coin denom - required: false - type: string - x-example: btc - - in: query - name: owner - description: Owner address in bech32 format - required: false - type: string - x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - - in: query - name: page - description: The page number. - type: integer - x-example: 1 - - in: query - name: limit - description: The maximum number of items per page. - type: integer - x-example: 100 - responses: - 200: - description: hard borrows - schema: - type: object - properties: - height: - type: string - example: "100" - result: - type: array - x-nullable: true - items: - $ref: "#/definitions/LegacyHardBorrowResponse" - 500: - description: Server internal error - /issuance/issue: - post: - deprecated: true - summary: Issue tokens - tags: - - Issuance - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: Issue tokens body - schema: - properties: - base_req: - $ref: "#/definitions/LegacyBaseReq" - sender: - $ref: "#/definitions/LegacyAddress" - tokens: - $ref: "#/definitions/LegacyCoin" - receiver: - $ref: "#/definitions/LegacyAddress" - responses: - 200: - description: OK - schema: - $ref: "#/definitions/LegacyStdTx" - 400: - description: Invalid request - 500: - description: Internal server error - /issuance/redeem: - post: - deprecated: true - summary: Redeem tokens - tags: - - Issuance - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: Redeem tokens body - schema: - properties: - base_req: - $ref: "#/definitions/LegacyBaseReq" - sender: - $ref: "#/definitions/LegacyAddress" - tokens: - $ref: "#/definitions/LegacyCoin" - responses: - 200: - description: OK - schema: - $ref: "#/definitions/LegacyStdTx" - 400: - description: Invalid request - 500: - description: Internal server error - /issuance/block: - post: - deprecated: true - summary: Block an address from using an issued token - tags: - - Issuance - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: Block address body - schema: - properties: - base_req: - $ref: "#/definitions/LegacyBaseReq" - sender: - $ref: "#/definitions/LegacyAddress" - denom: - type: string - example: "usdt" - blocked_address: - $ref: "#/definitions/LegacyAddress" - responses: - 200: - description: OK - schema: - $ref: "#/definitions/LegacyStdTx" - 400: - description: Invalid request - 500: - description: Internal server error - /issuance/unblock: - post: - deprecated: true - summary: Unblock an address from using an issued token - tags: - - Issuance - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: Unblock address body - schema: - properties: - base_req: - $ref: "#/definitions/LegacyBaseReq" - sender: - $ref: "#/definitions/LegacyAddress" - denom: - type: string - example: "usdt" - address: - $ref: "#/definitions/LegacyAddress" - responses: - 200: - description: OK - schema: - $ref: "#/definitions/LegacyStdTx" - 400: - description: Invalid request - 500: - description: Internal server error - /issuance/pause: - post: - deprecated: true - summary: Set an issued token's pause status - tags: - - Issuance - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: Set pause status body - schema: - properties: - base_req: - $ref: "#/definitions/LegacyBaseReq" - sender: - $ref: "#/definitions/LegacyAddress" - denom: - type: string - example: "usdt" - status: - type: boolean - example: true - responses: - 200: - description: OK - schema: - $ref: "#/definitions/LegacyStdTx" - 400: - description: Invalid request - 500: - description: Internal server error - /issuance/parameters: - get: - deprecated: true - summary: Get the current parameters of the Issuance module - tags: - - Issuance - produces: - - application/json - responses: - 200: - description: Issuance parameters - schema: - type: object - properties: - height: - type: string - example: "100" - result: - type: array - x-nullable: true - items: - $ref: "#/definitions/LegacyIssuanceParams" - 500: - description: Server internal error - /swap/deposit: - post: - deprecated: true - summary: Deposit funds to swap liquidity pool - tags: - - Swap - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: swap deposit body - schema: - properties: - base_req: - $ref: "#/definitions/LegacyBaseReq" - depositor: - $ref: "#/definitions/LegacyAddress" - token_a: - $ref: "#/definitions/LegacyCoin" - token_b: - $ref: "#/definitions/LegacyCoin" - slippage: - type: string - example: "0.05" - deadline: - type: string - example: "1628073801" - responses: - 200: - description: OK - schema: - $ref: "#/definitions/LegacyStdTx" - 400: - description: Invalid request - 500: - description: Internal server error - /swap/withdraw: - post: - deprecated: true - summary: Withdraw funds from a swap liquidity pool - tags: - - Swap - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: swap withdraw body - schema: - properties: - base_req: - $ref: "#/definitions/LegacyBaseReq" - from: - $ref: "#/definitions/LegacyAddress" - shares: - type: string - example: "5000" - min_token_a: - $ref: "#/definitions/LegacyCoin" - min_token_b: - $ref: "#/definitions/LegacyCoin" - deadline: - type: string - example: "1628073801" - responses: - 200: - description: OK - schema: - $ref: "#/definitions/LegacyStdTx" - 400: - description: Invalid request - 500: - description: Internal server error - /swap/swapExactForTokens: - post: - deprecated: true - summary: Swap exact amount of input tokens for approximate amount of output tokens - tags: - - Swap - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: swap exact for tokens body - schema: - properties: - base_req: - $ref: "#/definitions/LegacyBaseReq" - requester: - $ref: "#/definitions/LegacyAddress" - exact_token_a: - $ref: "#/definitions/LegacyCoin" - token_b: - $ref: "#/definitions/LegacyCoin" - slippage: - type: string - example: "0.05" - deadline: - type: string - example: "1628073801" - responses: - 200: - description: OK - schema: - $ref: "#/definitions/LegacyStdTx" - 400: - description: Invalid request - 500: - description: Internal server error - /swap/swapForExactTokens: - post: - deprecated: true - summary: Swap approximate amount of input tokens for exact amount of output tokens - tags: - - Swap - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: swap for exact tokens body - schema: - properties: - base_req: - $ref: "#/definitions/LegacyBaseReq" - requester: - $ref: "#/definitions/LegacyAddress" - token_a: - $ref: "#/definitions/LegacyCoin" - exact_token_b: - $ref: "#/definitions/LegacyCoin" - slippage: - type: string - example: "0.05" - deadline: - type: string - example: "1628073801" - responses: - 200: - description: OK - schema: - $ref: "#/definitions/LegacyStdTx" - 400: - description: Invalid request - 500: - description: Internal server error - /swap/parameters: - get: - deprecated: true - summary: Get the current parameters of the swap module - tags: - - Swap - produces: - - application/json - responses: - 200: - description: Swap module parameters - schema: - type: object - properties: - height: - type: string - example: "100" - result: - type: array - x-nullable: true - items: - $ref: "#/definitions/LegacySwapParams" - 500: - description: Server internal error - /swap/deposits: - get: - deprecated: true - summary: Get the current deposits of a liquidity pool - tags: - - Swap - produces: - - application/json - parameters: - - in: query - name: owner - description: Owner address in bech32 format - required: false - type: string - x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - - in: query - name: pool - description: Pool ID - required: false - type: string - x-example: "abc:xyz" - responses: - 200: - description: Liquidity pool deposits - schema: - type: object - properties: - height: - type: string - example: "100" - result: - type: array - x-nullable: true - items: - $ref: "#/definitions/LegacySwapDepositsQueryResult" - 500: - description: Server internal error - /swap/pool: - get: - deprecated: true - summary: Get information about a liquidity pool by ID - tags: - - Swap - produces: - - application/json - parameters: - - in: query - name: pool - description: Pool ID - required: true - type: string - x-example: "abc:xyz" - responses: - 200: - description: Liquidity pool statistics - schema: - type: object - properties: - height: - type: string - example: "100" - result: - type: array - items: - $ref: "#/definitions/LegacySwapPoolStatsQueryResult" - 500: - description: Server internal error - /swap/pools: - get: - deprecated: true - summary: Get information about all liquidity pools - tags: - - Swap - produces: - - application/json - responses: - 200: - description: Statistics for all liquidity pools - schema: - type: object - properties: - height: - type: string - example: "100" - result: - type: array - x-nullable: true - items: - $ref: "#/definitions/LegacySwapPoolStatsQueryResult" - 500: - description: Server internal error - /kavadist/parameters: - get: - deprecated: true - summary: Get the current kavadist parameter values - tags: - - Kavadist - produces: - - application/json - responses: - 200: - description: OK - schema: - type: object - properties: - active: - type: string - periods: - type: array - items: - $ref: "#/definitions/LegacyKavadistPeriod" - 500: - description: Internal Server Error - -definitions: - LegacyCrossChain: - type: boolean - example: true - LegacyMsg: - type: object - properties: - type: - type: string - example: "cosmos-sdk/MsgSend" - value: - type: object - properties: - from_address: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - to_address: - type: string - example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz - amount: - type: array - items: - $ref: "#/definitions/LegacyCoin" - LegacyAddress: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - LegacyAddress2: - type: string - description: bech32 encoded address - example: kava1atsrkjac6ulgmwhudfc36lnjfgv340vlvm757z - LegacyBinanceChainAddress: - type: string - description: address on another chain (binance) - example: bnb1uky3me9ggqypmrsvxk7ur6hqkzq7zmv4ed4ng7 - LegacyBinanceChainAddress2: - type: string - description: address on another chain (binance) - example: bnb10uypsspvl6jlxcx5xse02pag39l8xpe7a3468h - LegacyRandomNumberHash: - type: string - description: hex-encoded sha256 hash of a 64bit random number - example: c0544b7f4b890a673ea3f61bdb4650fbfe2f3e56bda1b397d6d592fca7163c8c - LegacyTimestamp: - type: string - description: unix timestamp - example: "1585252531" - LegacyHeightSpan: - type: string - description: span of blocks for which an atomic swap is valid - example: "3600" - LegacyCoin: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: "50000" - LegacyCoins: - type: array - items: - $ref: "#/definitions/LegacyCoins" - LegacyCoinBNB: - type: object - properties: - denom: - type: string - example: bnb - amount: - type: string - example: "555555" - LegacyCollateralType: - type: string - example: xrpb-a - LegacyCoinCollateral: - type: object - properties: - denom: - type: string - example: "xrp" - amount: - type: string - example: "10000000000" - LegacyCoinPrincipal: - type: object - properties: - denom: - type: string - example: "usdx" - amount: - type: string - example: "10000000" - LegacyCoinBid: - type: object - properties: - denom: - type: string - example: "usdx" - amount: - type: string - example: "100000000" - LegacySignature: - type: object - properties: - signature: - type: string - example: "W1HfKcc4F0rCSoxheZ7fsrB5nGK58U4gKysuzsmUwhloVnCxmbCx289uVMMvQN6tOcQsz7hMVTJrXSA1xzevvw==" - pubkey: - type: object - properties: - type: - type: string - example: "tendermint/PubKeySecp256k1" - value: - type: string - example: "Agey31h/NYpcy0sYm4liHMrXJMzbQUrgV4uHd/w09CXN" - LegacyStdTx: - type: object - properties: - msg: - type: array - items: - $ref: "#/definitions/LegacyMsg" - fee: - type: object - properties: - gas: - type: string - example: "200000" - amount: - type: array - items: - $ref: "#/definitions/LegacyCoin" - memo: - type: string - signatures: - type: array - items: - $ref: "#/definitions/LegacySignature" - LegacyBaseReq: - type: object - properties: - from: - type: string - example: "kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c" - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: "a memo" - chain_id: - type: string - example: "testing" - account_number: - type: string - example: "1" - sequence: - type: string - example: "0" - gas: - type: string - example: "200000" - gas_adjustment: - type: string - example: "1.0" - fees: - type: array - items: - $ref: "#/definitions/LegacyCoin" - simulate: - type: boolean - example: false - description: Estimate gas for a transaction (cannot be used in conjunction with generate_only) - LegacyAtomicSwapResponse: - type: object - properties: - id: - type: string - example: FFEA80A3D9A42427CC12DB957866C6D428C16AA5EA6D9A4A756EF04BF9F2FF06 - status: - type: string - example: Completed - amount: - $ref: "#/definitions/LegacyCoinBNB" - random_number_hash: - type: string - example: 0b1e35e991bf052be230ae8dd3ff90b69a610160d28a9eb3c0701395f9d2b291 - expire_hieght: - type: string - example: "532463" - timestamp: - type: string - example: "1589020884" - sender: - $ref: "#/definitions/LegacyAddress" - recipient: - $ref: "#/definitions/LegacyAddress2" - sender_other_chain: - $ref: "#/definitions/LegacyBinanceChainAddress" - recipient_other_chain: - $ref: "#/definitions/LegacyBinanceChainAddress2" - closed_block: - type: string - example: "532105" - cross_chain: - $ref: "#/definitions/LegacyCrossChain" - direction: - type: string - example: Incoming - LegacyAssetSupplyResponse: - type: object - properties: - denom: - type: string - example: bnb - incoming_supply: - $ref: "#/definitions/LegacyCoinBNB" - outgoing_supply: - $ref: "#/definitions/LegacyCoinBNB" - current_supply: - $ref: "#/definitions/LegacyCoinBNB" - limit: - $ref: "#/definitions/LegacyCoinBNB" - LegacyBep3ParamsResponse: - type: object - properties: - bnb_deputy_address: - type: string - example: kava1aphsdnz5hu2t5ty2au6znprug5kx3zpy6zwq29 - min_block_lock: - type: string - example: "80" - max_block_lock: - type: string - example: "3600" - supported_assets: - type: array - items: - $ref: "#/definitions/LegacyBep3Asset" - LegacyBep3Asset: - type: object - properties: - denom: - type: string - example: bnb - coin_id: - type: string - example: "714" - limit: - type: string - example: "100" - active: - type: boolean - example: true - LegacyRewardResult: - type: object - properties: - hard_claims: - type: array - items: - $ref: "#/definitions/LegacyHardLiquidityProviderClaim" - usdx_minting_claims: - type: array - items: - $ref: "#/definitions/LegacyUSDXMintingClaims" - LegacyHardLiquidityProviderClaim: - type: object - properties: - base_claim: - $ref: "#/definitions/LegacyBaseMultiClaim" - supply_reward_indexes: - type: array - items: - $ref: "#/definitions/LegacyMultiRewardIndex" - borrow_reward_indexes: - type: array - items: - $ref: "#/definitions/LegacyMultiRewardIndex" - delegator_reward_indexes: - type: array - items: - $ref: "#/definitions/LegacyRewardIndex" - LegacyUSDXMintingClaims: - type: object - properties: - base_claim: - $ref: "#/definitions/LegacyBaseClaim" - reward_indexes: - type: array - items: - $ref: "#/definitions/LegacyRewardIndex" - LegacyBaseClaim: - type: object - properties: - owner: - $ref: "#/definitions/LegacyAddress" - reward: - $ref: "#/definitions/LegacyCoin" - LegacyBaseMultiClaim: - type: object - properties: - owner: - $ref: "#/definitions/LegacyAddress" - reward: - type: array - items: - $ref: "#/definitions/LegacyCoin" - LegacyMultiRewardIndex: - type: object - properties: - collateral_type: - type: string - example: "bnb" - reward_indexes: - type: array - items: - $ref: "#/definitions/LegacyRewardIndex" - LegacyRewardIndex: - type: object - properties: - collateral_type: - type: string - example: "bnb" - reward_factor: - type: string - example: "1.2581" - LegacyIncentiveParams: - type: object - properties: - usdx_minting_reward_periods: - type: array - items: - $ref: "#/definitions/LegacyRewardPeriod" - hard_supply_reward_periods: - type: array - items: - $ref: "#/definitions/LegacyMultiRewardPeriod" - hard_borrow_reward_periods: - type: array - items: - $ref: "#/definitions/LegacyMultiRewardPeriod" - hard_delegator_reward_periods: - type: array - items: - $ref: "#/definitions/LegacyRewardPeriod" - claim_multipliers: - type: array - items: - $ref: "#/definitions/LegacyMultiplier" - claim_end: - type: string - example: "2022-02-05T23:45:55.761435272Z" - LegacyRewardPeriod: - type: object - properties: - active: - type: boolean - example: true - collateral_type: - type: string - example: bnb - start: - type: string - example: "2020-02-05T23:45:55.761435272Z" - end: - type: string - example: "2024-02-05T23:45:55.761435272Z" - rewards_per_second: - $ref: "#/definitions/LegacyCoin" - LegacyMultiRewardPeriod: - type: object - properties: - active: - type: boolean - example: true - collateral_type: - type: string - example: bnb - start: - type: string - example: "2020-02-05T23:45:55.761435272Z" - end: - type: string - example: "2024-02-05T23:45:55.761435272Z" - rewards_per_second: - type: array - items: - $ref: "#/definitions/LegacyCoin" - LegacyPubProposal: - type: object - properties: - title: - type: string - example: "the title of the proposal" - description: - type: string - example: "the description of the proposal" - LegacyCdpResponse: - type: object - properties: - id: - type: string - example: "1" - owner: - type: string - example: kava1q53rwutgpzx7szcrgzqguxyccjpzt9j4cyctn9 - collateral: - $ref: "#/definitions/LegacyCoinCollateral" - type: - type: string - example: "xrpb-a" - principal: - $ref: "#/definitions/LegacyCoinPrincipal" - accumulated_fees: - $ref: "#/definitions/LegacyCoinPrincipal" - fees_updated: - type: string - example: "2020-02-05T23:45:55.761435272Z" - collateral_value: - $ref: "#/definitions/LegacyCoinPrincipal" - collateralization_ratio: - type: string - example: "2.721734157907653857" - LegacyCdpDepositResponse: - type: object - properties: - cdp_id: - type: string - example: "1" - depositor: - type: string - example: kava1q53rwutgpzx7szcrgzqguxyccjpzt9j4cyctn9 - amount: - $ref: "#/definitions/LegacyCoinCollateral" - - LegacyPricefeedParameters: - type: object - properties: - markets: - type: array - items: - $ref: "#/definitions/LegacyMarket" - LegacyPrice: - type: object - properties: - market_id: - type: string - example: "xrp:usd" - price: - type: string - example: "0.298758999999999997" - LegacyPostedPrice: - type: object - properties: - market_id: - type: string - example: "xrp:usd" - oracle_address: - type: string - example: kava10cw2m04528dwlc44k0myd7strj3eq5jr6s8pxs - price: - type: string - example: "0.298758999999999997" - expiry: - type: string - example: "2021-02-12T23:10:00Z" - LegacyMarket: - type: object - properties: - market_id: - type: string - example: "xrp:usd" - base_asset: - type: string - example: "xrp" - quote_asset: - type: string - example: "usd" - oracles: - type: array - x-nullable: true - items: - $ref: "#/definitions/LegacyAddress" - active: - type: boolean - example: true - LegacySwapParams: - type: object - properties: - allowed_pools: - type: array - items: - $ref: "#/definitions/LegacyAllowedPool" - swap_fee: - type: string - example: "0.03" - LegacyAllowedPool: - type: object - properties: - token_a: - type: string - example: "ukava" - token_b: - type: string - example: "usdx" - LegacySwapDepositsQueryResult: - type: object - properties: - depositor: - $ref: "#/definitions/LegacyAddress" - pool_id: - type: string - example: "abc:xyz" - shares_owned: - type: string - example: "500" - shares_value: - $ref: "#/definitions/LegacyCoins" - LegacySwapPoolStatsQueryResult: - type: object - properties: - name: - type: string - example: "abc:xyz" - coins: - $ref: "#/definitions/LegacyCoins" - total_shares: - type: string - example: "500" - LegacyHardParams: - type: object - properties: - money_markets: - type: array - items: - $ref: "#/definitions/LegacyMoneyMarket" - minimum_borrow_usd_value: - type: string - example: "10" - LegacyMoneyMarket: - type: object - properties: - denom: - type: string - example: "bnb" - borrow_limit: - $ref: "#/definitions/LegacyBorrowLimit" - spot_market_id: - type: string - example: "bnb:usd" - conversion_factor: - type: string - example: "100000000" - interest_rate_model: - $ref: "#/definitions/LegacyInterestRateModel" - reserve_factor: - type: string - example: "0.05" - keeper_reward_percentage: - type: string - example: "0.05" - LegacyBorrowLimit: - type: object - properties: - has_max_limit: - type: boolean - example: true - maximum_limit: - type: string - example: "100000000000000" - loan_to_value: - type: string - example: "0.8" - LegacyInterestRateModel: - type: object - properties: - base_rate_apy: - type: string - example: "0" - base_multiplier: - type: string - example: "0.1" - kink: - type: string - example: "0.8" - jump_multiplier: - type: string - example: "0.5" - LegacyHardDepositResponse: - type: object - properties: - depositor: - $ref: "#/definitions/LegacyAddress" - amount: - type: array - items: - $ref: "#/definitions/LegacyCoin" - index: - type: array - items: - $ref: "#/definitions/LegacySupplyInterestFactor" - LegacyHardBorrowResponse: - type: object - properties: - borrower: - $ref: "#/definitions/LegacyAddress" - amount: - type: array - items: - $ref: "#/definitions/LegacyCoin" - index: - type: array - items: - $ref: "#/definitions/LegacyBorrowInterestFactor" - LegacySupplyInterestFactor: - type: object - properties: - denom: - type: string - example: "bnb" - value: - type: string - example: "0.1258" - LegacyBorrowInterestFactor: - type: object - properties: - denom: - type: string - example: "bnb" - value: - type: string - example: "0.1258" - LegacyMoneyMarketInterestRate: - type: object - properties: - denom: - type: string - example: "bnb" - supply_interest_rate: - type: string - example: "5.25" - borrow_interest_rate: - type: string - example: "5.25" - LegacyMultiplierName: - type: string - example: "small" - LegacyMultiplier: - type: object - properties: - name: - $ref: "#/definitions/LegacyMultiplierName" - months_lockup: - type: string - example: "12" - factor: - type: string - example: "0.33" - LegacyIssuanceParams: - type: object - properties: - assets: - type: array - items: - $ref: "#/definitions/LegacyIssuanceAsset" - LegacyIssuanceAsset: - type: object - properties: - owner: - $ref: "#/definitions/LegacyAddress" - denom: - type: string - example: "btc" - blocked_addresses: - type: array - items: - $ref: "#/definitions/LegacyAddress" - paused: - type: boolean - example: false - blockable: - type: boolean - example: true - rate_limit: - $ref: "#/definitions/LegacyRateLimit" - LegacyRateLimit: - type: object - properties: - active: - type: boolean - example: true - limit: - type: string - example: "500000000" - time_period: - type: string - example: "518400000000000" - LegacyAuctionParameters: - type: object - properties: - max_auction_duration: - type: string - example: "172800000000000" - bid_duration: - type: string - example: "600000000000" - increment_surplus: - type: string - example: "0.05" - increment_debt: - type: string - example: "0.05" - increment_collateral: - type: string - example: "0.05" - LegacyAuctionResponse: - type: object - properties: - id: - type: string - example: "1" - initiator: - type: string - example: liquidator - lot: - $ref: "#/definitions/LegacyCoinCollateral" - bidder: - $ref: "#/definitions/LegacyAddress" - bid: - $ref: "#/definitions/LegacyCoin" - has_received_bids: - type: boolean - example: false - end_time: - type: string - example: "2020-02-05T23:45:55.761435272Z" - max_end_time: - type: string - example: "2020-02-05T23:45:55.761435272Z" - type: - type: string - example: collateral - phase: - type: string - example: forward - LegacyCollateralParam: - type: object - properties: - denom: - type: string - example: xrp - type: - type: string - example: xrp-a - liquidation_ratio: - type: string - example: "2.000000000000000000" - debt_limit: - $ref: "#/definitions/LegacyCoinPrincipal" - stability_fee: - type: string - example: "1.000000001547126000" - auction_size: - type: string - example: "5000000000" - liquidation_penalty: - type: string - example: "0.050000000000000000" - prefix: - type: integer - example: 0 - spot_market_id: - type: string - example: "xrp:usd" - liquidation_market_id: - type: string - example: "xrp:usd:30" - keeper_reward_percentage: - type: string - example: "0.05" - check_collateralization_index_count: - type: string - example: "10" - conversion_factor: - type: string - example: "6" - LegacyDebtParam: - type: object - properties: - denom: - type: string - example: usdx - reference_asset: - type: string - example: "usd" - conversion_factor: - type: string - example: "6" - debt_floor: - type: string - example: "10000000" - LegacyProposer: - type: object - properties: - proposal_id: - type: string - example: "1" - proposer: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - LegacyCommitteeVote: - type: object - properties: - voter: - type: string - proposal_id: - type: string - vote_type: - type: string - LegacyCommitteeProposal: - type: object - properties: - pub_proposal: - $ref: "#/definitions/LegacyPubProposal" - id: - type: string - example: "1" - committee_id: - type: string - example: "1" - deadline: - type: string - example: "2020-05-10T16:18:43.752522893Z" - LegacyCommittee: - type: object - properties: - id: - type: string - example: "1" - description: - type: string - example: description of committee - members: - type: array - items: - $ref: "#/definitions/LegacyAddress" - permissions: - type: array - items: - $ref: "#/definitions/LegacyPermission" - vote_threshold: - type: string - example: "0.5" - proposal_duration: - type: string - example: "3600000000000" - LegacyPermission: - type: object - properties: - type: - type: string - example: "param_change_permission" - allowed_params: - type: array - items: - $ref: "#/definitions/LegacyAllowedParam" - LegacyAllowedParam: - type: object - properties: - subspace: - type: string - example: cdp - key: - type: string - example: collateral_params - LegacyRedelegation: - type: object - properties: - delegator_address: - type: string - validator_src_address: - type: string - validator_dst_address: - type: string - entries: - type: array - items: - $ref: "#/definitions/LegacyRedelegation" - LegacyPublicKey: - type: object - properties: - type: - type: string - value: - type: string - LegacyKavadistPeriod: - type: object - properties: - start: - type: string - example: "2020-06-01:14:00:00Z" - end: - type: string - example: "2020-06-01:14:00:00Z" - inflation: - type: string - example: "1.000000001167363430" diff --git a/client/docs/swagger-ui/swagger.yaml b/client/docs/swagger-ui/swagger.yaml index cf93c971..d4c35936 100644 --- a/client/docs/swagger-ui/swagger.yaml +++ b/client/docs/swagger-ui/swagger.yaml @@ -1,6 +1,6 @@ swagger: '2.0' info: - title: Kava - Legacy REST and gRPC Gateway docs + title: Kava - gRPC Gateway docs description: A REST interface for state queries version: 1.0.0 externalDocs: @@ -208,9 +208,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -1796,9 +1797,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -2574,9 +2576,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -6225,9 +6228,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -7017,9 +7021,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -7967,9 +7972,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -8306,9 +8312,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -10035,9 +10042,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -10374,9 +10382,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -12398,9 +12407,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -12612,9 +12622,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -12756,9 +12767,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -12979,4625 +12991,10 @@ paths: format: byte tags: - Savings - /node_info: - get: - description: Information about the connected node - summary: The properties of the connected node - tags: - - KAVA Rest - produces: - - application/json - responses: - '200': - description: Node status - schema: - type: object - properties: - application_version: - properties: - build_tags: - type: string - client_name: - type: string - commit: - type: string - go: - type: string - name: - type: string - server_name: - type: string - version: - type: string - node_info: - properties: - id: - type: string - moniker: - type: string - example: validator-name - protocol_version: - properties: - p2p: - type: string - example: 7 - block: - type: string - example: 10 - app: - type: string - example: 0 - network: - type: string - example: gaia-2 - channels: - type: string - listen_addr: - type: string - example: 192.168.56.1:26656 - version: - description: Tendermint version - type: string - example: 0.15.0 - other: - description: more information on versions - type: object - properties: - tx_index: - type: string - example: 'on' - rpc_address: - type: string - example: tcp://0.0.0.0:26657 - '500': - description: Failed to query node status - /syncing: - get: - summary: Syncing state of node - tags: - - Tendermint RPC - description: Get if the node is currently syning with other nodes - produces: - - application/json - responses: - '200': - description: Node syncing status - schema: - type: object - properties: - syncing: - type: boolean - '500': - description: Server internal error - /blocks/latest: - get: - summary: Get the latest block - tags: - - Tendermint RPC - produces: - - application/json - responses: - '200': - description: The latest block - schema: - type: object - properties: - block_meta: - type: object - properties: - header: - type: object - properties: - chain_id: - type: string - example: cosmoshub-2 - 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: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - 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: cosmoshub-2 - 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: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - 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== - '500': - description: Server internal error - /blocks/{height}: - get: - summary: Get a block at a certain height - tags: - - Tendermint RPC - produces: - - application/json - parameters: - - in: path - name: height - description: Block height - required: true - type: number - x-example: 1 - responses: - '200': - description: The block at a specific height - schema: - type: object - properties: - block_meta: - type: object - properties: - header: - type: object - properties: - chain_id: - type: string - example: cosmoshub-2 - 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: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - 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: cosmoshub-2 - 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: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - 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== - '400': - description: Invalid height - '404': - description: Request block height doesn't - '500': - description: Server internal error - /validatorsets/latest: - get: - summary: Get the latest validator set - tags: - - Tendermint RPC - produces: - - application/json - responses: - '200': - description: The validator set at the latest block height - schema: - type: object - properties: - block_height: - type: string - validators: - type: array - items: - type: object - properties: - address: - type: string - description: bech32 encoded address - example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - pub_key: - type: string - example: >- - cosmosvalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf - voting_power: - type: string - example: '1000' - proposer_priority: - type: string - example: '1000' - '500': - description: Server internal error - /validatorsets/{height}: - get: - summary: Get a validator set a certain height - tags: - - Tendermint RPC - produces: - - application/json - parameters: - - in: path - name: height - description: Block height - required: true - type: number - x-example: 1 - responses: - '200': - description: The validator set at a specific block height - schema: - type: object - properties: - block_height: - type: string - validators: - type: array - items: - type: object - properties: - address: - type: string - description: bech32 encoded address - example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - pub_key: - type: string - example: >- - cosmosvalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf - voting_power: - type: string - example: '1000' - proposer_priority: - type: string - example: '1000' - '400': - description: Invalid height - '404': - description: Block at height not available - '500': - description: Server internal error - /txs/{hash}: - get: - deprecated: true - summary: Get a Tx by hash - tags: - - Transactions - description: Retrieve a transaction using its hash. - produces: - - application/json - parameters: - - in: path - name: hash - description: Tx hash - required: true - type: string - x-example: BCBE20E8D46758B96AE5883B792858296AC06E51435490FBDCAE25A72B3CC76B - responses: - '200': - description: Tx with the provided hash - schema: - 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: stake - 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 - '500': - description: Internal Server Error - /txs: - get: - deprecated: true - tags: - - Transactions - summary: Search transactions - description: Search transactions by events. - produces: - - application/json - parameters: - - in: query - name: message.action - type: string - description: >- - transaction events such as 'message.action=send' which results in - the following endpoint: 'GET /txs?message.action=send'. note that - each module documents its own events. look for xx_events.md in the - corresponding cosmos-sdk/docs/spec directory - x-example: send - - in: query - name: message.sender - type: string - description: >- - transaction tags with sender: 'GET - /txs?message.action=send&message.sender=cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv' - x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv - - in: query - name: page - description: Page number - type: integer - x-example: 1 - - in: query - name: limit - description: Maximum number of items per page - type: integer - x-example: 1 - - in: query - name: tx.minheight - type: integer - description: transactions on blocks with height greater or equal this value - x-example: 25 - - in: query - name: tx.maxheight - type: integer - description: transactions on blocks with height less than or equal this value - x-example: 800000 - responses: - '200': - description: All txs matching the provided events - schema: - 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: stake - 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 - '400': - description: Invalid search events - '500': - description: Internal Server Error - post: - tags: - - Transactions - summary: Broadcast a signed tx - description: Broadcast a signed tx to a full node - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: txBroadcast - description: >- - The tx must be a signed StdTx. The supported broadcast modes include - `"block"`(return after tx commit), `"sync"`(return afer CheckTx) and - `"async"`(return right away). - required: true - schema: - 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: stake - 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' - mode: - type: string - example: block - responses: - '200': - description: Tx broadcasting result - schema: - 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 - '500': - description: Internal Server Error - /txs/encode: - post: - deprecated: true - tags: - - Transactions - summary: Encode a transaction to the Amino wire format - description: >- - Encode a transaction (signed or not) from JSON to base64-encoded Amino - serialized bytes - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: tx - description: The tx to encode - required: true - schema: - 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: stake - 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' - responses: - '200': - description: The tx was successfully decoded and re-encoded - schema: - type: object - properties: - tx: - type: string - example: The base64-encoded Amino-serialized bytes for the tx - '400': - description: The tx was malformated - '500': - description: Server internal error - /txs/decode: - post: - deprecated: true - tags: - - Transactions - summary: Decode a transaction from the Amino wire format - description: >- - Decode a transaction (signed or not) from base64-encoded Amino - serialized bytes to JSON - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: tx - description: The tx to decode - required: true - schema: - type: object - properties: - tx: - type: string - example: >- - SvBiXe4KPqijYZoKFFHEzJ8c2HPAfv2EFUcIhx0yPagwEhTy0vPA+GGhCEslKXa4Af0uB+mfShoMCgVzdGFrZRIDMTAwEgQQwJoM - responses: - '200': - description: The tx was successfully decoded - schema: - 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: stake - 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' - '400': - description: The tx was malformated - '500': - description: Server internal error - /bank/balances/{address}: - get: - deprecated: true - summary: Get the account balances - tags: - - Bank - produces: - - application/json - parameters: - - in: path - name: address - description: Account address in bech32 format - required: true - type: string - x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv - responses: - '200': - description: Account balances - schema: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - '500': - description: Server internal error - /bank/accounts/{address}/transfers: - post: - deprecated: true - summary: Send coins from one account to another - tags: - - Bank - consumes: - - application/json - produces: - - application/json - parameters: - - in: path - name: address - description: Account address in bech32 format - required: true - type: string - x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv - - in: body - name: account - description: The sender and tx information - required: true - schema: - type: object - properties: - base_req: - type: object - properties: - from: - type: string - example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: Sent via Cosmos Voyager 🚀 - chain_id: - type: string - example: Cosmos-Hub - 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: stake - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - responses: - '202': - description: Tx was succesfully generated - schema: - 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: stake - 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' - '400': - description: Invalid request - '500': - description: Server internal error - /bank/total: - get: - deprecated: true - summary: Total supply of coins in the chain - tags: - - Bank - produces: - - application/json - responses: - '200': - description: OK - schema: - type: object - properties: - total: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - '500': - description: Internal Server Error - /bank/total/{denomination}: - parameters: - - in: path - name: denomination - description: Coin denomination - required: true - type: string - x-example: uatom - get: - deprecated: true - summary: Total supply of a single coin denomination - tags: - - Bank - produces: - - application/json - responses: - '200': - description: OK - schema: - type: string - '400': - description: Invalid coin denomination - '500': - description: Internal Server Error - /auth/accounts/{address}: - get: - deprecated: true - summary: Get the account information on blockchain - tags: - - Auth - produces: - - application/json - parameters: - - in: path - name: address - description: Account address - required: true - type: string - x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv - responses: - '200': - description: Account information on the blockchain - schema: - type: object - properties: - type: - type: string - value: - type: object - properties: - account_number: - type: string - address: - type: string - coins: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - public_key: - type: object - properties: - type: - type: string - value: - type: string - sequence: - type: string - '500': - description: Server internel error - /staking/delegators/{delegatorAddr}/delegations: - parameters: - - in: path - name: delegatorAddr - description: Bech32 AccAddress of Delegator - required: true - type: string - x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv - get: - deprecated: true - summary: Get all delegations from a delegator - tags: - - Staking - produces: - - application/json - responses: - '200': - description: OK - schema: - type: array - items: - type: object - properties: - delegator_address: - type: string - validator_address: - type: string - shares: - type: string - balance: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - '400': - description: Invalid delegator address - '500': - description: Internal Server Error - post: - summary: Submit delegation - parameters: - - in: body - name: delegation - description: Delegate an amount of liquid coins to a validator - schema: - type: object - properties: - base_req: - type: object - properties: - from: - type: string - example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: Sent via Cosmos Voyager 🚀 - chain_id: - type: string - example: Cosmos-Hub - 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: stake - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - delegator_address: - type: string - description: bech32 encoded address - example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - validator_address: - type: string - description: bech32 encoded address - example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - amount: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - tags: - - Staking - consumes: - - application/json - produces: - - application/json - responses: - '200': - description: OK - schema: - 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: stake - 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' - '400': - description: Invalid delegator address or delegation request body - '401': - description: Key password is wrong - '500': - description: Internal Server Error - /staking/delegators/{delegatorAddr}/delegations/{validatorAddr}: - parameters: - - in: path - name: delegatorAddr - description: Bech32 AccAddress of Delegator - required: true - type: string - x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv - - in: path - name: validatorAddr - description: Bech32 OperatorAddress of validator - required: true - type: string - x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - get: - deprecated: true - summary: Query the current delegation between a delegator and a validator - tags: - - Staking - produces: - - application/json - responses: - '200': - description: OK - schema: - type: object - properties: - delegator_address: - type: string - validator_address: - type: string - shares: - type: string - balance: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - '400': - description: Invalid delegator address or validator address - '500': - description: Internal Server Error - /staking/delegators/{delegatorAddr}/unbonding_delegations: - parameters: - - in: path - name: delegatorAddr - description: Bech32 AccAddress of Delegator - required: true - type: string - x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv - get: - deprecated: true - summary: Get all unbonding delegations from a delegator - tags: - - Staking - produces: - - application/json - responses: - '200': - description: OK - schema: - type: array - items: - type: object - properties: - delegator_address: - type: string - validator_address: - type: string - initial_balance: - type: string - balance: - type: string - creation_height: - type: integer - min_time: - type: integer - '400': - description: Invalid delegator address - '500': - description: Internal Server Error - post: - summary: Submit an unbonding delegation - parameters: - - in: body - name: delegation - description: Unbond an amount of bonded shares from a validator - schema: - type: object - properties: - base_req: - type: object - properties: - from: - type: string - example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: Sent via Cosmos Voyager 🚀 - chain_id: - type: string - example: Cosmos-Hub - 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: stake - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - delegator_address: - type: string - description: bech32 encoded address - example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - validator_address: - type: string - description: bech32 encoded address - example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - amount: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - tags: - - Staking - consumes: - - application/json - produces: - - application/json - responses: - '200': - description: OK - schema: - 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: stake - 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' - '400': - description: Invalid delegator address or unbonding delegation request body - '401': - description: Key password is wrong - '500': - description: Internal Server Error - /staking/delegators/{delegatorAddr}/unbonding_delegations/{validatorAddr}: - parameters: - - in: path - name: delegatorAddr - description: Bech32 AccAddress of Delegator - required: true - type: string - x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv - - in: path - name: validatorAddr - description: Bech32 OperatorAddress of validator - required: true - type: string - x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - get: - deprecated: true - summary: Query all unbonding delegations between a delegator and a validator - tags: - - Staking - produces: - - application/json - responses: - '200': - description: OK - schema: - 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 - min_time: - type: string - '400': - description: Invalid delegator address or validator address - '500': - description: Internal Server Error - /staking/redelegations: - parameters: - - in: query - name: delegator - description: Bech32 AccAddress of Delegator - required: false - type: string - - in: query - name: validator_from - description: Bech32 ValAddress of SrcValidator - required: false - type: string - - in: query - name: validator_to - description: Bech32 ValAddress of DstValidator - required: false - type: string - get: - deprecated: true - summary: Get all redelegations (filter by query params) - tags: - - Staking - produces: - - application/json - responses: - '200': - description: OK - schema: - type: array - items: - $ref: '#/definitions/Redelegation' - '500': - description: Internal Server Error - /staking/delegators/{delegatorAddr}/redelegations: - parameters: - - in: path - name: delegatorAddr - description: Bech32 AccAddress of Delegator - required: true - type: string - x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv - post: - deprecated: true - summary: Submit a redelegation - parameters: - - in: body - name: delegation - description: The sender and tx information - schema: - type: object - properties: - base_req: - type: object - properties: - from: - type: string - example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: Sent via Cosmos Voyager 🚀 - chain_id: - type: string - example: Cosmos-Hub - 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: stake - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - delegator_address: - type: string - description: bech32 encoded address - example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - validator_src_addressess: - type: string - description: bech32 encoded address - example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - validator_dst_address: - type: string - description: bech32 encoded address - example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - shares: - type: string - example: '100' - tags: - - Staking - consumes: - - application/json - produces: - - application/json - responses: - '200': - description: Tx was succesfully generated - schema: - 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: stake - 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' - '400': - description: Invalid delegator address or redelegation request body - '500': - description: Internal Server Error - /staking/delegators/{delegatorAddr}/validators: - parameters: - - in: path - name: delegatorAddr - description: Bech32 AccAddress of Delegator - required: true - type: string - x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv - get: - deprecated: true - summary: Query all validators that a delegator is bonded to - tags: - - Staking - produces: - - application/json - responses: - '200': - description: OK - schema: - type: array - items: - type: object - properties: - operator_address: - type: string - description: bech32 encoded address - example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - consensus_pubkey: - type: string - example: >- - cosmosvalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf - 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 - security_contact: - 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' - '400': - description: Invalid delegator address - '500': - description: Internal Server Error - /staking/delegators/{delegatorAddr}/validators/{validatorAddr}: - parameters: - - in: path - name: delegatorAddr - description: Bech32 AccAddress of Delegator - required: true - type: string - x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv - - in: path - name: validatorAddr - description: Bech32 ValAddress of Delegator - required: true - type: string - x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - get: - deprecated: true - summary: Query a validator that a delegator is bonded to - tags: - - Staking - produces: - - application/json - responses: - '200': - description: OK - schema: - type: object - properties: - operator_address: - type: string - description: bech32 encoded address - example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - consensus_pubkey: - type: string - example: >- - cosmosvalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf - 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 - security_contact: - 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' - '400': - description: Invalid delegator address or validator address - '500': - description: Internal Server Error - /staking/validators: - get: - deprecated: true - summary: >- - Get all validator candidates. By default it returns only the bonded - validators. - parameters: - - in: query - name: status - type: string - description: >- - The validator bond status. Must be either 'bonded', 'unbonded', or - 'unbonding'. - x-example: bonded - - in: query - name: page - description: The page number. - type: integer - x-example: 1 - - in: query - name: limit - description: The maximum number of items per page. - type: integer - x-example: 1 - tags: - - Staking - produces: - - application/json - responses: - '200': - description: OK - schema: - type: array - items: - type: object - properties: - operator_address: - type: string - description: bech32 encoded address - example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - consensus_pubkey: - type: string - example: >- - cosmosvalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf - 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 - security_contact: - 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' - '500': - description: Internal Server Error - /staking/validators/{validatorAddr}: - parameters: - - in: path - name: validatorAddr - description: Bech32 OperatorAddress of validator - required: true - type: string - x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - get: - deprecated: true - summary: Query the information from a single validator - tags: - - Staking - produces: - - application/json - responses: - '200': - description: OK - schema: - type: object - properties: - operator_address: - type: string - description: bech32 encoded address - example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - consensus_pubkey: - type: string - example: >- - cosmosvalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf - 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 - security_contact: - 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' - '400': - description: Invalid validator address - '500': - description: Internal Server Error - /staking/validators/{validatorAddr}/delegations: - parameters: - - in: path - name: validatorAddr - description: Bech32 OperatorAddress of validator - required: true - type: string - x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - get: - deprecated: true - summary: Get all delegations from a validator - tags: - - Staking - produces: - - application/json - responses: - '200': - description: OK - schema: - type: array - items: - type: object - properties: - delegator_address: - type: string - validator_address: - type: string - shares: - type: string - balance: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - '400': - description: Invalid validator address - '500': - description: Internal Server Error - /staking/validators/{validatorAddr}/unbonding_delegations: - parameters: - - in: path - name: validatorAddr - description: Bech32 OperatorAddress of validator - required: true - type: string - x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - get: - deprecated: true - summary: Get all unbonding delegations from a validator - tags: - - Staking - produces: - - application/json - responses: - '200': - description: OK - schema: - type: array - items: - type: object - properties: - delegator_address: - type: string - validator_address: - type: string - initial_balance: - type: string - balance: - type: string - creation_height: - type: integer - min_time: - type: integer - '400': - description: Invalid validator address - '500': - description: Internal Server Error - /staking/pool: - get: - deprecated: true - summary: Get the current state of the staking pool - tags: - - Staking - produces: - - application/json - responses: - '200': - description: OK - schema: - type: object - properties: - loose_tokens: - type: string - bonded_tokens: - type: string - inflation_last_time: - type: string - inflation: - type: string - date_last_commission_reset: - type: string - prev_bonded_shares: - type: string - '500': - description: Internal Server Error - /staking/parameters: - get: - deprecated: true - summary: Get the current staking parameter values - tags: - - Staking - produces: - - application/json - responses: - '200': - description: OK - schema: - type: object - properties: - inflation_rate_change: - type: string - inflation_max: - type: string - inflation_min: - type: string - goal_bonded: - type: string - unbonding_time: - type: string - max_validators: - type: integer - bond_denom: - type: string - '500': - description: Internal Server Error - /slashing/signing_infos: - get: - deprecated: true - summary: Get sign info of given all validators - description: Get sign info of all validators - produces: - - application/json - tags: - - Slashing - parameters: - - in: query - name: page - description: Page number - type: integer - required: true - x-example: 1 - - in: query - name: limit - description: Maximum number of items per page - type: integer - required: true - x-example: 5 - responses: - '200': - description: OK - schema: - type: array - items: - type: object - properties: - start_height: - type: string - index_offset: - type: string - jailed_until: - type: string - missed_blocks_counter: - type: string - '400': - description: Invalid validator public key for one of the validators - '500': - description: Internal Server Error - /slashing/validators/{validatorAddr}/unjail: - post: - deprecated: true - summary: Unjail a jailed validator - description: Send transaction to unjail a jailed validator - consumes: - - application/json - produces: - - application/json - tags: - - Slashing - parameters: - - type: string - description: Bech32 validator address - name: validatorAddr - required: true - in: path - x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - - description: '' - name: UnjailBody - in: body - required: true - schema: - type: object - properties: - base_req: - 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: stake - 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' - responses: - '200': - description: Tx was succesfully generated - schema: - 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: stake - 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' - '400': - description: Invalid validator address or base_req - '500': - description: Internal Server Error - /slashing/parameters: - get: - deprecated: true - summary: Get the current slashing parameters - tags: - - Slashing - produces: - - application/json - responses: - '200': - description: OK - schema: - type: object - properties: - max_evidence_age: - type: string - signed_blocks_window: - type: string - min_signed_per_window: - type: string - double_sign_unbond_duration: - type: string - downtime_unbond_duration: - type: string - slash_fraction_double_sign: - type: string - slash_fraction_downtime: - type: string - '500': - description: Internal Server Error - /gov/proposals: - post: - deprecated: true - summary: Submit a proposal - description: Send transaction to submit a proposal - consumes: - - application/json - produces: - - application/json - tags: - - Governance - parameters: - - description: >- - valid value of `"proposal_type"` can be `"text"`, - `"parameter_change"`, `"software_upgrade"` - name: post_proposal_body - in: body - required: true - schema: - type: object - properties: - base_req: - type: object - properties: - from: - type: string - example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: Sent via Cosmos Voyager 🚀 - chain_id: - type: string - example: Cosmos-Hub - 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: stake - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - title: - type: string - description: - type: string - proposal_type: - type: string - example: text - proposer: - type: string - description: bech32 encoded address - example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - initial_deposit: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - responses: - '200': - description: Tx was succesfully generated - schema: - 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: stake - 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' - '400': - description: Invalid proposal body - '500': - description: Internal Server Error - get: - deprecated: true - summary: Query proposals - description: Query proposals information with parameters - produces: - - application/json - tags: - - Governance - parameters: - - in: query - name: voter - description: voter address - required: false - type: string - - in: query - name: depositor - description: depositor address - required: false - type: string - - in: query - name: status - description: >- - proposal status, valid values can be `"deposit_period"`, - `"voting_period"`, `"passed"`, `"rejected"` - required: false - type: string - responses: - '200': - description: OK - schema: - type: array - items: - 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: stake - amount: - type: string - example: '50' - voting_start_time: - type: string - '400': - description: Invalid query parameters - '500': - description: Internal Server Error - /gov/proposals/param_change: - post: - deprecated: true - summary: Generate a parameter change proposal transaction - description: Generate a parameter change proposal transaction - consumes: - - application/json - produces: - - application/json - tags: - - Governance - parameters: - - description: >- - The parameter change proposal body that contains all parameter - changes - name: post_proposal_body - in: body - required: true - schema: - type: object - properties: - base_req: - type: object - properties: - from: - type: string - example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: Sent via Cosmos Voyager 🚀 - chain_id: - type: string - example: Cosmos-Hub - 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: stake - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - title: - type: string - x-example: Param Change - description: - type: string - x-example: Update max validators - proposer: - type: string - description: bech32 encoded address - example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - deposit: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - changes: - type: array - items: - type: object - properties: - subspace: - type: string - example: staking - key: - type: string - example: MaxValidators - subkey: - type: string - example: '' - value: - type: object - responses: - '200': - description: The transaction was succesfully generated - schema: - 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: stake - 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' - '400': - description: Invalid proposal body - '500': - description: Internal Server Error - /gov/proposals/{proposalId}: - get: - deprecated: true - summary: Query a proposal - description: Query a proposal by id - produces: - - application/json - tags: - - Governance - parameters: - - type: string - name: proposalId - required: true - in: path - x-example: '2' - responses: - '200': - description: OK - schema: - 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: stake - amount: - type: string - example: '50' - voting_start_time: - type: string - '400': - description: Invalid proposal id - '500': - description: Internal Server Error - /gov/proposals/{proposalId}/proposer: - get: - deprecated: true - summary: Query proposer - description: Query for the proposer for a proposal - produces: - - application/json - tags: - - Governance - parameters: - - type: string - name: proposalId - required: true - in: path - x-example: '2' - responses: - '200': - description: OK - schema: - type: object - properties: - proposal_id: - type: string - proposer: - type: string - '400': - description: Invalid proposal ID - '500': - description: Internal Server Error - /gov/proposals/{proposalId}/deposits: - get: - deprecated: true - summary: Query deposits - description: Query deposits by proposalId - produces: - - application/json - tags: - - Governance - parameters: - - type: string - name: proposalId - required: true - in: path - x-example: '2' - responses: - '200': - description: OK - schema: - type: array - items: - type: object - properties: - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - proposal_id: - type: string - depositor: - type: string - description: bech32 encoded address - example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - '400': - description: Invalid proposal id - '500': - description: Internal Server Error - post: - deprecated: true - summary: Deposit tokens to a proposal - description: Send transaction to deposit tokens to a proposal - consumes: - - application/json - produces: - - application/json - tags: - - Governance - parameters: - - type: string - description: proposal id - name: proposalId - required: true - in: path - x-example: '2' - - description: '' - name: post_deposit_body - in: body - required: true - schema: - type: object - properties: - base_req: - type: object - properties: - from: - type: string - example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: Sent via Cosmos Voyager 🚀 - chain_id: - type: string - example: Cosmos-Hub - 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: stake - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - depositor: - type: string - description: bech32 encoded address - example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - responses: - '200': - description: OK - schema: - 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: stake - 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' - '400': - description: Invalid proposal id or deposit body - '401': - description: Key password is wrong - '500': - description: Internal Server Error - /gov/proposals/{proposalId}/deposits/{depositor}: - get: - deprecated: true - summary: Query deposit - description: Query deposit by proposalId and depositor address - produces: - - application/json - tags: - - Governance - parameters: - - type: string - description: proposal id - name: proposalId - required: true - in: path - x-example: '2' - - type: string - description: Bech32 depositor address - name: depositor - required: true - in: path - x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv - responses: - '200': - description: OK - schema: - type: object - properties: - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - proposal_id: - type: string - depositor: - type: string - description: bech32 encoded address - example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - '400': - description: Invalid proposal id or depositor address - '404': - description: Found no deposit - '500': - description: Internal Server Error - /gov/proposals/{proposalId}/votes: - get: - deprecated: true - summary: Query voters - description: Query voters information by proposalId - produces: - - application/json - tags: - - Governance - parameters: - - type: string - description: proposal id - name: proposalId - required: true - in: path - x-example: '2' - responses: - '200': - description: OK - schema: - type: array - items: - type: object - properties: - voter: - type: string - proposal_id: - type: string - option: - type: string - '400': - description: Invalid proposal id - '500': - description: Internal Server Error - post: - deprecated: true - summary: Vote a proposal - description: Send transaction to vote a proposal - consumes: - - application/json - produces: - - application/json - tags: - - Governance - parameters: - - type: string - description: proposal id - name: proposalId - required: true - in: path - x-example: '2' - - description: >- - valid value of `"option"` field can be `"yes"`, `"no"`, - `"no_with_veto"` and `"abstain"` - name: post_vote_body - in: body - required: true - schema: - type: object - properties: - base_req: - type: object - properties: - from: - type: string - example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: Sent via Cosmos Voyager 🚀 - chain_id: - type: string - example: Cosmos-Hub - 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: stake - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - voter: - type: string - description: bech32 encoded address - example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - option: - type: string - example: 'yes' - responses: - '200': - description: OK - schema: - 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: stake - 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' - '400': - description: Invalid proposal id or vote body - '401': - description: Key password is wrong - '500': - description: Internal Server Error - /gov/proposals/{proposalId}/votes/{voter}: - get: - deprecated: true - summary: Query vote - description: Query vote information by proposal Id and voter address - produces: - - application/json - tags: - - Governance - parameters: - - type: string - description: proposal id - name: proposalId - required: true - in: path - x-example: '2' - - type: string - description: Bech32 voter address - name: voter - required: true - in: path - x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv - responses: - '200': - description: OK - schema: - type: object - properties: - voter: - type: string - proposal_id: - type: string - option: - type: string - '400': - description: Invalid proposal id or voter address - '404': - description: Found no vote - '500': - description: Internal Server Error - /gov/proposals/{proposalId}/tally: - get: - deprecated: true - summary: Get a proposal's tally result at the current time - description: >- - Gets a proposal's tally result at the current time. If the proposal is - pending deposits (i.e status 'DepositPeriod') it returns an empty tally - result. - produces: - - application/json - tags: - - Governance - parameters: - - type: string - description: proposal id - name: proposalId - required: true - in: path - x-example: '2' - responses: - '200': - description: OK - schema: - 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' - '400': - description: Invalid proposal id - '500': - description: Internal Server Error - /gov/parameters/deposit: - get: - deprecated: true - summary: Query governance deposit parameters - description: >- - Query governance deposit parameters. The max_deposit_period units are in - nanoseconds. - produces: - - application/json - tags: - - Governance - responses: - '200': - description: OK - schema: - type: object - properties: - min_deposit: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - max_deposit_period: - type: string - example: '86400000000000' - '400': - description: is not a valid query request path - '404': - description: Found no deposit parameters - '500': - description: Internal Server Error - /gov/parameters/tallying: - get: - deprecated: true - summary: Query governance tally parameters - description: Query governance tally parameters - produces: - - application/json - tags: - - Governance - responses: - '200': - description: OK - schema: - properties: - threshold: - type: string - example: '0.5000000000' - veto: - type: string - example: '0.3340000000' - governance_penalty: - type: string - example: '0.0100000000' - '400': - description: is not a valid query request path - '404': - description: Found no tally parameters - '500': - description: Internal Server Error - /gov/parameters/voting: - get: - deprecated: true - summary: Query governance voting parameters - description: >- - Query governance voting parameters. The voting_period units are in - nanoseconds. - produces: - - application/json - tags: - - Governance - responses: - '200': - description: OK - schema: - properties: - voting_period: - type: string - example: '86400000000000' - '400': - description: is not a valid query request path - '404': - description: Found no voting parameters - '500': - description: Internal Server Error - /distribution/delegators/{delegatorAddr}/rewards: - parameters: - - in: path - name: delegatorAddr - description: Bech32 AccAddress of Delegator - required: true - type: string - x-example: cosmos167w96tdvmazakdwkw2u57227eduula2cy572lf - get: - deprecated: true - summary: Get the total rewards balance from all delegations - description: >- - Get the sum of all the rewards earned by delegations by a single - delegator - produces: - - application/json - tags: - - Distribution - responses: - '200': - description: OK - schema: - type: object - properties: - rewards: - type: array - items: - type: object - properties: - validator_address: - type: string - description: bech32 encoded address - example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - reward: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - total: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - '400': - description: Invalid delegator address - '500': - description: Internal Server Error - post: - deprecated: true - summary: Withdraw all the delegator's delegation rewards - description: Withdraw all the delegator's delegation rewards - tags: - - Distribution - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: Withdraw request body - schema: - properties: - base_req: - type: object - properties: - from: - type: string - example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: Sent via Cosmos Voyager 🚀 - chain_id: - type: string - example: Cosmos-Hub - 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: stake - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - responses: - '200': - description: OK - schema: - 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: stake - 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' - '400': - description: Invalid delegator address - '401': - description: Key password is wrong - '500': - description: Internal Server Error - /distribution/delegators/{delegatorAddr}/rewards/{validatorAddr}: - parameters: - - in: path - name: delegatorAddr - description: Bech32 AccAddress of Delegator - required: true - type: string - x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv - - in: path - name: validatorAddr - description: Bech32 OperatorAddress of validator - required: true - type: string - x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - get: - deprecated: true - summary: Query a delegation reward - description: Query a single delegation reward by a delegator - tags: - - Distribution - produces: - - application/json - responses: - '200': - description: OK - schema: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - '400': - description: Invalid delegator address - '500': - description: Internal Server Error - post: - deprecated: true - summary: Withdraw a delegation reward - description: Withdraw a delegator's delegation reward from a single validator - tags: - - Distribution - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: Withdraw request body - schema: - properties: - base_req: - type: object - properties: - from: - type: string - example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: Sent via Cosmos Voyager 🚀 - chain_id: - type: string - example: Cosmos-Hub - 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: stake - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - responses: - '200': - description: OK - schema: - 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: stake - 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' - '400': - description: Invalid delegator address or delegation body - '401': - description: Key password is wrong - '500': - description: Internal Server Error - /distribution/delegators/{delegatorAddr}/withdraw_address: - parameters: - - in: path - name: delegatorAddr - description: Bech32 AccAddress of Delegator - required: true - type: string - x-example: cosmos167w96tdvmazakdwkw2u57227eduula2cy572lf - get: - deprecated: true - summary: Get the rewards withdrawal address - description: >- - Get the delegations' rewards withdrawal address. This is the address in - which the user will receive the reward funds - tags: - - Distribution - produces: - - application/json - responses: - '200': - description: OK - schema: - type: string - description: bech32 encoded address - example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - '400': - description: Invalid delegator address - '500': - description: Internal Server Error - post: - deprecated: true - summary: Replace the rewards withdrawal address - description: Replace the delegations' rewards withdrawal address for a new one. - tags: - - Distribution - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: Withdraw request body - schema: - properties: - base_req: - type: object - properties: - from: - type: string - example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: Sent via Cosmos Voyager 🚀 - chain_id: - type: string - example: Cosmos-Hub - 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: stake - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - withdraw_address: - type: string - description: bech32 encoded address - example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - responses: - '200': - description: OK - schema: - 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: stake - 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' - '400': - description: Invalid delegator or withdraw address - '401': - description: Key password is wrong - '500': - description: Internal Server Error - /distribution/validators/{validatorAddr}: - parameters: - - in: path - name: validatorAddr - description: Bech32 OperatorAddress of validator - required: true - type: string - x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - get: - deprecated: true - summary: Validator distribution information - description: Query the distribution information of a single validator - tags: - - Distribution - produces: - - application/json - responses: - '200': - description: OK - schema: - type: object - properties: - operator_address: - type: string - description: bech32 encoded address - example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - self_bond_rewards: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - val_commission: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - '400': - description: Invalid validator address - '500': - description: Internal Server Error - /distribution/validators/{validatorAddr}/outstanding_rewards: - parameters: - - in: path - name: validatorAddr - description: Bech32 OperatorAddress of validator - required: true - type: string - x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - get: - deprecated: true - summary: Fee distribution outstanding rewards of a single validator - tags: - - Distribution - produces: - - application/json - responses: - '200': - description: OK - schema: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - '500': - description: Internal Server Error - /distribution/validators/{validatorAddr}/rewards: - parameters: - - in: path - name: validatorAddr - description: Bech32 OperatorAddress of validator - required: true - type: string - x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - get: - deprecated: true - summary: Commission and self-delegation rewards of a single validator - description: Query the commission and self-delegation rewards of validator. - tags: - - Distribution - produces: - - application/json - responses: - '200': - description: OK - schema: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - '400': - description: Invalid validator address - '500': - description: Internal Server Error - post: - deprecated: true - summary: Withdraw the validator's rewards - description: Withdraw the validator's self-delegation and commissions rewards - tags: - - Distribution - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: Withdraw request body - schema: - properties: - base_req: - type: object - properties: - from: - type: string - example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: Sent via Cosmos Voyager 🚀 - chain_id: - type: string - example: Cosmos-Hub - 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: stake - amount: - type: string - example: '50' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - responses: - '200': - description: OK - schema: - 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: stake - 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' - '400': - description: Invalid validator address - '401': - description: Key password is wrong - '500': - description: Internal Server Error - /distribution/community_pool: - get: - deprecated: true - summary: Community pool parameters - tags: - - Distribution - produces: - - application/json - responses: - '200': - description: OK - schema: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - '500': - description: Internal Server Error - /distribution/parameters: - get: - deprecated: true - summary: Fee distribution parameters - tags: - - Distribution - produces: - - application/json - responses: - '200': - description: OK - schema: - properties: - base_proposer_reward: - type: string - bonus_proposer_reward: - type: string - community_tax: - type: string - '500': - description: Internal Server Error - /minting/parameters: - get: - deprecated: true - summary: Minting module parameters - tags: - - Mint - produces: - - application/json - responses: - '200': - description: OK - schema: - properties: - mint_denom: - type: string - inflation_rate_change: - type: string - inflation_max: - type: string - inflation_min: - type: string - goal_bonded: - type: string - blocks_per_year: - type: string - '500': - description: Internal Server Error - /minting/inflation: - get: - deprecated: true - summary: Current minting inflation value - tags: - - Mint - produces: - - application/json - responses: - '200': - description: OK - schema: - type: string - '500': - description: Internal Server Error - /minting/annual-provisions: - get: - deprecated: true - summary: Current minting annual provisions value - tags: - - Mint - produces: - - application/json - responses: - '200': - description: OK - schema: - type: string - '500': - description: Internal Server Error /cosmos/auth/v1beta1/accounts: get: summary: Accounts returns all the existing accounts + description: 'Since: cosmos-sdk 0.43' operationId: Accounts responses: '200': @@ -17790,9 +13187,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -17804,8 +13202,11 @@ paths: description: >- QueryAccountsResponse is the response type for the Query/Accounts RPC method. + + + Since: cosmos-sdk 0.43 default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -18040,15 +13441,16 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Cosmos SDK /cosmos/auth/v1beta1/accounts/{address}: @@ -18236,7 +13638,7 @@ paths: QueryAccountResponse is the response type for the Query/Account RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -18432,6 +13834,1631 @@ paths: type: string tags: - Cosmos SDK + /cosmos/auth/v1beta1/address_by_id/{id}: + get: + summary: AccountAddressByID returns account address based on account number. + description: 'Since: cosmos-sdk 0.46.2' + operationId: AccountAddressByID + responses: + '200': + description: A successful response. + schema: + type: object + properties: + account_address: + type: string + description: 'Since: cosmos-sdk 0.46.2' + title: >- + QueryAccountAddressByIDResponse is the response type for + AccountAddressByID 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 + + 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: id + description: |- + id is the account number of the address to be queried. This field + should have been an uint64 (like all account numbers), and will be + updated to uint64 in a future version of the auth query. + in: path + required: true + type: string + format: int64 + tags: + - Cosmos SDK + /cosmos/auth/v1beta1/bech32: + get: + summary: Bech32Prefix queries bech32Prefix + description: 'Since: cosmos-sdk 0.46' + operationId: Bech32Prefix + responses: + '200': + description: A successful response. + schema: + type: object + properties: + bech32_prefix: + type: string + description: >- + Bech32PrefixResponse is the response type for Bech32Prefix rpc + method. + + + Since: cosmos-sdk 0.46 + 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" + } + tags: + - Cosmos SDK + /cosmos/auth/v1beta1/bech32/{address_bytes}: + get: + summary: AddressBytesToString converts Account Address bytes to string + description: 'Since: cosmos-sdk 0.46' + operationId: AddressBytesToString + responses: + '200': + description: A successful response. + schema: + type: object + properties: + address_string: + type: string + description: >- + AddressBytesToStringResponse is the response type for + AddressString rpc method. + + + Since: cosmos-sdk 0.46 + 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: address_bytes + in: path + required: true + type: string + format: byte + tags: + - Cosmos SDK + /cosmos/auth/v1beta1/bech32/{address_string}: + get: + summary: AddressStringToBytes converts Address string to bytes + description: 'Since: cosmos-sdk 0.46' + operationId: AddressStringToBytes + responses: + '200': + description: A successful response. + schema: + type: object + properties: + address_bytes: + type: string + format: byte + description: >- + AddressStringToBytesResponse is the response type for AddressBytes + rpc method. + + + Since: cosmos-sdk 0.46 + 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: address_string + in: path + required: true + type: string + tags: + - Cosmos SDK + /cosmos/auth/v1beta1/module_accounts: + get: + summary: ModuleAccounts returns all the existing module accounts. + description: 'Since: cosmos-sdk 0.46' + operationId: ModuleAccounts + responses: + '200': + description: A successful response. + schema: + type: object + properties: + accounts: + 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: >- + QueryModuleAccountsResponse is the response type for the + Query/ModuleAccounts RPC method. + + + Since: cosmos-sdk 0.46 + 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" + } + tags: + - Cosmos SDK + /cosmos/auth/v1beta1/module_accounts/{name}: + get: + summary: ModuleAccountByName returns the module account info by module name + operationId: ModuleAccountByName + responses: + '200': + description: A successful response. + schema: + type: object + properties: + account: + 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: >- + QueryModuleAccountByNameResponse is the response type for the + Query/ModuleAccountByName 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 + + 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: name + in: path + required: true + type: string + tags: + - Cosmos SDK /cosmos/auth/v1beta1/params: get: summary: Params queries all parameters. @@ -18465,7 +15492,7 @@ paths: QueryParamsResponse is the response type for the Query/Params RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -18690,9 +15717,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -18707,7 +15735,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -18780,18 +15808,19 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Cosmos SDK - /cosmos/bank/v1beta1/balances/{address}/{denom}: + /cosmos/bank/v1beta1/balances/{address}/by_denom: get: summary: Balance queries the balance of a single coin for a single account. operationId: Balance @@ -18820,7 +15849,7 @@ paths: QueryBalanceResponse is the response type for the Query/Balance RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -18849,8 +15878,8 @@ paths: type: string - name: denom description: denom is the coin denom to query balances for. - in: path - required: true + in: query + required: false type: string tags: - Cosmos SDK @@ -18861,6 +15890,7 @@ paths: token denomination. + description: 'Since: cosmos-sdk 0.46' operationId: DenomOwners responses: '200': @@ -18901,6 +15931,9 @@ paths: address and account balance of the denominated token. + + + Since: cosmos-sdk 0.46 pagination: description: pagination defines the pagination in the response. type: object @@ -18908,9 +15941,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -18922,8 +15956,11 @@ paths: description: >- QueryDenomOwnersResponse defines the RPC response of a DenomOwners RPC query. + + + Since: cosmos-sdk 0.46 default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -18998,15 +16035,16 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Cosmos SDK /cosmos/bank/v1beta1/denoms_metadata: @@ -19048,7 +16086,7 @@ paths: raise the base_denom to in order to equal the given DenomUnit's denom - 1 denom = 1^exponent base_denom + 1 denom = 10^exponent base_denom (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with @@ -19079,6 +16117,7 @@ paths: displayed in clients. name: type: string + description: 'Since: cosmos-sdk 0.43' title: 'name defines the name of the token (eg: Cosmos Atom)' symbol: type: string @@ -19087,11 +16126,17 @@ paths: (eg: ATOM). This can be the same as the display. + + + Since: cosmos-sdk 0.43 uri: type: string description: >- URI to a document (on or off-chain) that contains additional information. Optional. + + + Since: cosmos-sdk 0.46 uri_hash: type: string description: >- @@ -19099,6 +16144,9 @@ paths: It's used to verify that the document didn't change. Optional. + + + Since: cosmos-sdk 0.46 description: |- Metadata represents a struct that describes a basic token. @@ -19112,9 +16160,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -19129,7 +16178,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -19197,15 +16246,16 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Cosmos SDK /cosmos/bank/v1beta1/denoms_metadata/{denom}: @@ -19243,7 +16293,7 @@ paths: raise the base_denom to in order to equal the given DenomUnit's denom - 1 denom = 1^exponent base_denom + 1 denom = 10^exponent base_denom (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with @@ -19274,6 +16324,7 @@ paths: displayed in clients. name: type: string + description: 'Since: cosmos-sdk 0.43' title: 'name defines the name of the token (eg: Cosmos Atom)' symbol: type: string @@ -19282,11 +16333,17 @@ paths: ATOM). This can be the same as the display. + + + Since: cosmos-sdk 0.43 uri: type: string description: >- URI to a document (on or off-chain) that contains additional information. Optional. + + + Since: cosmos-sdk 0.46 uri_hash: type: string description: >- @@ -19294,6 +16351,9 @@ paths: It's used to verify that the document didn't change. Optional. + + + Since: cosmos-sdk 0.46 description: |- Metadata represents a struct that describes a basic token. @@ -19303,7 +16363,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -19354,7 +16414,6 @@ paths: type: string enabled: type: boolean - format: boolean description: >- SendEnabled maps coin denom to a send_enabled status (whether a denom is @@ -19362,13 +16421,12 @@ paths: 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 + description: An unexpected error response. schema: type: object properties: @@ -19391,6 +16449,150 @@ paths: format: byte tags: - Cosmos SDK + /cosmos/bank/v1beta1/spendable_balances/{address}: + get: + summary: |- + SpendableBalances queries the spenable balance of all coins for a single + account. + description: 'Since: cosmos-sdk 0.46' + operationId: SpendableBalances + 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 spendable balances of all the coins. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QuerySpendableBalancesResponse defines the gRPC response structure + for querying + + an account's spendable balances. + + + Since: cosmos-sdk 0.46 + 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 spendable balances for. + in: path + required: true + type: string + - 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 + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Cosmos SDK /cosmos/bank/v1beta1/supply: get: summary: TotalSupply queries the total supply of all coins. @@ -19420,15 +16622,19 @@ paths: signatures required by gogoproto. title: supply is the supply of the coins pagination: - description: pagination defines the pagination in the response. + description: |- + pagination defines the pagination in the response. + + Since: cosmos-sdk 0.43 type: object properties: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -19443,7 +16649,7 @@ paths: method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -19511,18 +16717,19 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Cosmos SDK - /cosmos/bank/v1beta1/supply/{denom}: + /cosmos/bank/v1beta1/supply/by_denom: get: summary: SupplyOf queries the supply of a single coin. operationId: SupplyOf @@ -19551,7 +16758,7 @@ paths: QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -19575,11 +16782,308 @@ paths: parameters: - name: denom description: denom is the coin denom to query balances for. - in: path - required: true + in: query + required: false type: string tags: - Cosmos SDK + /cosmos/base/tendermint/v1beta1/abci_query: + get: + summary: >- + ABCIQuery defines a query handler that supports ABCI queries directly to + + the application, bypassing Tendermint completely. The ABCI query must + + contain a valid and supported path, including app, custom, p2p, and + store. + description: 'Since: cosmos-sdk 0.46' + operationId: ABCIQuery + responses: + '200': + description: A successful response. + schema: + type: object + properties: + code: + type: integer + format: int64 + log: + type: string + info: + type: string + index: + type: string + format: int64 + key: + type: string + format: byte + value: + type: string + format: byte + proof_ops: + type: object + properties: + ops: + type: array + items: + type: object + properties: + type: + type: string + key: + type: string + format: byte + data: + type: string + format: byte + description: >- + ProofOp defines an operation used for calculating Merkle + root. The data could + + be arbitrary format, providing nessecary data for + example neighbouring node + + hash. + + + Note: This type is a duplicate of the ProofOp proto type + defined in + + Tendermint. + description: >- + ProofOps is Merkle proof defined by the list of ProofOps. + + + Note: This type is a duplicate of the ProofOps proto type + defined in + + Tendermint. + height: + type: string + format: int64 + codespace: + type: string + description: >- + ABCIQueryResponse defines the response structure for the ABCIQuery + gRPC + + query. + + + Note: This type is a duplicate of the ResponseQuery proto type + defined in + + Tendermint. + 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: data + in: query + required: false + type: string + format: byte + - name: path + in: query + required: false + type: string + - name: height + in: query + required: false + type: string + format: int64 + - name: prove + in: query + required: false + type: boolean + tags: + - Service /cosmos/base/tendermint/v1beta1/blocks/latest: get: summary: GetLatestBlock returns the latest block. @@ -19608,6 +17112,7 @@ paths: title: PartsetHeader title: BlockID block: + title: 'Deprecated: please use `sdk_block` instead' type: object properties: header: @@ -20144,11 +17649,563 @@ paths: description: >- Commit contains the evidence that a block was committed by a set of validators. + sdk_block: + title: 'Since: cosmos-sdk 0.47' + 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 + description: >- + proposer_address is the original block proposer + address, formatted as a Bech32 string. + + In Tendermint, this type is `bytes`, but in the SDK, + we convert it to a Bech32 string + + for better UX. + 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: + 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: >- + Block is tendermint type Block, with the Header proposer + address + + field converted to bech32 string. description: >- GetLatestBlockResponse is the response type for the - Query/GetLatestBlock RPC method. + Query/GetLatestBlock RPC + + method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -20366,6 +18423,7 @@ paths: title: PartsetHeader title: BlockID block: + title: 'Deprecated: please use `sdk_block` instead' type: object properties: header: @@ -20902,11 +18960,563 @@ paths: description: >- Commit contains the evidence that a block was committed by a set of validators. + sdk_block: + title: 'Since: cosmos-sdk 0.47' + 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 + description: >- + proposer_address is the original block proposer + address, formatted as a Bech32 string. + + In Tendermint, this type is `bytes`, but in the SDK, + we convert it to a Bech32 string + + for better UX. + 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: + 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: >- + Block is tendermint type Block, with the Header proposer + address + + field converted to bech32 string. description: >- GetBlockByHeightResponse is the response type for the - Query/GetBlockByHeight RPC method. + Query/GetBlockByHeight + + RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -21179,12 +19789,15 @@ paths: title: Module is the type for VersionInfo cosmos_sdk_version: type: string + title: 'Since: cosmos-sdk 0.43' description: VersionInfo is the type for the GetNodeInfoResponse message. description: >- - GetNodeInfoResponse is the request type for the Query/GetNodeInfo - RPC method. + GetNodeInfoResponse is the response type for the Query/GetNodeInfo + RPC + + method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -21386,12 +19999,11 @@ paths: properties: syncing: type: boolean - format: boolean description: >- GetSyncingResponse is the response type for the Query/GetSyncing RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -21792,9 +20404,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -21803,11 +20416,11 @@ paths: PageRequest.count_total was set, its value is undefined otherwise - description: >- + description: |- GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -22042,15 +20655,16 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Service /cosmos/base/tendermint/v1beta1/validatorsets/{height}: @@ -22264,9 +20878,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -22275,11 +20890,11 @@ paths: PageRequest.count_total was set, its value is undefined otherwise - description: >- + description: |- GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -22519,15 +21134,16 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Service /cosmos/distribution/v1beta1/community_pool: @@ -22565,7 +21181,7 @@ paths: RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -22652,7 +21268,7 @@ paths: QueryDelegationTotalRewardsResponse is the response type for the Query/DelegationTotalRewards RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -22714,7 +21330,7 @@ paths: QueryDelegationRewardsResponse is the response type for the Query/DelegationRewards RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -22769,7 +21385,7 @@ paths: QueryDelegatorValidatorsResponse is the response type for the Query/DelegatorValidators RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -22815,7 +21431,7 @@ paths: QueryDelegatorWithdrawAddressResponse is the response type for the Query/DelegatorWithdrawAddress RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -22866,12 +21482,11 @@ paths: type: string withdraw_addr_enabled: type: boolean - format: boolean description: >- QueryParamsResponse is the response type for the Query/Params RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -22930,7 +21545,7 @@ paths: QueryValidatorCommissionResponse is the response type for the Query/ValidatorCommission RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -23002,7 +21617,7 @@ paths: Query/ValidatorOutstandingRewards RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -23069,9 +21684,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -23084,7 +21700,7 @@ paths: QueryValidatorSlashesResponse is the response type for the Query/ValidatorSlashes RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -23173,15 +21789,16 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Cosmos SDK /cosmos/evidence/v1beta1/evidence: @@ -23379,9 +21996,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -23396,7 +22014,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -23631,15 +22249,16 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Cosmos SDK /cosmos/evidence/v1beta1/evidence/{evidence_hash}: @@ -23827,7 +22446,7 @@ paths: QueryEvidenceResponse is the response type for the Query/Evidence RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -24097,7 +22716,7 @@ paths: QueryParamsResponse is the response type for the Query/Params RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -24506,7 +23125,7 @@ paths: ProposalStatus enumerates the valid statuses of a proposal. - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal 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 @@ -24518,6 +23137,14 @@ paths: - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has failed. final_tally_result: + description: >- + final_tally_result is the final tally result of the + proposal. When + + querying a proposal via gRPC, this field is not + populated until the + + proposal's voting period has ended. type: object properties: 'yes': @@ -24528,9 +23155,6 @@ paths: type: string no_with_veto: type: string - description: >- - TallyResult defines a standard tally for a governance - proposal. submit_time: type: string format: date-time @@ -24571,9 +23195,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -24588,7 +23213,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -24781,7 +23406,7 @@ paths: description: |- proposal_status defines the status of the proposals. - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal 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 @@ -24859,15 +23484,16 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Cosmos SDK /cosmos/gov/v1beta1/proposals/{proposal_id}: @@ -25075,7 +23701,7 @@ paths: ProposalStatus enumerates the valid statuses of a proposal. - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal 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 @@ -25087,6 +23713,14 @@ paths: - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has failed. final_tally_result: + description: >- + final_tally_result is the final tally result of the + proposal. When + + querying a proposal via gRPC, this field is not populated + until the + + proposal's voting period has ended. type: object properties: 'yes': @@ -25097,9 +23731,6 @@ paths: type: string no_with_veto: type: string - description: >- - TallyResult defines a standard tally for a governance - proposal. submit_time: type: string format: date-time @@ -25136,7 +23767,7 @@ paths: QueryProposalResponse is the response type for the Query/Proposal RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -25383,9 +24014,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -25398,7 +24030,7 @@ paths: QueryDepositsResponse is the response type for the Query/Deposits RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -25639,15 +24271,16 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Cosmos SDK /cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}: @@ -25696,7 +24329,7 @@ paths: QueryDepositResponse is the response type for the Query/Deposit RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -25909,6 +24542,7 @@ paths: type: object properties: tally: + description: tally defines the requested tally. type: object properties: 'yes': @@ -25919,14 +24553,11 @@ paths: type: string no_with_veto: type: string - description: >- - TallyResult defines a standard tally for a governance - proposal. description: >- QueryTallyResultResponse is the response type for the Query/Tally RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -26189,6 +24820,10 @@ paths: description: >- WeightedVoteOption defines a unit of vote for vote split. + + + Since: cosmos-sdk 0.43 + title: 'Since: cosmos-sdk 0.43' description: >- Vote defines a vote on a governance proposal. @@ -26202,9 +24837,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -26217,7 +24853,7 @@ paths: QueryVotesResponse is the response type for the Query/Votes RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -26458,15 +25094,16 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Cosmos SDK /cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}: @@ -26533,6 +25170,10 @@ paths: description: >- WeightedVoteOption defines a unit of vote for vote split. + + + Since: cosmos-sdk 0.43 + title: 'Since: cosmos-sdk 0.43' description: >- Vote defines a vote on a governance proposal. @@ -26542,7 +25183,7 @@ paths: QueryVoteResponse is the response type for the Query/Vote RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -26738,7 +25379,2728 @@ paths: type: string format: uint64 - name: voter - description: voter defines the oter address for the proposals. + description: voter defines the voter address for the proposals. + in: path + required: true + type: string + tags: + - Cosmos SDK + /cosmos/gov/v1/params/{params_type}: + get: + summary: Params queries all parameters of the gov module. + operationId: GovV1Params + responses: + '200': + description: A successful response. + schema: + 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 + description: >- + Minimum percentage of total stake needed to vote for a + result to be + considered valid. + threshold: + type: string + description: >- + Minimum proportion of Yes votes for proposal to pass. + Default value: 0.5. + veto_threshold: + type: string + 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. + 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: params_type + description: >- + params_type defines which parameters to query for, can be one of + "voting", + + "tallying" or "deposit". + in: path + required: true + type: string + tags: + - Cosmos SDK + /cosmos/gov/v1/proposals: + get: + summary: Proposals queries all proposals based on given status. + operationId: GovV1Proposal + responses: + '200': + description: A successful response. + schema: + type: object + properties: + proposals: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + 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" + } + 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 proposal 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: + description: >- + final_tally_result is the final tally result of the + proposal. When + + querying a proposal via gRPC, this field is not + populated until the + + proposal's voting period has ended. + type: object + properties: + yes_count: + type: string + abstain_count: + type: string + no_count: + type: string + no_with_veto_count: + type: string + 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. + + + 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 + metadata: + type: string + description: >- + metadata is any arbitrary metadata attached to the + proposal. + 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 + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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. + 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: proposal_status + description: |- + proposal_status defines the status of the proposals. + + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal 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. + in: query + required: false + 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 + - name: voter + description: voter defines the voter address for the proposals. + in: query + required: false + type: string + - name: depositor + description: depositor defines the deposit addresses from the proposals. + in: query + required: false + type: string + - 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 + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Cosmos SDK + /cosmos/gov/v1/proposals/{proposal_id}: + get: + summary: Proposal queries proposal details based on ProposalID. + operationId: GovV1Proposal + responses: + '200': + description: A successful response. + schema: + type: object + properties: + proposal: + type: object + properties: + id: + type: string + format: uint64 + 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" + } + 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 proposal 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: + description: >- + final_tally_result is the final tally result of the + proposal. When + + querying a proposal via gRPC, this field is not populated + until the + + proposal's voting period has ended. + type: object + properties: + yes_count: + type: string + abstain_count: + type: string + no_count: + type: string + no_with_veto_count: + type: string + 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. + + + 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 + metadata: + type: string + description: >- + metadata is any arbitrary metadata attached to the + proposal. + description: >- + Proposal defines the core field members of a governance + proposal. + description: >- + QueryProposalResponse is the response type for the Query/Proposal + 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 + + 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: proposal_id + description: proposal_id defines the unique id of the proposal. + in: path + required: true + type: string + format: uint64 + tags: + - Cosmos SDK + /cosmos/gov/v1/proposals/{proposal_id}/deposits: + get: + summary: Deposits queries all deposits of a single proposal. + operationId: GovV1Deposit + responses: + '200': + description: A successful response. + schema: + type: object + properties: + deposits: + type: array + items: + 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. + + + 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 + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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. + 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: proposal_id + description: proposal_id defines the unique id of the proposal. + in: path + required: true + type: string + format: uint64 + - 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 + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Cosmos SDK + /cosmos/gov/v1/proposals/{proposal_id}/deposits/{depositor}: + get: + summary: >- + Deposit queries single deposit information based proposalID, + depositAddr. + operationId: GovV1Deposit + responses: + '200': + description: A successful response. + schema: + 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. + + + 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. + description: >- + QueryDepositResponse is the response type for the Query/Deposit + 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 + + 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: proposal_id + description: proposal_id defines the unique id of the proposal. + in: path + required: true + type: string + format: uint64 + - name: depositor + description: depositor defines the deposit addresses from the proposals. + in: path + required: true + type: string + tags: + - Cosmos SDK + /cosmos/gov/v1/proposals/{proposal_id}/tally: + get: + summary: TallyResult queries the tally of a proposal vote. + operationId: GovV1TallyResult + responses: + '200': + description: A successful response. + schema: + type: object + properties: + tally: + description: tally defines the requested tally. + type: object + properties: + yes_count: + type: string + abstain_count: + type: string + no_count: + type: string + no_with_veto_count: + type: string + description: >- + QueryTallyResultResponse is the response type for the Query/Tally + 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 + + 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: proposal_id + description: proposal_id defines the unique id of the proposal. + in: path + required: true + type: string + format: uint64 + tags: + - Cosmos SDK + /cosmos/gov/v1/proposals/{proposal_id}/votes: + get: + summary: Votes queries votes of a given proposal. + operationId: GovV1Votes + responses: + '200': + description: A successful response. + schema: + type: object + properties: + votes: + type: array + items: + type: object + properties: + proposal_id: + type: string + 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. + + - 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. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + vote. + 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. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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. + 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: proposal_id + description: proposal_id defines the unique id of the proposal. + in: path + required: true + type: string + format: uint64 + - 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 + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Cosmos SDK + /cosmos/gov/v1/proposals/{proposal_id}/votes/{voter}: + get: + summary: Vote queries voted information based on proposalID, voterAddr. + operationId: GovV1Vote + responses: + '200': + description: A successful response. + schema: + type: object + properties: + vote: + type: object + properties: + proposal_id: + type: string + 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. + + - 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. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + vote. + 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. + 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: proposal_id + description: proposal_id defines the unique id of the proposal. + in: path + required: true + type: string + format: uint64 + - name: voter + description: voter defines the voter address for the proposals. in: path required: true type: string @@ -26764,7 +28126,7 @@ paths: QueryAnnualProvisionsResponse is the response type for the Query/AnnualProvisions RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -26807,7 +28169,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -26867,7 +28229,7 @@ paths: QueryParamsResponse is the response type for the Query/Params RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -26916,7 +28278,7 @@ paths: QueryParamsResponse is response type for the Query/Params RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -26950,6 +28312,70 @@ paths: type: string tags: - Cosmos SDK + /cosmos/params/v1beta1/subspaces: + get: + summary: >- + Subspaces queries for all registered subspaces and all keys for a + subspace. + description: 'Since: cosmos-sdk 0.46' + operationId: Subspaces + responses: + '200': + description: A successful response. + schema: + type: object + properties: + subspaces: + type: array + items: + type: object + properties: + subspace: + type: string + keys: + type: array + items: + type: string + description: >- + Subspace defines a parameter subspace name and all the keys + that exist for + + the subspace. + + + Since: cosmos-sdk 0.46 + description: >- + QuerySubspacesResponse defines the response types for querying for + all + + registered subspaces and all keys for a subspace. + + + Since: cosmos-sdk 0.46 + 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 + tags: + - Cosmos SDK /cosmos/slashing/v1beta1/params: get: summary: Params queries the parameters of slashing module @@ -26984,7 +28410,7 @@ paths: QueryParamsResponse is the response type for the Query/Params RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -27050,7 +28476,6 @@ paths: liveness downtime. tombstoned: type: boolean - format: boolean description: >- Whether or not a validator has been tombstoned (killed out of validator set). It is set @@ -27077,9 +28502,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -27104,7 +28530,7 @@ paths: method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -27172,15 +28598,16 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Cosmos SDK /cosmos/slashing/v1beta1/signing_infos/{cons_address}: @@ -27224,7 +28651,6 @@ paths: liveness downtime. tombstoned: type: boolean - format: boolean description: >- Whether or not a validator has been tombstoned (killed out of validator set). It is set @@ -27253,7 +28679,7 @@ paths: method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -27354,9 +28780,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -27369,7 +28796,7 @@ paths: QueryDelegatorDelegationsResponse is response type for the Query/DelegatorDelegations RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -27609,15 +29036,16 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Cosmos SDK /cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations: @@ -27750,9 +29178,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -27767,7 +29196,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -28017,15 +29446,16 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Cosmos SDK /cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations: @@ -28100,9 +29530,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -28117,7 +29548,7 @@ paths: Query/UnbondingDelegatorDelegations RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -28357,15 +29788,16 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Cosmos SDK /cosmos/staking/v1beta1/delegators/{delegator_addr}/validators: @@ -28569,7 +30001,6 @@ paths: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -28670,6 +30101,9 @@ paths: description: >- min_self_delegation is the validator's self declared minimum self delegation. + + + Since: cosmos-sdk 0.46 description: >- Validator defines a validator, together with the total amount of the @@ -28693,7 +30127,7 @@ paths: bonded shares multiplied by exchange rate. - description: validators defines the the validators' info of a delegator. + description: validators defines the validators' info of a delegator. pagination: description: pagination defines the pagination in the response. type: object @@ -28701,9 +30135,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -28716,7 +30151,7 @@ paths: QueryDelegatorValidatorsResponse is response type for the Query/DelegatorValidators RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -28956,15 +30391,16 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Cosmos SDK /cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}: @@ -29164,7 +30600,6 @@ paths: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -29264,6 +30699,9 @@ paths: description: >- min_self_delegation is the validator's self declared minimum self delegation. + + + Since: cosmos-sdk 0.46 description: >- Validator defines a validator, together with the total amount of the @@ -29291,7 +30729,7 @@ paths: QueryDelegatorValidatorResponse response type for the Query/DelegatorValidator RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -29773,7 +31211,6 @@ paths: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -29875,6 +31312,9 @@ paths: description: >- min_self_delegation is the validator's self declared minimum self delegation. + + + Since: cosmos-sdk 0.46 description: >- Validator defines a validator, together with the total amount of the @@ -29904,7 +31344,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -30137,11 +31577,16 @@ paths: bond_denom: type: string description: bond_denom defines the bondable coin denomination. + min_commission_rate: + type: string + title: >- + min_commission_rate is the chain-wide minimum commission + rate that a validator can charge their delegators description: >- QueryParamsResponse is response type for the Query/Params RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -30351,7 +31796,7 @@ paths: type: string description: QueryPoolResponse is response type for the Query/Pool RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -30740,7 +32185,6 @@ paths: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -30841,6 +32285,9 @@ paths: description: >- min_self_delegation is the validator's self declared minimum self delegation. + + + Since: cosmos-sdk 0.46 description: >- Validator defines a validator, together with the total amount of the @@ -30872,9 +32319,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -30887,7 +32335,7 @@ paths: QueryValidatorsResponse is response type for the Query/Validators RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -31127,15 +32575,16 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Cosmos SDK /cosmos/staking/v1beta1/validators/{validator_addr}: @@ -31333,7 +32782,6 @@ paths: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -31433,6 +32881,9 @@ paths: description: >- min_self_delegation is the validator's self declared minimum self delegation. + + + Since: cosmos-sdk 0.46 description: >- Validator defines a validator, together with the total amount of the @@ -31460,7 +32911,7 @@ paths: QueryValidatorResponse is response type for the Query/Validator RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -31723,9 +33174,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -31738,7 +33190,7 @@ paths: QueryValidatorDelegationsResponse is response type for the Query/ValidatorDelegations RPC method default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -31978,15 +33430,16 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Cosmos SDK /cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}: @@ -32051,7 +33504,7 @@ paths: QueryDelegationResponse is response type for the Query/Delegation RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -32317,7 +33770,7 @@ paths: RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -32588,9 +34041,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -32605,7 +34059,7 @@ paths: Query/ValidatorUnbondingDelegations RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -32845,15 +34299,16 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 in: query required: false type: boolean - format: boolean tags: - Cosmos SDK /cosmos/tx/v1beta1/simulate: @@ -32893,6 +34348,11 @@ paths: length prefixed in order to separate data from multiple message executions. + + Deprecated. This field is still populated, but prefer + msg_response instead + + because it also contains the Msg response typeURL. log: type: string description: >- @@ -32918,7 +34378,6 @@ paths: format: byte index: type: boolean - format: boolean description: >- EventAttribute is a single key-value pair, associated with an event. @@ -32935,11 +34394,196 @@ paths: during message or handler execution. + msg_responses: + 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: >- + msg_responses contains the Msg handler responses type + packed in Anys. + + + Since: cosmos-sdk 0.46 description: |- SimulateResponse is the response type for the Service.SimulateRPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -33145,7 +34789,7 @@ paths: schema: $ref: '#/definitions/cosmos.tx.v1beta1.GetTxsEventResponse' default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -33388,15 +35032,16 @@ paths: in: query required: false type: boolean - format: boolean - name: pagination.reverse description: >- reverse is set to true if results are to be returned in the descending order. + + + Since: cosmos-sdk 0.43 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. @@ -33410,6 +35055,24 @@ paths: - ORDER_BY_ASC - ORDER_BY_DESC default: ORDER_BY_UNSPECIFIED + - name: page + description: >- + page is the page number to query, starts at 1. If not provided, will + default to first page. + in: query + required: false + type: string + format: uint64 + - name: 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 tags: - Service post: @@ -33692,6 +35355,52 @@ paths: For height == 1, it's genesis time. + 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 + 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. + + Later, transactions may be queried using these events. + description: >- + Events defines all the events emitted by processing a + transaction. Note, + + these events include those emitted by processing all the + messages and those + + emitted from the ante. Whereas Logs contains the events, + with + + additional metadata, emitted only by processing the + messages. + + + Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 description: >- TxResponse defines a structure containing relevant tx data and metadata. The @@ -33701,7 +35410,7 @@ paths: BroadcastTxResponse is the response type for the Service.BroadcastTx method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -33926,6 +35635,270 @@ paths: RPC method. tags: - Service + /cosmos/tx/v1beta1/txs/block/{height}: + get: + summary: GetBlockWithTxs fetches a block with decoded txs. + description: 'Since: cosmos-sdk 0.45.2' + operationId: GetBlockWithTxs + responses: + '200': + description: A successful response. + schema: + $ref: '#/definitions/cosmos.tx.v1beta1.GetBlockWithTxsResponse' + 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: height + description: height is the height of the block to query. + in: path + required: true + type: string + format: int64 + - 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 + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Service /cosmos/tx/v1beta1/txs/{hash}: get: summary: GetTx fetches a tx by hash. @@ -33936,7 +35909,7 @@ paths: schema: $ref: '#/definitions/cosmos.tx.v1beta1.GetTxResponse' default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -34152,7 +36125,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -34348,6 +36321,212 @@ paths: type: string tags: - Cosmos SDK + /cosmos/upgrade/v1beta1/authority: + get: + summary: Returns the account with authority to conduct upgrades + description: 'Since: cosmos-sdk 0.46' + operationId: Authority + responses: + '200': + description: A successful response. + schema: + type: object + properties: + address: + type: string + description: 'Since: cosmos-sdk 0.46' + title: QueryAuthorityResponse is the response type for Query/Authority + 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" + } + tags: + - Cosmos SDK /cosmos/upgrade/v1beta1/current_plan: get: summary: CurrentPlan queries the current upgrade plan. @@ -34589,7 +36768,7 @@ paths: method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -34782,6 +36961,7 @@ paths: /cosmos/upgrade/v1beta1/module_versions: get: summary: ModuleVersions queries the list of module versions from state. + description: 'Since: cosmos-sdk 0.43' operationId: ModuleVersions responses: '200': @@ -34801,7 +36981,10 @@ paths: type: string format: uint64 title: consensus version of the app module - description: ModuleVersion specifies a module and its consensus version. + description: |- + ModuleVersion specifies a module and its consensus version. + + Since: cosmos-sdk 0.43 description: >- module_versions is a list of module names with their consensus versions. @@ -34810,8 +36993,11 @@ paths: Query/ModuleVersions RPC method. + + + Since: cosmos-sdk 0.43 default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -35012,11 +37198,18 @@ paths: - Cosmos SDK /cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}: get: - summary: |- + summary: >- UpgradedConsensusState queries the consensus state that will serve + as a trusted kernel for the next version of this chain. It will only be + stored at the last height of this chain. + UpgradedConsensusState RPC not supported with legacy querier + + This rpc is deprecated now that IBC has its own replacement + + (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) operationId: UpgradedConsensusState responses: '200': @@ -35027,13 +37220,14 @@ paths: upgraded_consensus_state: type: string format: byte + title: 'Since: cosmos-sdk 0.43' description: >- QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState RPC method. default: - description: An unexpected error response + description: An unexpected error response. schema: type: object properties: @@ -35232,6 +37426,7374 @@ paths: format: int64 tags: - Cosmos SDK + /cosmos/nft/v1beta1/balance/{owner}/{class_id}: + get: + summary: >- + Balance queries the number of NFTs of a given class owned by the owner, + same as balanceOf in ERC721 + operationId: NftBalance + responses: + '200': + description: A successful response. + schema: + type: object + properties: + amount: + type: string + format: uint64 + title: >- + QueryBalanceResponse is the response type for the Query/Balance + 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 + + 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: owner + in: path + required: true + type: string + - name: class_id + in: path + required: true + type: string + tags: + - Cosmos SDK + /cosmos/nft/v1beta1/classes: + get: + summary: Classes queries all NFT classes + operationId: Classes + responses: + '200': + description: A successful response. + schema: + type: object + properties: + classes: + type: array + items: + type: object + properties: + id: + type: string + title: >- + id defines the unique identifier of the NFT + classification, similar to the contract address of + ERC721 + name: + type: string + title: >- + name defines the human-readable name of the NFT + classification. Optional + symbol: + type: string + title: >- + symbol is an abbreviated name for nft classification. + Optional + description: + type: string + title: >- + description is a brief description of nft + classification. Optional + uri: + type: string + title: >- + uri for the class metadata stored off chain. It can + define schema for Class and NFT `Data` attributes. + Optional + uri_hash: + type: string + title: >- + uri_hash is a hash of the document pointed by uri. + Optional + data: + 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: >- + data is the app specific metadata of the NFT class. + Optional + description: Class defines the class of the nft type. + pagination: + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QueryClassesResponse is the response type for the Query/Classes + 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 + + 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: 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 + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Cosmos SDK + /cosmos/nft/v1beta1/classes/{class_id}: + get: + summary: Class queries an NFT class based on its id + operationId: Class + responses: + '200': + description: A successful response. + schema: + type: object + properties: + class: + type: object + properties: + id: + type: string + title: >- + id defines the unique identifier of the NFT + classification, similar to the contract address of ERC721 + name: + type: string + title: >- + name defines the human-readable name of the NFT + classification. Optional + symbol: + type: string + title: >- + symbol is an abbreviated name for nft classification. + Optional + description: + type: string + title: >- + description is a brief description of nft classification. + Optional + uri: + type: string + title: >- + uri for the class metadata stored off chain. It can define + schema for Class and NFT `Data` attributes. Optional + uri_hash: + type: string + title: >- + uri_hash is a hash of the document pointed by uri. + Optional + data: + 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: >- + data is the app specific metadata of the NFT class. + Optional + description: Class defines the class of the nft type. + title: >- + QueryClassResponse is the response type for the Query/Class 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 + + 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: class_id + in: path + required: true + type: string + tags: + - Cosmos SDK + /cosmos/nft/v1beta1/nfts: + get: + summary: >- + NFTs queries all NFTs of a given class or owner,choose at least one of + the two, similar to tokenByIndex in + + ERC721Enumerable + operationId: NFTs + responses: + '200': + description: A successful response. + schema: + type: object + properties: + nfts: + type: array + items: + type: object + properties: + class_id: + type: string + title: >- + class_id associated with the NFT, similar to the + contract address of ERC721 + id: + type: string + title: id is a unique identifier of the NFT + uri: + type: string + title: uri for the NFT metadata stored off chain + uri_hash: + type: string + title: uri_hash is a hash of the document pointed by uri + data: + 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: data is an app specific data of the NFT. Optional + description: NFT defines the NFT. + pagination: + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QueryNFTsResponse is the response type for the Query/NFTs RPC + methods + 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: class_id + in: query + required: false + type: string + - name: owner + in: query + required: false + type: string + - 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 + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Cosmos SDK + /cosmos/nft/v1beta1/nfts/{class_id}/{id}: + get: + summary: NFT queries an NFT based on its class and id. + operationId: NFT + responses: + '200': + description: A successful response. + schema: + type: object + properties: + nft: + type: object + properties: + class_id: + type: string + title: >- + class_id associated with the NFT, similar to the contract + address of ERC721 + id: + type: string + title: id is a unique identifier of the NFT + uri: + type: string + title: uri for the NFT metadata stored off chain + uri_hash: + type: string + title: uri_hash is a hash of the document pointed by uri + data: + 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: data is an app specific data of the NFT. Optional + description: NFT defines the NFT. + title: QueryNFTResponse is the response type for the Query/NFT 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 + + 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: class_id + in: path + required: true + type: string + - name: id + in: path + required: true + type: string + tags: + - Cosmos SDK + /cosmos/nft/v1beta1/owner/{class_id}/{id}: + get: + summary: >- + Owner queries the owner of the NFT based on its class and id, same as + ownerOf in ERC721 + operationId: Owner + responses: + '200': + description: A successful response. + schema: + type: object + properties: + owner: + type: string + title: >- + QueryOwnerResponse is the response type for the Query/Owner 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 + + 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: class_id + in: path + required: true + type: string + - name: id + in: path + required: true + type: string + tags: + - Cosmos SDK + /cosmos/nft/v1beta1/supply/{class_id}: + get: + summary: >- + Supply queries the number of NFTs from the given class, same as + totalSupply of ERC721. + operationId: Supply + responses: + '200': + description: A successful response. + schema: + type: object + properties: + amount: + type: string + format: uint64 + title: >- + QuerySupplyResponse is the response type for the Query/Supply 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 + + 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: class_id + in: path + required: true + type: string + tags: + - Cosmos SDK + /cosmos/group/v1/group_info/{group_id}: + get: + summary: GroupInfo queries group info based on group id. + operationId: GroupInfo + responses: + '200': + description: A successful response. + schema: + type: object + properties: + info: + description: info is the GroupInfo for the group. + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group's admin. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + group. + version: + type: string + format: uint64 + title: >- + version is used to track changes to a group's membership + structure that + + would break existing proposals. Whenever any members + weight is changed, + + or any member is added or removed this version is + incremented and will + + cause proposals based on older versions of this group to + fail + total_weight: + type: string + description: total_weight is the sum of the group members' weights. + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group was + created. + description: QueryGroupInfoResponse is the Query/GroupInfo response type. + 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: group_id + description: group_id is the unique ID of the group. + in: path + required: true + type: string + format: uint64 + tags: + - Cosmos SDK + /cosmos/group/v1/group_members/{group_id}: + get: + summary: GroupMembers queries members of a group + operationId: GroupMembers + responses: + '200': + description: A successful response. + schema: + type: object + properties: + members: + type: array + items: + type: object + properties: + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + member: + description: member is the member data. + type: object + properties: + address: + type: string + description: address is the member's account address. + weight: + type: string + description: >- + weight is the member's voting weight that should be + greater than 0. + metadata: + type: string + description: >- + metadata is any arbitrary metadata attached to the + member. + added_at: + type: string + format: date-time + description: >- + added_at is a timestamp specifying when a member was + added. + description: >- + GroupMember represents the relationship between a group and + a member. + description: members are the members of the group with given group_id. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QueryGroupMembersResponse is the Query/GroupMembersResponse + response type. + 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: group_id + description: group_id is the unique ID of the group. + in: path + required: true + type: string + format: uint64 + - 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 + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Cosmos SDK + /cosmos/group/v1/group_policies_by_admin/{admin}: + get: + summary: GroupsByAdmin queries group policies by admin address. + operationId: GroupPoliciesByAdmin + responses: + '200': + description: A successful response. + schema: + type: object + properties: + group_policies: + type: array + items: + type: object + properties: + address: + type: string + description: address is the account address of group policy. + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group admin. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + group policy. + version: + type: string + format: uint64 + description: >- + version is used to track changes to a group's + GroupPolicyInfo structure that + + would create a different result on a running proposal. + decision_policy: + 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" + } + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group policy + was created. + description: >- + GroupPolicyInfo represents the high-level on-chain + information for a group policy. + description: >- + group_policies are the group policies info with provided + admin. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QueryGroupPoliciesByAdminResponse is the + Query/GroupPoliciesByAdmin response type. + 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: admin + description: admin is the admin address of the group policy. + in: path + required: true + type: string + - 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 + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Cosmos SDK + /cosmos/group/v1/group_policies_by_group/{group_id}: + get: + summary: GroupPoliciesByGroup queries group policies by group id. + operationId: GroupPoliciesByGroup + responses: + '200': + description: A successful response. + schema: + type: object + properties: + group_policies: + type: array + items: + type: object + properties: + address: + type: string + description: address is the account address of group policy. + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group admin. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + group policy. + version: + type: string + format: uint64 + description: >- + version is used to track changes to a group's + GroupPolicyInfo structure that + + would create a different result on a running proposal. + decision_policy: + 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" + } + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group policy + was created. + description: >- + GroupPolicyInfo represents the high-level on-chain + information for a group policy. + description: >- + group_policies are the group policies info associated with the + provided group. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QueryGroupPoliciesByGroupResponse is the + Query/GroupPoliciesByGroup response type. + 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: group_id + description: group_id is the unique ID of the group policy's group. + in: path + required: true + type: string + format: uint64 + - 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 + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Cosmos SDK + /cosmos/group/v1/group_policy_info/{address}: + get: + summary: >- + GroupPolicyInfo queries group policy info based on account address of + group policy. + operationId: GroupPolicyInfo + responses: + '200': + description: A successful response. + schema: + type: object + properties: + info: + type: object + properties: + address: + type: string + description: address is the account address of group policy. + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group admin. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + group policy. + version: + type: string + format: uint64 + description: >- + version is used to track changes to a group's + GroupPolicyInfo structure that + + would create a different result on a running proposal. + decision_policy: + 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" + } + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group policy + was created. + description: >- + GroupPolicyInfo represents the high-level on-chain information + for a group policy. + description: >- + QueryGroupPolicyInfoResponse is the Query/GroupPolicyInfo response + type. + 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: address + description: address is the account address of the group policy. + in: path + required: true + type: string + tags: + - Cosmos SDK + /cosmos/group/v1/groups_by_admin/{admin}: + get: + summary: GroupsByAdmin queries groups by admin address. + operationId: GroupsByAdmin + responses: + '200': + description: A successful response. + schema: + type: object + properties: + groups: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group's admin. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + group. + version: + type: string + format: uint64 + title: >- + version is used to track changes to a group's membership + structure that + + would break existing proposals. Whenever any members + weight is changed, + + or any member is added or removed this version is + incremented and will + + cause proposals based on older versions of this group to + fail + total_weight: + type: string + description: total_weight is the sum of the group members' weights. + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group was + created. + description: >- + GroupInfo represents the high-level on-chain information for + a group. + description: groups are the groups info with the provided admin. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QueryGroupsByAdminResponse is the Query/GroupsByAdminResponse + response type. + 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: admin + description: admin is the account address of a group's admin. + in: path + required: true + type: string + - 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 + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Cosmos SDK + /cosmos/group/v1/groups_by_member/{address}: + get: + summary: GroupsByMember queries groups by member address. + operationId: GroupsByMember + responses: + '200': + description: A successful response. + schema: + type: object + properties: + groups: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group's admin. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + group. + version: + type: string + format: uint64 + title: >- + version is used to track changes to a group's membership + structure that + + would break existing proposals. Whenever any members + weight is changed, + + or any member is added or removed this version is + incremented and will + + cause proposals based on older versions of this group to + fail + total_weight: + type: string + description: total_weight is the sum of the group members' weights. + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group was + created. + description: >- + GroupInfo represents the high-level on-chain information for + a group. + description: groups are the groups info with the provided group member. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QueryGroupsByMemberResponse is the Query/GroupsByMember response + type. + 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: address + description: address is the group member address. + in: path + required: true + type: string + - 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 + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Cosmos SDK + /cosmos/group/v1/proposal/{proposal_id}: + get: + summary: Proposal queries a proposal based on proposal id. + operationId: GroupProposal + responses: + '200': + description: A successful response. + schema: + type: object + properties: + proposal: + description: proposal is the proposal info. + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique id of the proposal. + group_policy_address: + type: string + description: >- + group_policy_address is the account address of group + policy. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + proposal. + proposers: + type: array + items: + type: string + description: proposers are the account addresses of the proposers. + submit_time: + type: string + format: date-time + description: >- + submit_time is a timestamp specifying when a proposal was + submitted. + group_version: + type: string + format: uint64 + description: >- + group_version tracks the version of the group at proposal + submission. + + This field is here for informational purposes only. + group_policy_version: + type: string + format: uint64 + description: >- + group_policy_version tracks the version of the group + policy at proposal submission. + + When a decision policy is changed, existing proposals from + previous policy + + versions will become invalid with the `ABORTED` status. + + This field is here for informational purposes only. + status: + description: >- + status represents the high level position in the life + cycle of the proposal. Initial value is Submitted. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_SUBMITTED + - PROPOSAL_STATUS_ACCEPTED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_ABORTED + - PROPOSAL_STATUS_WITHDRAWN + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: >- + final_tally_result contains the sums of all weighted votes + for this + + proposal for each vote option. It is empty at submission, + and only + + populated after tallying, at voting period end or at + proposal execution, + + whichever happens first. + type: object + properties: + yes_count: + type: string + description: yes_count is the weighted sum of yes votes. + abstain_count: + type: string + description: abstain_count is the weighted sum of abstainers. + no_count: + type: string + description: no_count is the weighted sum of no votes. + no_with_veto_count: + type: string + description: no_with_veto_count is the weighted sum of veto. + voting_period_end: + type: string + format: date-time + description: >- + voting_period_end is the timestamp before which voting + must be done. + + Unless a successfull MsgExec is called before (to execute + a proposal whose + + tally is successful before the voting period ends), + tallying will be done + + at this point, and the `final_tally_result`and `status` + fields will be + + accordingly updated. + executor_result: + description: >- + executor_result is the final result of the proposal + execution. Initial value is NotRun. + type: string + enum: + - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + - PROPOSAL_EXECUTOR_RESULT_NOT_RUN + - PROPOSAL_EXECUTOR_RESULT_SUCCESS + - PROPOSAL_EXECUTOR_RESULT_FAILURE + default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + 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 `sdk.Msg`s that will be executed if + the proposal passes. + description: QueryProposalResponse is the Query/Proposal response type. + 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: proposal_id + description: proposal_id is the unique ID of a proposal. + in: path + required: true + type: string + format: uint64 + tags: + - Cosmos SDK + /cosmos/group/v1/proposals/{proposal_id}/tally: + get: + summary: >- + TallyResult returns the tally result of a proposal. If the proposal is + + still in voting period, then this query computes the current tally + state, + + which might not be final. On the other hand, if the proposal is final, + + then it simply returns the `final_tally_result` state stored in the + + proposal itself. + operationId: GroupTallyResult + responses: + '200': + description: A successful response. + schema: + type: object + properties: + tally: + description: tally defines the requested tally. + type: object + properties: + yes_count: + type: string + description: yes_count is the weighted sum of yes votes. + abstain_count: + type: string + description: abstain_count is the weighted sum of abstainers. + no_count: + type: string + description: no_count is the weighted sum of no votes. + no_with_veto_count: + type: string + description: no_with_veto_count is the weighted sum of veto. + description: QueryTallyResultResponse is the Query/TallyResult response type. + 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: proposal_id + description: proposal_id is the unique id of a proposal. + in: path + required: true + type: string + format: uint64 + tags: + - Cosmos SDK + /cosmos/group/v1/proposals_by_group_policy/{address}: + get: + summary: >- + ProposalsByGroupPolicy queries proposals based on account address of + group policy. + operationId: ProposalsByGroupPolicy + responses: + '200': + description: A successful response. + schema: + type: object + properties: + proposals: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique id of the proposal. + group_policy_address: + type: string + description: >- + group_policy_address is the account address of group + policy. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + proposal. + proposers: + type: array + items: + type: string + description: proposers are the account addresses of the proposers. + submit_time: + type: string + format: date-time + description: >- + submit_time is a timestamp specifying when a proposal + was submitted. + group_version: + type: string + format: uint64 + description: >- + group_version tracks the version of the group at + proposal submission. + + This field is here for informational purposes only. + group_policy_version: + type: string + format: uint64 + description: >- + group_policy_version tracks the version of the group + policy at proposal submission. + + When a decision policy is changed, existing proposals + from previous policy + + versions will become invalid with the `ABORTED` status. + + This field is here for informational purposes only. + status: + description: >- + status represents the high level position in the life + cycle of the proposal. Initial value is Submitted. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_SUBMITTED + - PROPOSAL_STATUS_ACCEPTED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_ABORTED + - PROPOSAL_STATUS_WITHDRAWN + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: >- + final_tally_result contains the sums of all weighted + votes for this + + proposal for each vote option. It is empty at + submission, and only + + populated after tallying, at voting period end or at + proposal execution, + + whichever happens first. + type: object + properties: + yes_count: + type: string + description: yes_count is the weighted sum of yes votes. + abstain_count: + type: string + description: abstain_count is the weighted sum of abstainers. + no_count: + type: string + description: no_count is the weighted sum of no votes. + no_with_veto_count: + type: string + description: no_with_veto_count is the weighted sum of veto. + voting_period_end: + type: string + format: date-time + description: >- + voting_period_end is the timestamp before which voting + must be done. + + Unless a successfull MsgExec is called before (to + execute a proposal whose + + tally is successful before the voting period ends), + tallying will be done + + at this point, and the `final_tally_result`and `status` + fields will be + + accordingly updated. + executor_result: + description: >- + executor_result is the final result of the proposal + execution. Initial value is NotRun. + type: string + enum: + - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + - PROPOSAL_EXECUTOR_RESULT_NOT_RUN + - PROPOSAL_EXECUTOR_RESULT_SUCCESS + - PROPOSAL_EXECUTOR_RESULT_FAILURE + default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + 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 `sdk.Msg`s that will be executed + if the proposal passes. + description: >- + Proposal defines a group proposal. Any member of a group can + submit a proposal + + for a group policy to decide upon. + + A proposal consists of a set of `sdk.Msg`s that will be + executed if the proposal + + passes as well as some optional metadata associated with the + proposal. + description: proposals are the proposals with given group policy. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QueryProposalsByGroupPolicyResponse is the + Query/ProposalByGroupPolicy response type. + 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: address + description: >- + address is the account address of the group policy related to + proposals. + in: path + required: true + type: string + - 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 + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Cosmos SDK + /cosmos/group/v1/vote_by_proposal_voter/{proposal_id}/{voter}: + get: + summary: VoteByProposalVoter queries a vote by proposal id and voter. + operationId: VoteByProposalVoter + responses: + '200': + description: A successful response. + schema: + type: object + properties: + vote: + description: vote is the vote with given proposal_id and voter. + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal is the unique ID of the proposal. + voter: + type: string + description: voter is the account address of the voter. + option: + description: option is the voter's choice on the proposal. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + vote. + submit_time: + type: string + format: date-time + description: submit_time is the timestamp when the vote was submitted. + description: >- + QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter + response type. + 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: proposal_id + description: proposal_id is the unique ID of a proposal. + in: path + required: true + type: string + format: uint64 + - name: voter + description: voter is a proposal voter account address. + in: path + required: true + type: string + tags: + - Cosmos SDK + /cosmos/group/v1/votes_by_proposal/{proposal_id}: + get: + summary: VotesByProposal queries a vote by proposal. + operationId: VotesByProposal + responses: + '200': + description: A successful response. + schema: + type: object + properties: + votes: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal is the unique ID of the proposal. + voter: + type: string + description: voter is the account address of the voter. + option: + description: option is the voter's choice on the proposal. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + vote. + submit_time: + type: string + format: date-time + description: >- + submit_time is the timestamp when the vote was + submitted. + description: Vote represents a vote for a proposal. + description: votes are the list of votes for given proposal_id. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QueryVotesByProposalResponse is the Query/VotesByProposal response + type. + 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: proposal_id + description: proposal_id is the unique ID of a proposal. + in: path + required: true + type: string + format: uint64 + - 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 + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Cosmos SDK + /cosmos/group/v1/votes_by_voter/{voter}: + get: + summary: VotesByVoter queries a vote by voter. + operationId: VotesByVoter + responses: + '200': + description: A successful response. + schema: + type: object + properties: + votes: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal is the unique ID of the proposal. + voter: + type: string + description: voter is the account address of the voter. + option: + description: option is the voter's choice on the proposal. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + vote. + submit_time: + type: string + format: date-time + description: >- + submit_time is the timestamp when the vote was + submitted. + description: Vote represents a vote for a proposal. + description: votes are the list of votes by given voter. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: QueryVotesByVoterResponse is the Query/VotesByVoter response type. + 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: voter + description: voter is a proposal voter account address. + in: path + required: true + type: string + - 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 + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Cosmos SDK /ibc/apps/transfer/v1/channels/{channel_id}/ports/{port_id}/escrow_address: get: summary: >- @@ -35371,9 +44933,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -35457,6 +45020,17 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean tags: - IBC /ibc/apps/transfer/v1/denom_traces/{hash}: @@ -35730,32 +45304,25 @@ paths: format: byte tags: - IBC - /ibc/client/v1/params: + /ibc/apps/fee/v1/channels/{channel_id}/ports/{port_id}/fee_enabled: get: - summary: ClientParams queries all parameters of the ibc client. - operationId: IbcClientParams + summary: >- + FeeEnabledChannel returns true if the provided port and channel + identifiers belong to a fee enabled channel + operationId: IbcFeeEnabledChannel responses: '200': description: A successful response. schema: 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 - - method. + fee_enabled: + type: boolean + format: boolean + title: boolean flag representing the fee enabled channel status + title: >- + QueryFeeEnabledChannelResponse defines the response type for the + FeeEnabledChannel rpc default: description: An unexpected error response schema: @@ -35945,6 +45512,2557 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + parameters: + - name: channel_id + description: unique channel identifier + in: path + required: true + type: string + - name: port_id + description: unique port identifier + in: path + required: true + type: string + tags: + - IBC + /ibc/apps/fee/v1/channels/{channel_id}/ports/{port_id}/incentivized_packets: + get: + summary: Gets all incentivized packets for a specific channel + operationId: IbcIncentivizedPacketsForChannel + responses: + '200': + description: A successful response. + schema: + type: object + properties: + incentivized_packets: + type: array + items: + type: object + properties: + packet_id: + title: >- + unique packet identifier comprised of the channel ID, + port ID and sequence + type: object + properties: + port_id: + type: string + title: channel port identifier + channel_id: + type: string + title: channel unique identifier + sequence: + type: string + format: uint64 + title: packet sequence + packet_fees: + type: array + items: + type: object + properties: + fee: + title: >- + fee encapsulates the recv, ack and timeout fees + associated with an IBC packet + type: object + properties: + recv_fee: + 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: the packet receive fee + ack_fee: + 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: the packet acknowledgement fee + timeout_fee: + 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: the packet timeout fee + refund_address: + type: string + title: the refund address for unspent fees + relayers: + type: array + items: + type: string + title: >- + optional list of relayers permitted to receive + fees + title: >- + PacketFee contains ICS29 relayer fees, refund address + and optional list of permitted relayers + title: list of packet fees + title: >- + IdentifiedPacketFees contains a list of type PacketFee and + associated PacketId + title: Map of all incentivized_packets + title: >- + QueryIncentivizedPacketsResponse defines the response type for the + incentivized packets RPC + 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: channel_id + in: path + required: true + type: string + - name: port_id + in: path + required: true + type: string + - 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 if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean + - name: query_height + description: Height to query at. + in: query + required: false + type: string + format: uint64 + tags: + - IBC + /ibc/apps/fee/v1/channels/{channel_id}/relayers/{relayer}/counterparty_payee: + get: + summary: >- + CounterpartyPayee returns the registered counterparty payee for forward + relaying + operationId: IbcCounterpartyPayee + responses: + '200': + description: A successful response. + schema: + type: object + properties: + counterparty_payee: + type: string + title: >- + the counterparty payee address used to compensate forward + relaying + title: >- + QueryCounterpartyPayeeResponse defines the response type for the + CounterpartyPayee rpc + 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: channel_id + description: unique channel identifier + in: path + required: true + type: string + - name: relayer + description: the relayer address to which the counterparty is registered + in: path + required: true + type: string + tags: + - IBC + /ibc/apps/fee/v1/channels/{channel_id}/relayers/{relayer}/payee: + get: + summary: >- + Payee returns the registered payee address for a specific channel given + the relayer address + operationId: IbcPayee + responses: + '200': + description: A successful response. + schema: + type: object + properties: + payee_address: + type: string + title: the payee address to which packet fees are paid out + title: QueryPayeeResponse defines the response type for the Payee rpc + 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: channel_id + description: unique channel identifier + in: path + required: true + type: string + - name: relayer + description: the relayer address to which the distribution address is registered + in: path + required: true + type: string + tags: + - IBC + /ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/sequences/{packet_id.sequence}/incentivized_packet: + get: + summary: >- + IncentivizedPacket returns all packet fees for a packet given its + identifier + operationId: IbcIncentivizedPacket + responses: + '200': + description: A successful response. + schema: + type: object + properties: + incentivized_packet: + type: object + properties: + packet_id: + title: >- + unique packet identifier comprised of the channel ID, port + ID and sequence + type: object + properties: + port_id: + type: string + title: channel port identifier + channel_id: + type: string + title: channel unique identifier + sequence: + type: string + format: uint64 + title: packet sequence + packet_fees: + type: array + items: + type: object + properties: + fee: + title: >- + fee encapsulates the recv, ack and timeout fees + associated with an IBC packet + type: object + properties: + recv_fee: + 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: the packet receive fee + ack_fee: + 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: the packet acknowledgement fee + timeout_fee: + 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: the packet timeout fee + refund_address: + type: string + title: the refund address for unspent fees + relayers: + type: array + items: + type: string + title: optional list of relayers permitted to receive fees + title: >- + PacketFee contains ICS29 relayer fees, refund address + and optional list of permitted relayers + title: list of packet fees + title: >- + IdentifiedPacketFees contains a list of type PacketFee and + associated PacketId + title: >- + QueryIncentivizedPacketsResponse defines the response type for the + IncentivizedPacket rpc + 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: packet_id.channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: packet_id.port_id + description: channel port identifier + in: path + required: true + type: string + - name: packet_id.sequence + description: packet sequence + in: path + required: true + type: string + format: uint64 + - name: query_height + description: block height at which to query. + in: query + required: false + type: string + format: uint64 + tags: + - IBC + /ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/sequences/{packet_id.sequence}/total_ack_fees: + get: + summary: >- + TotalAckFees returns the total acknowledgement fees for a packet given + its identifier + operationId: IbcTotalAckFees + responses: + '200': + description: A successful response. + schema: + type: object + properties: + ack_fees: + 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: the total packet acknowledgement fees + title: >- + QueryTotalAckFeesResponse defines the response type for the + TotalAckFees rpc + 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: packet_id.channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: packet_id.port_id + description: channel port identifier + in: path + required: true + type: string + - name: packet_id.sequence + description: packet sequence + in: path + required: true + type: string + format: uint64 + tags: + - IBC + /ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/sequences/{packet_id.sequence}/total_recv_fees: + get: + summary: >- + TotalRecvFees returns the total receive fees for a packet given its + identifier + operationId: IbcTotalRecvFees + responses: + '200': + description: A successful response. + schema: + type: object + properties: + recv_fees: + 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: the total packet receive fees + title: >- + QueryTotalRecvFeesResponse defines the response type for the + TotalRecvFees rpc + 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: packet_id.channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: packet_id.port_id + description: channel port identifier + in: path + required: true + type: string + - name: packet_id.sequence + description: packet sequence + in: path + required: true + type: string + format: uint64 + tags: + - IBC + /ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/sequences/{packet_id.sequence}/total_timeout_fees: + get: + summary: >- + TotalTimeoutFees returns the total timeout fees for a packet given its + identifier + operationId: IbcTotalTimeoutFees + responses: + '200': + description: A successful response. + schema: + type: object + properties: + timeout_fees: + 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: the total packet timeout fees + title: >- + QueryTotalTimeoutFeesResponse defines the response type for the + TotalTimeoutFees rpc + 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: packet_id.channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: packet_id.port_id + description: channel port identifier + in: path + required: true + type: string + - name: packet_id.sequence + description: packet sequence + in: path + required: true + type: string + format: uint64 + tags: + - IBC + /ibc/apps/fee/v1/fee_enabled: + get: + summary: FeeEnabledChannels returns a list of all fee enabled channels + operationId: IbcFeeEnabledChannels + responses: + '200': + description: A successful response. + schema: + type: object + properties: + fee_enabled_channels: + type: array + items: + type: object + properties: + port_id: + type: string + title: unique port identifier + channel_id: + type: string + title: unique channel identifier + title: >- + FeeEnabledChannel contains the PortID & ChannelID for a fee + enabled channel + title: list of fee enabled channels + title: >- + QueryFeeEnabledChannelsResponse defines the response type for the + FeeEnabledChannels rpc + 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: 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 if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean + - name: query_height + description: block height at which to query. + in: query + required: false + type: string + format: uint64 + tags: + - IBC + /ibc/apps/fee/v1/incentivized_packets: + get: + summary: >- + IncentivizedPackets returns all incentivized packets and their + associated fees + operationId: IbcIncentivizedPackets + responses: + '200': + description: A successful response. + schema: + type: object + properties: + incentivized_packets: + type: array + items: + type: object + properties: + packet_id: + title: >- + unique packet identifier comprised of the channel ID, + port ID and sequence + type: object + properties: + port_id: + type: string + title: channel port identifier + channel_id: + type: string + title: channel unique identifier + sequence: + type: string + format: uint64 + title: packet sequence + packet_fees: + type: array + items: + type: object + properties: + fee: + title: >- + fee encapsulates the recv, ack and timeout fees + associated with an IBC packet + type: object + properties: + recv_fee: + 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: the packet receive fee + ack_fee: + 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: the packet acknowledgement fee + timeout_fee: + 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: the packet timeout fee + refund_address: + type: string + title: the refund address for unspent fees + relayers: + type: array + items: + type: string + title: >- + optional list of relayers permitted to receive + fees + title: >- + PacketFee contains ICS29 relayer fees, refund address + and optional list of permitted relayers + title: list of packet fees + title: >- + IdentifiedPacketFees contains a list of type PacketFee and + associated PacketId + title: list of identified fees for incentivized packets + title: >- + QueryIncentivizedPacketsResponse defines the response type for the + IncentivizedPackets rpc + 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: 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 if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean + - name: query_height + description: block height at which to query. + in: query + required: false + type: string + format: uint64 tags: - IBC /ibc/core/client/v1/client_states: @@ -35966,6 +48084,7 @@ paths: type: string title: client identifier client_state: + title: client state type: object properties: type_url: @@ -36142,7 +48261,6 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: client state description: >- IdentifiedClientState defines a client state with an additional client @@ -36156,9 +48274,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -36419,6 +48538,17 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean tags: - IBC /ibc/core/client/v1/client_states/{client_id}: @@ -37292,9 +49422,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -37558,6 +49689,17 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean tags: - IBC /ibc/core/client/v1/consensus_states/{client_id}/heights: @@ -37617,9 +49759,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -37883,6 +50026,17 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean tags: - IBC /ibc/core/client/v1/consensus_states/{client_id}/revision/{revision_number}/height/{revision_height}: @@ -38336,6 +50490,223 @@ paths: format: boolean tags: - IBC + /ibc/core/client/v1/params: + get: + summary: ClientParams queries all parameters of the ibc client submodule. + operationId: IbcClientParams + responses: + '200': + description: A successful response. + schema: + 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 + + 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 + + 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" + } + tags: + - IBC /ibc/core/client/v1/upgraded_client_states: get: summary: UpgradedClientState queries an Upgraded IBC light client. @@ -39442,9 +51813,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -39734,6 +52106,17 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean tags: - IBC /ibc/core/connection/v1/connections/{connection_id}: @@ -40940,6 +53323,229 @@ paths: format: uint64 tags: - IBC + /ibc/core/connection/v1/params: + get: + summary: ConnectionParams queries all parameters of the ibc connection submodule. + operationId: IbcConnectionParams + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + max_expected_time_per_block: + type: string + format: uint64 + description: >- + maximum expected time per block (in nanoseconds), used to + enforce block delay. This parameter should reflect the + + largest amount of time that the chain might reasonably + take to produce the next block under normal operating + + conditions. A safe choice is 3-5x the expected time per + block. + description: >- + QueryConnectionParamsResponse is the response type for the + Query/ConnectionParams 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 + + 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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(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: + - IBC /ibc/core/channel/v1/channels: get: summary: Channels queries all the IBC channels of a chain. @@ -41037,9 +53643,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -41327,6 +53934,17 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean tags: - IBC /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}: @@ -42837,9 +55455,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -43137,6 +55756,17 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean - name: packet_commitment_sequences description: list of packet sequences. in: query @@ -43458,9 +56088,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -43758,6 +56389,17 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean tags: - IBC /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_ack_sequences}/unreceived_acks: @@ -44917,9 +57559,10 @@ paths: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -45212,7268 +57855,19 @@ paths: required: false type: boolean format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean tags: - IBC - /cdp: - post: - deprecated: true - summary: Create a cdp transaction - tags: - - CDP - consumes: - - application/json - produces: - - application/json - parameters: - - description: create cdp post parameters - name: post_cdp_req - in: body - required: true - schema: - type: object - properties: - base_req: - type: object - properties: - from: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: a memo - chain_id: - type: string - example: testing - account_number: - type: string - example: '1' - sequence: - type: string - example: '0' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.0' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - owner: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - collateral: - type: object - properties: - denom: - type: string - example: xrp - amount: - type: string - example: '10000000000' - principal: - type: object - properties: - denom: - type: string - example: usdx - amount: - type: string - example: '10000000' - collateral_type: - type: string - example: xrpb-a - responses: - '200': - description: Tx was successfully generated - schema: - type: object - properties: - msg: - type: array - items: - type: object - properties: - type: - type: string - example: cosmos-sdk/MsgSend - value: - type: object - properties: - from_address: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - to_address: - type: string - example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - fee: - type: object - properties: - gas: - type: string - example: '200000' - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - memo: - type: string - signatures: - type: array - items: - type: object - properties: - signature: - type: string - example: >- - W1HfKcc4F0rCSoxheZ7fsrB5nGK58U4gKysuzsmUwhloVnCxmbCx289uVMMvQN6tOcQsz7hMVTJrXSA1xzevvw== - pubkey: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Agey31h/NYpcy0sYm4liHMrXJMzbQUrgV4uHd/w09CXN - '400': - description: Invalid request - '500': - description: Server internal error - /cdp/{owner}/{collateral_type}/deposits: - post: - deprecated: true - summary: Create a deposit to cdp transaction - tags: - - CDP - consumes: - - application/json - produces: - - application/json - parameters: - - in: path - name: owner - description: Owner address in bech32 format - required: true - type: string - x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - - in: path - name: collateral_type - description: Collateral type - required: true - type: string - x-example: xrpb-a - - description: deposit cdp post parameters - name: post_deposit_req - in: body - required: true - schema: - type: object - properties: - base_req: - type: object - properties: - from: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: a memo - chain_id: - type: string - example: testing - account_number: - type: string - example: '1' - sequence: - type: string - example: '0' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.0' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - owner: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - depositor: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - collateral: - type: object - properties: - denom: - type: string - example: xrp - amount: - type: string - example: '10000000000' - collateral_type: - type: string - example: xrpb-a - responses: - '200': - description: Tx was successfully generated - schema: - type: object - properties: - msg: - type: array - items: - type: object - properties: - type: - type: string - example: cosmos-sdk/MsgSend - value: - type: object - properties: - from_address: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - to_address: - type: string - example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - fee: - type: object - properties: - gas: - type: string - example: '200000' - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - memo: - type: string - signatures: - type: array - items: - type: object - properties: - signature: - type: string - example: >- - W1HfKcc4F0rCSoxheZ7fsrB5nGK58U4gKysuzsmUwhloVnCxmbCx289uVMMvQN6tOcQsz7hMVTJrXSA1xzevvw== - pubkey: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Agey31h/NYpcy0sYm4liHMrXJMzbQUrgV4uHd/w09CXN - '400': - description: Invalid request - '500': - description: Server internal error - /cdp/{owner}/{collateral_type}/withdraw: - post: - deprecated: true - summary: create a withdraw collateral transaction - tags: - - CDP - consumes: - - application/json - produces: - - application/json - parameters: - - in: path - name: owner - description: Owner address in bech32 format - required: true - type: string - x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - - in: path - name: collateral_type - description: Collateral type - required: true - type: string - x-example: xrpb-a - - description: withdraw cdp post parameters - name: post_withdraw_req - in: body - required: true - schema: - type: object - properties: - base_req: - type: object - properties: - from: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: a memo - chain_id: - type: string - example: testing - account_number: - type: string - example: '1' - sequence: - type: string - example: '0' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.0' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - owner: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - depositor: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - collateral: - type: object - properties: - denom: - type: string - example: xrp - amount: - type: string - example: '10000000000' - collateral_type: - type: string - example: xrpb-a - responses: - '200': - description: Tx was successfully generated - schema: - type: object - properties: - msg: - type: array - items: - type: object - properties: - type: - type: string - example: cosmos-sdk/MsgSend - value: - type: object - properties: - from_address: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - to_address: - type: string - example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - fee: - type: object - properties: - gas: - type: string - example: '200000' - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - memo: - type: string - signatures: - type: array - items: - type: object - properties: - signature: - type: string - example: >- - W1HfKcc4F0rCSoxheZ7fsrB5nGK58U4gKysuzsmUwhloVnCxmbCx289uVMMvQN6tOcQsz7hMVTJrXSA1xzevvw== - pubkey: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Agey31h/NYpcy0sYm4liHMrXJMzbQUrgV4uHd/w09CXN - '400': - description: Invalid request - '500': - description: Server internal error - /cdp/{owner}/{collateral_type}/draw: - post: - deprecated: true - summary: Create a draw debt transaction - tags: - - CDP - consumes: - - application/json - produces: - - application/json - parameters: - - in: path - name: owner - description: Owner address in bech32 format - required: true - type: string - x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - - in: path - name: collateral_type - description: Collateral type - required: true - type: string - x-example: xrpb-a - - description: draw cdp post parameters - name: post_draw_req - in: body - required: true - schema: - type: object - properties: - base_req: - type: object - properties: - from: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: a memo - chain_id: - type: string - example: testing - account_number: - type: string - example: '1' - sequence: - type: string - example: '0' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.0' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - owner: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - principal: - type: object - properties: - denom: - type: string - example: usdx - amount: - type: string - example: '10000000' - collateral_type: - type: string - example: xrpb-a - responses: - '200': - description: Tx was successfully generated - schema: - type: object - properties: - msg: - type: array - items: - type: object - properties: - type: - type: string - example: cosmos-sdk/MsgSend - value: - type: object - properties: - from_address: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - to_address: - type: string - example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - fee: - type: object - properties: - gas: - type: string - example: '200000' - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - memo: - type: string - signatures: - type: array - items: - type: object - properties: - signature: - type: string - example: >- - W1HfKcc4F0rCSoxheZ7fsrB5nGK58U4gKysuzsmUwhloVnCxmbCx289uVMMvQN6tOcQsz7hMVTJrXSA1xzevvw== - pubkey: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Agey31h/NYpcy0sYm4liHMrXJMzbQUrgV4uHd/w09CXN - '400': - description: Invalid request - '500': - description: Server internal error - /cdp/{owner}/{collateral_type}/repay: - post: - deprecated: true - summary: Repay debt from a CDP - tags: - - CDP - consumes: - - application/json - produces: - - application/json - parameters: - - in: path - name: owner - description: Owner address in bech32 format - required: true - type: string - x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - - in: path - name: collateral_type - description: Collateral type - required: true - type: string - x-example: xrpb-a - - description: repay cdp post parameters - name: post_repay_req - in: body - required: true - schema: - type: object - properties: - base_req: - type: object - properties: - from: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: a memo - chain_id: - type: string - example: testing - account_number: - type: string - example: '1' - sequence: - type: string - example: '0' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.0' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - owner: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - payment: - type: object - properties: - denom: - type: string - example: usdx - amount: - type: string - example: '10000000' - collateral_type: - type: string - example: xrpb-a - responses: - '200': - description: Tx was successfully generated - schema: - type: object - properties: - msg: - type: array - items: - type: object - properties: - type: - type: string - example: cosmos-sdk/MsgSend - value: - type: object - properties: - from_address: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - to_address: - type: string - example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - fee: - type: object - properties: - gas: - type: string - example: '200000' - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - memo: - type: string - signatures: - type: array - items: - type: object - properties: - signature: - type: string - example: >- - W1HfKcc4F0rCSoxheZ7fsrB5nGK58U4gKysuzsmUwhloVnCxmbCx289uVMMvQN6tOcQsz7hMVTJrXSA1xzevvw== - pubkey: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Agey31h/NYpcy0sYm4liHMrXJMzbQUrgV4uHd/w09CXN - '400': - description: Invalid request - '500': - description: Server internal error - /cdp/{owner}/{collateral_type}/liquidate: - post: - deprecated: true - summary: >- - Attempt to liquidate a CDP whose collateralization ratio is under its - liquidaiton ratio - tags: - - CDP - consumes: - - application/json - produces: - - application/json - parameters: - - in: path - name: owner - description: Owner address in bech32 format - required: true - type: string - x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - - in: path - name: collateral_type - description: Collateral type - required: true - type: string - x-example: xrpb-a - - description: liquidate cdp post parameters - name: post_liquidate_req - in: body - required: true - schema: - type: object - properties: - base_req: - type: object - properties: - from: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: a memo - chain_id: - type: string - example: testing - account_number: - type: string - example: '1' - sequence: - type: string - example: '0' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.0' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - owner: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - collateral_type: - type: string - example: xrpb-a - responses: - '200': - description: Tx was successfully generated - schema: - type: object - properties: - msg: - type: array - items: - type: object - properties: - type: - type: string - example: cosmos-sdk/MsgSend - value: - type: object - properties: - from_address: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - to_address: - type: string - example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - fee: - type: object - properties: - gas: - type: string - example: '200000' - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - memo: - type: string - signatures: - type: array - items: - type: object - properties: - signature: - type: string - example: >- - W1HfKcc4F0rCSoxheZ7fsrB5nGK58U4gKysuzsmUwhloVnCxmbCx289uVMMvQN6tOcQsz7hMVTJrXSA1xzevvw== - pubkey: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Agey31h/NYpcy0sYm4liHMrXJMzbQUrgV4uHd/w09CXN - '400': - description: Invalid request - '500': - description: Server internal error - /cdp/accounts: - get: - deprecated: true - summary: Get the cdp module accounts - tags: - - CDP - produces: - - application/json - responses: - '200': - description: The cdp module accounts - schema: - type: object - properties: - height: - type: string - example: '100' - result: - type: array - items: - type: object - properties: - account_number: - type: number - address: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - coins: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - name: - type: string - permissions: - type: array - items: - type: string - public_key: - type: object - properties: - type: - type: string - value: - type: string - sequence: - type: number - '500': - description: Server internal error - /cdp/parameters: - get: - deprecated: true - summary: Get the parameters of the cdp module - tags: - - CDP - produces: - - application/json - responses: - '200': - description: The parameters of the cdp module - schema: - type: object - properties: - collateral_params: - type: array - items: - type: object - properties: - denom: - type: string - example: xrp - type: - type: string - example: xrp-a - liquidation_ratio: - type: string - example: '2.000000000000000000' - debt_limit: - type: object - properties: - denom: - type: string - example: usdx - amount: - type: string - example: '10000000' - stability_fee: - type: string - example: '1.000000001547126000' - auction_size: - type: string - example: '5000000000' - liquidation_penalty: - type: string - example: '0.050000000000000000' - prefix: - type: integer - example: 0 - spot_market_id: - type: string - example: xrp:usd - liquidation_market_id: - type: string - example: xrp:usd:30 - keeper_reward_percentage: - type: string - example: '0.05' - check_collateralization_index_count: - type: string - example: '10' - conversion_factor: - type: string - example: '6' - debt_params: - type: array - items: - type: object - properties: - denom: - type: string - example: usdx - reference_asset: - type: string - example: usd - conversion_factor: - type: string - example: '6' - debt_floor: - type: string - example: '10000000' - global_debt_limit: - type: array - items: - type: object - properties: - denom: - type: string - example: xrp - amount: - type: string - example: '10000000000' - surplus_auction_threshold: - type: string - example: '1000000000' - surplus_auction_lot: - type: string - example: '10000000' - debt_auction_threshold: - type: string - example: '1000000000' - savings_distribution_frequency: - type: string - example: '60000000' - circuit_breaker: - type: boolean - example: false - '500': - description: Server internal error - /cdp/cdps/cdp/{owner}/{collateral_type}: - get: - deprecated: true - summary: Get the cdp associated with the input owner address and collateral type - tags: - - CDP - produces: - - application/json - parameters: - - in: path - name: owner - description: Owner address in bech32 format - required: true - type: string - x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - - in: path - name: collateral_type - description: Collateral type - required: true - type: string - x-example: xrpb-a - responses: - '200': - description: CDP associated with owner - schema: - type: object - properties: - id: - type: string - example: '1' - owner: - type: string - example: kava1q53rwutgpzx7szcrgzqguxyccjpzt9j4cyctn9 - collateral: - type: object - properties: - denom: - type: string - example: xrp - amount: - type: string - example: '10000000000' - type: - type: string - example: xrpb-a - principal: - type: object - properties: - denom: - type: string - example: usdx - amount: - type: string - example: '10000000' - accumulated_fees: - type: object - properties: - denom: - type: string - example: usdx - amount: - type: string - example: '10000000' - fees_updated: - type: string - example: '2020-02-05T23:45:55.761435272Z' - collateral_value: - type: object - properties: - denom: - type: string - example: usdx - amount: - type: string - example: '10000000' - collateralization_ratio: - type: string - example: '2.721734157907653857' - '500': - description: Server internal error - /cdp/cdps/collateralType/{collateral_type}: - get: - deprecated: true - summary: Get all cdps with collateral type equal to the input collateral type - tags: - - CDP - produces: - - application/json - parameters: - - in: path - name: collateral_type - description: Collateral Type - required: true - type: string - x-example: xrpb-a - responses: - '200': - description: All CDPs with the input collateral type - schema: - type: object - properties: - height: - type: string - example: '100' - result: - type: array - x-nullable: true - items: - type: object - properties: - id: - type: string - example: '1' - owner: - type: string - example: kava1q53rwutgpzx7szcrgzqguxyccjpzt9j4cyctn9 - collateral: - type: object - properties: - denom: - type: string - example: xrp - amount: - type: string - example: '10000000000' - type: - type: string - example: xrpb-a - principal: - type: object - properties: - denom: - type: string - example: usdx - amount: - type: string - example: '10000000' - accumulated_fees: - type: object - properties: - denom: - type: string - example: usdx - amount: - type: string - example: '10000000' - fees_updated: - type: string - example: '2020-02-05T23:45:55.761435272Z' - collateral_value: - type: object - properties: - denom: - type: string - example: usdx - amount: - type: string - example: '10000000' - collateralization_ratio: - type: string - example: '2.721734157907653857' - '500': - description: Server internal error - /cdp/cdps/ratio/{collateral_type}/{ratio}: - get: - deprecated: true - summary: >- - Get all cdps with collateral type equal to the input collateral type and - collateralization ratio strictly less than the input ratio - tags: - - CDP - produces: - - application/json - parameters: - - in: path - name: collateral_type - description: Collateral type - required: true - type: string - x-example: xrpb-a - - in: path - name: ratio - description: Collateralization ratio - required: true - type: string - x-example: '2.0' - responses: - '200': - description: >- - All CDPs with the input collateral type and collateralization ratio - less than the input ratio - schema: - type: object - properties: - height: - type: string - example: '100' - result: - type: array - x-nullable: true - items: - type: object - properties: - id: - type: string - example: '1' - owner: - type: string - example: kava1q53rwutgpzx7szcrgzqguxyccjpzt9j4cyctn9 - collateral: - type: object - properties: - denom: - type: string - example: xrp - amount: - type: string - example: '10000000000' - type: - type: string - example: xrpb-a - principal: - type: object - properties: - denom: - type: string - example: usdx - amount: - type: string - example: '10000000' - accumulated_fees: - type: object - properties: - denom: - type: string - example: usdx - amount: - type: string - example: '10000000' - fees_updated: - type: string - example: '2020-02-05T23:45:55.761435272Z' - collateral_value: - type: object - properties: - denom: - type: string - example: usdx - amount: - type: string - example: '10000000' - collateralization_ratio: - type: string - example: '2.721734157907653857' - '500': - description: Server internal error - /cdp/cdps/cdp/deposits/{owner}/{collateral_type}: - get: - deprecated: true - summary: >- - Get the deposits associated with the cdp owned by an address for a - collateral type - tags: - - CDP - produces: - - application/json - parameters: - - in: path - name: owner - description: Owner address in bech32 format - required: true - type: string - x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - - in: path - name: collateral_type - description: Collateral type - required: true - type: string - x-example: xrpb-a - responses: - '200': - description: Deposits associated with the cdp - schema: - type: object - properties: - height: - type: string - example: '100' - result: - type: array - items: - type: object - properties: - cdp_id: - type: string - example: '1' - depositor: - type: string - example: kava1q53rwutgpzx7szcrgzqguxyccjpzt9j4cyctn9 - amount: - type: object - properties: - denom: - type: string - example: xrp - amount: - type: string - example: '10000000000' - '500': - description: Server internal error - /cdp/cdps: - get: - deprecated: true - summary: Query all active cdps - tags: - - CDP - produces: - - application/json - parameters: - - in: query - name: owner - description: Owner address in bech32 format - required: false - type: string - x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - - in: query - name: collateral_type - description: Collateral type - required: false - type: string - x-example: xrpb-a - - in: query - name: id - description: CDP ID - required: false - type: string - x-example: '4' - - in: query - name: ratio - description: Collateralization ratio - required: false - type: string - x-example: '2.75' - responses: - '200': - description: Query cdps - schema: - type: object - properties: - height: - type: string - example: '100' - result: - type: array - items: - type: object - properties: - id: - type: string - example: '1' - owner: - type: string - example: kava1q53rwutgpzx7szcrgzqguxyccjpzt9j4cyctn9 - collateral: - type: object - properties: - denom: - type: string - example: xrp - amount: - type: string - example: '10000000000' - type: - type: string - example: xrpb-a - principal: - type: object - properties: - denom: - type: string - example: usdx - amount: - type: string - example: '10000000' - accumulated_fees: - type: object - properties: - denom: - type: string - example: usdx - amount: - type: string - example: '10000000' - fees_updated: - type: string - example: '2020-02-05T23:45:55.761435272Z' - collateral_value: - type: object - properties: - denom: - type: string - example: usdx - amount: - type: string - example: '10000000' - collateralization_ratio: - type: string - example: '2.721734157907653857' - '500': - description: Internal Server Error - /bep3/swap/create: - post: - deprecated: true - summary: Generate a create atomic swap transaction - consumes: - - application/json - produces: - - application/json - tags: - - BEP3 - parameters: - - in: body - name: Create atomic swap request body - schema: - properties: - base_req: - type: object - properties: - from: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: a memo - chain_id: - type: string - example: testing - account_number: - type: string - example: '1' - sequence: - type: string - example: '0' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.0' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - from: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - to: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - recipient_other_chain: - type: string - description: address on another chain (binance) - example: bnb1uky3me9ggqypmrsvxk7ur6hqkzq7zmv4ed4ng7 - sender_other_chain: - type: string - description: address on another chain (binance) - example: bnb10uypsspvl6jlxcx5xse02pag39l8xpe7a3468h - random_number_hash: - type: string - description: hex-encoded sha256 hash of a 64bit random number - example: >- - c0544b7f4b890a673ea3f61bdb4650fbfe2f3e56bda1b397d6d592fca7163c8c - timestamp: - type: string - description: unix timestamp - example: '1585252531' - height_span: - type: string - description: span of blocks for which an atomic swap is valid - example: '3600' - cross_chain: - type: boolean - example: true - responses: - '200': - description: The transaction was successfully generated - schema: - type: object - properties: - msg: - type: array - items: - type: object - properties: - type: - type: string - example: cosmos-sdk/MsgSend - value: - type: object - properties: - from_address: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - to_address: - type: string - example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - fee: - type: object - properties: - gas: - type: string - example: '200000' - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - memo: - type: string - signatures: - type: array - items: - type: object - properties: - signature: - type: string - example: >- - W1HfKcc4F0rCSoxheZ7fsrB5nGK58U4gKysuzsmUwhloVnCxmbCx289uVMMvQN6tOcQsz7hMVTJrXSA1xzevvw== - pubkey: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Agey31h/NYpcy0sYm4liHMrXJMzbQUrgV4uHd/w09CXN - '400': - description: Invalid request - '500': - description: Internal server error - /bep3/swap/claim: - post: - deprecated: true - summary: Generate a claim atomic swap transaction - consumes: - - application/json - produces: - - application/json - tags: - - BEP3 - parameters: - - in: body - name: Create atomic swap request body - schema: - properties: - base_req: - type: object - properties: - from: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: a memo - chain_id: - type: string - example: testing - account_number: - type: string - example: '1' - sequence: - type: string - example: '0' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.0' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - from: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - swap_id: - type: string - example: >- - 3ca20f0152f03b0aabe73e7aa1ddf78b9048ede5a9a73846e1ef53bebbfa4185 - random_number: - type: string - example: >- - e3d0a98b459f72231da69c3bd771c1e721fef4be83c14b80dc805ba71019eebe - responses: - '200': - description: The transaction was successfully generated - schema: - type: object - properties: - msg: - type: array - items: - type: object - properties: - type: - type: string - example: cosmos-sdk/MsgSend - value: - type: object - properties: - from_address: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - to_address: - type: string - example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - fee: - type: object - properties: - gas: - type: string - example: '200000' - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - memo: - type: string - signatures: - type: array - items: - type: object - properties: - signature: - type: string - example: >- - W1HfKcc4F0rCSoxheZ7fsrB5nGK58U4gKysuzsmUwhloVnCxmbCx289uVMMvQN6tOcQsz7hMVTJrXSA1xzevvw== - pubkey: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Agey31h/NYpcy0sYm4liHMrXJMzbQUrgV4uHd/w09CXN - '400': - description: Invalid request - '500': - description: Internal server error - /bep3/swap/refund: - post: - deprecated: true - summary: Generate a refund atomic swap transaction - consumes: - - application/json - produces: - - application/json - tags: - - BEP3 - parameters: - - in: body - name: Create atomic swap request body - schema: - properties: - base_req: - type: object - properties: - from: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: a memo - chain_id: - type: string - example: testing - account_number: - type: string - example: '1' - sequence: - type: string - example: '0' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.0' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - from: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - swap_id: - type: string - example: >- - 1b00244021ec239867e5b8c44bcd98e40f3148806a8c0a8fd3418872986becba - responses: - '200': - description: The transaction was successfully generated - schema: - type: object - properties: - msg: - type: array - items: - type: object - properties: - type: - type: string - example: cosmos-sdk/MsgSend - value: - type: object - properties: - from_address: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - to_address: - type: string - example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - fee: - type: object - properties: - gas: - type: string - example: '200000' - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - memo: - type: string - signatures: - type: array - items: - type: object - properties: - signature: - type: string - example: >- - W1HfKcc4F0rCSoxheZ7fsrB5nGK58U4gKysuzsmUwhloVnCxmbCx289uVMMvQN6tOcQsz7hMVTJrXSA1xzevvw== - pubkey: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Agey31h/NYpcy0sYm4liHMrXJMzbQUrgV4uHd/w09CXN - '400': - description: Invalid request - '500': - description: Internal server error - /bep3/swap/{swap-id}: - get: - deprecated: true - summary: Get the atomic swap object associated with the input swap ID - tags: - - BEP3 - produces: - - application/json - parameters: - - in: path - required: true - name: swap-id - description: the swap ID - type: string - x-example: 1b00244021ec239867e5b8c44bcd98e40f3148806a8c0a8fd3418872986becba - responses: - '200': - description: Atomic swap - schema: - type: object - properties: - height: - type: string - example: '548883' - result: - type: object - properties: - id: - type: string - example: >- - FFEA80A3D9A42427CC12DB957866C6D428C16AA5EA6D9A4A756EF04BF9F2FF06 - status: - type: string - example: Completed - amount: - type: object - properties: - denom: - type: string - example: bnb - amount: - type: string - example: '555555' - random_number_hash: - type: string - example: >- - 0b1e35e991bf052be230ae8dd3ff90b69a610160d28a9eb3c0701395f9d2b291 - expire_hieght: - type: string - example: '532463' - timestamp: - type: string - example: '1589020884' - sender: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - recipient: - type: string - description: bech32 encoded address - example: kava1atsrkjac6ulgmwhudfc36lnjfgv340vlvm757z - sender_other_chain: - type: string - description: address on another chain (binance) - example: bnb1uky3me9ggqypmrsvxk7ur6hqkzq7zmv4ed4ng7 - recipient_other_chain: - type: string - description: address on another chain (binance) - example: bnb10uypsspvl6jlxcx5xse02pag39l8xpe7a3468h - closed_block: - type: string - example: '532105' - cross_chain: - type: boolean - example: true - direction: - type: string - example: Incoming - '500': - description: Server internal error - /bep3/swaps: - get: - deprecated: true - summary: Get all atomic swaps - tags: - - BEP3 - produces: - - application/json - responses: - '200': - description: All atomic swaps - schema: - type: object - properties: - height: - type: string - example: '100' - result: - type: array - x-nullable: true - items: - type: object - properties: - id: - type: string - example: >- - FFEA80A3D9A42427CC12DB957866C6D428C16AA5EA6D9A4A756EF04BF9F2FF06 - status: - type: string - example: Completed - amount: - type: object - properties: - denom: - type: string - example: bnb - amount: - type: string - example: '555555' - random_number_hash: - type: string - example: >- - 0b1e35e991bf052be230ae8dd3ff90b69a610160d28a9eb3c0701395f9d2b291 - expire_hieght: - type: string - example: '532463' - timestamp: - type: string - example: '1589020884' - sender: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - recipient: - type: string - description: bech32 encoded address - example: kava1atsrkjac6ulgmwhudfc36lnjfgv340vlvm757z - sender_other_chain: - type: string - description: address on another chain (binance) - example: bnb1uky3me9ggqypmrsvxk7ur6hqkzq7zmv4ed4ng7 - recipient_other_chain: - type: string - description: address on another chain (binance) - example: bnb10uypsspvl6jlxcx5xse02pag39l8xpe7a3468h - closed_block: - type: string - example: '532105' - cross_chain: - type: boolean - example: true - direction: - type: string - example: Incoming - '500': - description: Server internal error - /bep3/supply/{denom}: - get: - deprecated: true - summary: Get the asset supply for the input denom - tags: - - BEP3 - produces: - - application/json - parameters: - - in: path - type: string - required: true - name: denom - x-example: bnb - responses: - '200': - description: Asset supply - schema: - type: object - properties: - height: - type: string - example: '100' - result: - type: object - properties: - denom: - type: string - example: bnb - incoming_supply: - type: object - properties: - denom: - type: string - example: bnb - amount: - type: string - example: '555555' - outgoing_supply: - type: object - properties: - denom: - type: string - example: bnb - amount: - type: string - example: '555555' - current_supply: - type: object - properties: - denom: - type: string - example: bnb - amount: - type: string - example: '555555' - limit: - type: object - properties: - denom: - type: string - example: bnb - amount: - type: string - example: '555555' - '500': - description: Server internal error - /bep3/parameters: - get: - deprecated: true - summary: Get the current parameters of the BEP3 module - tags: - - BEP3 - produces: - - application/json - responses: - '200': - description: BEP3 module parameters - schema: - type: object - properties: - height: - type: string - example: '548883' - result: - type: object - properties: - bnb_deputy_address: - type: string - example: kava1aphsdnz5hu2t5ty2au6znprug5kx3zpy6zwq29 - min_block_lock: - type: string - example: '80' - max_block_lock: - type: string - example: '3600' - supported_assets: - type: array - items: - type: object - properties: - denom: - type: string - example: bnb - coin_id: - type: string - example: '714' - limit: - type: string - example: '100' - active: - type: boolean - example: true - '500': - description: Server internal error - /auction/auctions/{id}/bids: - post: - deprecated: true - summary: Generate a place bid transaction - consumes: - - application/json - produces: - - application/json - tags: - - Auction - parameters: - - in: path - name: id - description: Auction id - required: true - type: string - x-example: '1' - - in: body - name: Auction bid request body - schema: - properties: - base_req: - type: object - properties: - from: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: a memo - chain_id: - type: string - example: testing - account_number: - type: string - example: '1' - sequence: - type: string - example: '0' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.0' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - amount: - type: object - properties: - denom: - type: string - example: usdx - amount: - type: string - example: '100000000' - responses: - '200': - description: The transaction was successfully generated - schema: - type: object - properties: - msg: - type: array - items: - type: object - properties: - type: - type: string - example: cosmos-sdk/MsgSend - value: - type: object - properties: - from_address: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - to_address: - type: string - example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - fee: - type: object - properties: - gas: - type: string - example: '200000' - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - memo: - type: string - signatures: - type: array - items: - type: object - properties: - signature: - type: string - example: >- - W1HfKcc4F0rCSoxheZ7fsrB5nGK58U4gKysuzsmUwhloVnCxmbCx289uVMMvQN6tOcQsz7hMVTJrXSA1xzevvw== - pubkey: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Agey31h/NYpcy0sYm4liHMrXJMzbQUrgV4uHd/w09CXN - '400': - description: Invalid request - '500': - description: Internal server error - /auction/parameters: - get: - deprecated: true - summary: Query auction parameters - produces: - - application/json - tags: - - Auction - responses: - '200': - description: OK - schema: - type: object - properties: - max_auction_duration: - type: string - example: '172800000000000' - bid_duration: - type: string - example: '600000000000' - increment_surplus: - type: string - example: '0.05' - increment_debt: - type: string - example: '0.05' - increment_collateral: - type: string - example: '0.05' - '500': - description: Internal Server Error - /auction/auctions: - get: - deprecated: true - summary: Query auctions - description: Query all ongoing auctions - produces: - - application/json - tags: - - Auction - responses: - '200': - description: OK - schema: - type: object - properties: - height: - type: string - example: '100' - result: - type: array - items: - type: object - properties: - id: - type: string - example: '1' - initiator: - type: string - example: liquidator - lot: - type: object - properties: - denom: - type: string - example: xrp - amount: - type: string - example: '10000000000' - bidder: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - bid: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - has_received_bids: - type: boolean - example: false - end_time: - type: string - example: '2020-02-05T23:45:55.761435272Z' - max_end_time: - type: string - example: '2020-02-05T23:45:55.761435272Z' - type: - type: string - example: collateral - phase: - type: string - example: forward - '500': - description: Internal Server Error - /auction/auctions/{id}: - get: - deprecated: true - summary: Query auction - description: Query auction by id - produces: - - application/json - tags: - - Auction - parameters: - - in: path - name: id - description: Auction id - required: true - type: string - x-example: '1' - responses: - '200': - description: OK - schema: - type: object - properties: - id: - type: string - example: '1' - initiator: - type: string - example: liquidator - lot: - type: object - properties: - denom: - type: string - example: xrp - amount: - type: string - example: '10000000000' - bidder: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - bid: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - has_received_bids: - type: boolean - example: false - end_time: - type: string - example: '2020-02-05T23:45:55.761435272Z' - max_end_time: - type: string - example: '2020-02-05T23:45:55.761435272Z' - type: - type: string - example: collateral - phase: - type: string - example: forward - '400': - description: invalid auction id - '500': - description: Internal Server Error - /pricefeed/postprice: - post: - deprecated: true - summary: Generate post price transaction - consumes: - - application/json - produces: - - application/json - tags: - - Pricefeed - parameters: - - description: post price request - name: post_price_req - in: body - required: true - schema: - type: object - properties: - base_req: - type: object - properties: - from: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: a memo - chain_id: - type: string - example: testing - account_number: - type: string - example: '1' - sequence: - type: string - example: '0' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.0' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - market_id: - type: string - example: xrp:usd - price: - type: string - example: '0.298464000000000007' - expiry: - type: string - example: '158551630291' - responses: - '200': - description: The transaction was successfully generated - schema: - type: object - properties: - msg: - type: array - items: - type: object - properties: - type: - type: string - example: cosmos-sdk/MsgSend - value: - type: object - properties: - from_address: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - to_address: - type: string - example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - fee: - type: object - properties: - gas: - type: string - example: '200000' - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - memo: - type: string - signatures: - type: array - items: - type: object - properties: - signature: - type: string - example: >- - W1HfKcc4F0rCSoxheZ7fsrB5nGK58U4gKysuzsmUwhloVnCxmbCx289uVMMvQN6tOcQsz7hMVTJrXSA1xzevvw== - pubkey: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Agey31h/NYpcy0sYm4liHMrXJMzbQUrgV4uHd/w09CXN - '400': - description: Invalid request - '500': - description: Internal server error - /pricefeed/parameters: - get: - deprecated: true - summary: Query pricefeed parameters - produces: - - application/json - tags: - - Pricefeed - responses: - '200': - description: OK - schema: - type: object - properties: - markets: - type: array - items: - type: object - properties: - market_id: - type: string - example: xrp:usd - base_asset: - type: string - example: xrp - quote_asset: - type: string - example: usd - oracles: - type: array - x-nullable: true - items: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - active: - type: boolean - example: true - '500': - description: Internal Server Error - /pricefeed/markets: - get: - deprecated: true - summary: Query markets in the pricefeed - produces: - - application/json - tags: - - Pricefeed - responses: - '200': - description: OK - schema: - type: object - properties: - height: - type: string - example: '100' - result: - type: array - items: - type: object - properties: - market_id: - type: string - example: xrp:usd - base_asset: - type: string - example: xrp - quote_asset: - type: string - example: usd - oracles: - type: array - x-nullable: true - items: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - active: - type: boolean - example: true - '500': - description: Internal Server Error - /pricefeed/oracles/{market_id}: - get: - deprecated: true - summary: Query markets in the pricefeed - produces: - - application/json - tags: - - Pricefeed - parameters: - - in: path - name: market_id - description: the market id of the market - required: true - type: string - x-example: xrp:usd - responses: - '200': - description: OK - schema: - type: object - properties: - height: - type: string - example: '100' - result: - type: array - items: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - '500': - description: Internal Server Error - /pricefeed/rawprices/{market_id}: - get: - deprecated: true - summary: Query markets in the pricefeed - produces: - - application/json - tags: - - Pricefeed - parameters: - - in: path - name: market_id - description: the market id of the market - required: true - type: string - x-example: xrp:usd - responses: - '200': - description: OK - schema: - type: object - properties: - height: - type: string - example: '100' - result: - type: array - items: - type: object - properties: - market_id: - type: string - example: xrp:usd - oracle_address: - type: string - example: kava10cw2m04528dwlc44k0myd7strj3eq5jr6s8pxs - price: - type: string - example: '0.298758999999999997' - expiry: - type: string - example: '2021-02-12T23:10:00Z' - '500': - description: Internal Server Error - /pricefeed/price/{market_id}: - get: - deprecated: true - summary: Query markets in the pricefeed - produces: - - application/json - tags: - - Pricefeed - parameters: - - in: path - name: market_id - description: the market id of the market - required: true - type: string - x-example: xrp:usd - responses: - '200': - description: OK - schema: - type: object - properties: - market_id: - type: string - example: xrp:usd - price: - type: string - example: '0.298758999999999997' - '500': - description: Internal Server Error - /incentive/claim-cdp: - post: - deprecated: true - summary: Claim USDX incentive rewards from earned from CDPs - tags: - - Incentive - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: Incentive claim CDP body - schema: - properties: - base_req: - type: object - properties: - from: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: a memo - chain_id: - type: string - example: testing - account_number: - type: string - example: '1' - sequence: - type: string - example: '0' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.0' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - sender: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - multiplier_name: - type: string - example: small - denoms_to_claim: - type: array - items: - type: string - example: ukava - responses: - '200': - description: OK - schema: - type: object - properties: - msg: - type: array - items: - type: object - properties: - type: - type: string - example: cosmos-sdk/MsgSend - value: - type: object - properties: - from_address: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - to_address: - type: string - example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - fee: - type: object - properties: - gas: - type: string - example: '200000' - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - memo: - type: string - signatures: - type: array - items: - type: object - properties: - signature: - type: string - example: >- - W1HfKcc4F0rCSoxheZ7fsrB5nGK58U4gKysuzsmUwhloVnCxmbCx289uVMMvQN6tOcQsz7hMVTJrXSA1xzevvw== - pubkey: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Agey31h/NYpcy0sYm4liHMrXJMzbQUrgV4uHd/w09CXN - '400': - description: Invalid request - '500': - description: Internal server error - /incentive/claim-hard: - post: - deprecated: true - summary: Claim Hard supply/borrow rewards - tags: - - Incentive - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: Incentive claim Hard body - schema: - properties: - base_req: - type: object - properties: - from: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: a memo - chain_id: - type: string - example: testing - account_number: - type: string - example: '1' - sequence: - type: string - example: '0' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.0' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - sender: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - multiplier_name: - type: string - example: small - denoms_to_claim: - type: array - items: - type: string - example: ukava - responses: - '200': - description: OK - schema: - type: object - properties: - msg: - type: array - items: - type: object - properties: - type: - type: string - example: cosmos-sdk/MsgSend - value: - type: object - properties: - from_address: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - to_address: - type: string - example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - fee: - type: object - properties: - gas: - type: string - example: '200000' - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - memo: - type: string - signatures: - type: array - items: - type: object - properties: - signature: - type: string - example: >- - W1HfKcc4F0rCSoxheZ7fsrB5nGK58U4gKysuzsmUwhloVnCxmbCx289uVMMvQN6tOcQsz7hMVTJrXSA1xzevvw== - pubkey: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Agey31h/NYpcy0sYm4liHMrXJMzbQUrgV4uHd/w09CXN - '400': - description: Invalid request - '500': - description: Internal server error - /incentive/claim-delegator: - post: - deprecated: true - summary: Claim Kava delegation rewards - tags: - - Incentive - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: Incentive claim delegator body - schema: - properties: - base_req: - type: object - properties: - from: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: a memo - chain_id: - type: string - example: testing - account_number: - type: string - example: '1' - sequence: - type: string - example: '0' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.0' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - sender: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - multiplier_name: - type: string - example: small - denoms_to_claim: - type: array - items: - type: string - example: ukava - responses: - '200': - description: OK - schema: - type: object - properties: - msg: - type: array - items: - type: object - properties: - type: - type: string - example: cosmos-sdk/MsgSend - value: - type: object - properties: - from_address: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - to_address: - type: string - example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - fee: - type: object - properties: - gas: - type: string - example: '200000' - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - memo: - type: string - signatures: - type: array - items: - type: object - properties: - signature: - type: string - example: >- - W1HfKcc4F0rCSoxheZ7fsrB5nGK58U4gKysuzsmUwhloVnCxmbCx289uVMMvQN6tOcQsz7hMVTJrXSA1xzevvw== - pubkey: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Agey31h/NYpcy0sYm4liHMrXJMzbQUrgV4uHd/w09CXN - '400': - description: Invalid request - '500': - description: Internal server error - /incentive/claim-swap: - post: - deprecated: true - summary: Claim Swap liquidity provider rewards - tags: - - Incentive - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: Incentive claim swap body - schema: - properties: - base_req: - type: object - properties: - from: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: a memo - chain_id: - type: string - example: testing - account_number: - type: string - example: '1' - sequence: - type: string - example: '0' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.0' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - sender: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - multiplier_name: - type: string - example: small - denoms_to_claim: - type: array - items: - type: string - example: ukava - responses: - '200': - description: OK - schema: - type: object - properties: - msg: - type: array - items: - type: object - properties: - type: - type: string - example: cosmos-sdk/MsgSend - value: - type: object - properties: - from_address: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - to_address: - type: string - example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - fee: - type: object - properties: - gas: - type: string - example: '200000' - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - memo: - type: string - signatures: - type: array - items: - type: object - properties: - signature: - type: string - example: >- - W1HfKcc4F0rCSoxheZ7fsrB5nGK58U4gKysuzsmUwhloVnCxmbCx289uVMMvQN6tOcQsz7hMVTJrXSA1xzevvw== - pubkey: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Agey31h/NYpcy0sYm4liHMrXJMzbQUrgV4uHd/w09CXN - '400': - description: Invalid request - '500': - description: Internal server error - /incentive/rewards: - get: - deprecated: true - summary: Get earned Incentive rewards - tags: - - Incentive - produces: - - application/json - responses: - '200': - description: Incentive rewards - schema: - type: object - properties: - height: - type: string - example: '100' - result: - type: array - x-nullable: true - items: - type: object - properties: - hard_claims: - type: array - items: - type: object - properties: - base_claim: - type: object - properties: - owner: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - reward: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - supply_reward_indexes: - type: array - items: - type: object - properties: - collateral_type: - type: string - example: bnb - reward_indexes: - type: array - items: - type: object - properties: - collateral_type: - type: string - example: bnb - reward_factor: - type: string - example: '1.2581' - borrow_reward_indexes: - type: array - items: - type: object - properties: - collateral_type: - type: string - example: bnb - reward_indexes: - type: array - items: - type: object - properties: - collateral_type: - type: string - example: bnb - reward_factor: - type: string - example: '1.2581' - delegator_reward_indexes: - type: array - items: - type: object - properties: - collateral_type: - type: string - example: bnb - reward_factor: - type: string - example: '1.2581' - usdx_minting_claims: - type: array - items: - type: object - properties: - base_claim: - type: object - properties: - owner: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - reward: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - reward_indexes: - type: array - items: - type: object - properties: - collateral_type: - type: string - example: bnb - reward_factor: - type: string - example: '1.2581' - '500': - description: Server internal error - /incentive/parameters: - get: - deprecated: true - summary: Get the current parameters of the incentive module - tags: - - Incentive - produces: - - application/json - responses: - '200': - description: USDX Incentive Claims - schema: - type: object - properties: - height: - type: string - example: '100' - result: - type: array - x-nullable: true - items: - type: object - properties: - usdx_minting_reward_periods: - type: array - items: - type: object - properties: - active: - type: boolean - example: true - collateral_type: - type: string - example: bnb - start: - type: string - example: '2020-02-05T23:45:55.761435272Z' - end: - type: string - example: '2024-02-05T23:45:55.761435272Z' - rewards_per_second: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - hard_supply_reward_periods: - type: array - items: - type: object - properties: - active: - type: boolean - example: true - collateral_type: - type: string - example: bnb - start: - type: string - example: '2020-02-05T23:45:55.761435272Z' - end: - type: string - example: '2024-02-05T23:45:55.761435272Z' - rewards_per_second: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - hard_borrow_reward_periods: - type: array - items: - type: object - properties: - active: - type: boolean - example: true - collateral_type: - type: string - example: bnb - start: - type: string - example: '2020-02-05T23:45:55.761435272Z' - end: - type: string - example: '2024-02-05T23:45:55.761435272Z' - rewards_per_second: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - hard_delegator_reward_periods: - type: array - items: - type: object - properties: - active: - type: boolean - example: true - collateral_type: - type: string - example: bnb - start: - type: string - example: '2020-02-05T23:45:55.761435272Z' - end: - type: string - example: '2024-02-05T23:45:55.761435272Z' - rewards_per_second: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - claim_multipliers: - type: array - items: - type: object - properties: - name: - type: string - example: small - months_lockup: - type: string - example: '12' - factor: - type: string - example: '0.33' - claim_end: - type: string - example: '2022-02-05T23:45:55.761435272Z' - '500': - description: Server internal error - /vesting/circulatingsupply: - get: - deprecated: true - summary: Get the current circulating supply of KAVA - tags: - - Vesting - produces: - - application/json - responses: - '200': - description: KAVA circulating supply - schema: - properties: - height: - type: string - example: '100' - result: - type: string - example: '81443180' - '500': - description: Server internal error - /vesting/totalsupply: - get: - deprecated: true - summary: Get the total supply of KAVA - tags: - - Vesting - produces: - - application/json - responses: - '200': - description: KAVA total supply - schema: - properties: - height: - type: string - example: '100' - result: - type: string - example: '120000000' - '500': - description: Server internal error - /vesting/circulatingsupplyhard: - get: - deprecated: true - summary: Get the current circulating supply of HARD - tags: - - Vesting - produces: - - application/json - responses: - '200': - description: HARD circulating supply - schema: - properties: - height: - type: string - example: '100' - result: - type: string - example: '63750000' - '500': - description: Server internal error - /vesting/totalsupplyhard: - get: - deprecated: true - summary: Get the total supply of HARD - tags: - - Vesting - produces: - - application/json - responses: - '200': - description: HARD total supply - schema: - properties: - height: - type: string - example: '100' - result: - type: string - example: '200000000' - '500': - description: Server internal error - /vesting/circulatingsupplyswp: - get: - deprecated: true - summary: Get the current circulating supply of SWP - tags: - - Vesting - produces: - - application/json - responses: - '200': - description: SWP circulating supply - schema: - properties: - height: - type: string - example: '100' - result: - type: string - example: '63750000' - '500': - description: Server internal error - /vesting/circulatingsupplyusdx: - get: - deprecated: true - summary: Get the current circulating supply of USDX - tags: - - Vesting - produces: - - application/json - responses: - '200': - description: USDX circulating supply - schema: - properties: - height: - type: string - example: '100' - result: - type: string - example: '63750000' - '500': - description: Server internal error - /vesting/totalsupplyusdx: - get: - deprecated: true - summary: Get the total supply of USDX - tags: - - Vesting - produces: - - application/json - responses: - '200': - description: USDX total supply - schema: - properties: - height: - type: string - example: '100' - result: - type: string - example: '200000000' - '500': - description: Server internal error - /committee/committees/{committee-id}/proposals: - post: - deprecated: true - summary: Create a new proposal for a committee - tags: - - Committee - consumes: - - application/json - produces: - - application/json - parameters: - - in: path - name: committee-id - required: true - type: string - x-example: 1 - - in: body - name: proposal request body - schema: - properties: - base_req: - type: object - properties: - from: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: a memo - chain_id: - type: string - example: testing - account_number: - type: string - example: '1' - sequence: - type: string - example: '0' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.0' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - pub_proposal: - type: object - properties: - title: - type: string - example: the title of the proposal - description: - type: string - example: the description of the proposal - proposer: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - responses: - '200': - description: The transaction was successfully generated - schema: - type: object - properties: - msg: - type: array - items: - type: object - properties: - type: - type: string - example: cosmos-sdk/MsgSend - value: - type: object - properties: - from_address: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - to_address: - type: string - example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - fee: - type: object - properties: - gas: - type: string - example: '200000' - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - memo: - type: string - signatures: - type: array - items: - type: object - properties: - signature: - type: string - example: >- - W1HfKcc4F0rCSoxheZ7fsrB5nGK58U4gKysuzsmUwhloVnCxmbCx289uVMMvQN6tOcQsz7hMVTJrXSA1xzevvw== - pubkey: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Agey31h/NYpcy0sYm4liHMrXJMzbQUrgV4uHd/w09CXN - '400': - description: Invalid request - '500': - description: Internal server error - get: - deprecated: true - summary: Query proposals - description: Query all proposals for a committee - produces: - - application/json - tags: - - Committee - parameters: - - in: path - name: committee-id - required: true - type: string - x-example: 1 - responses: - '200': - description: Committee governance proposals - schema: - type: object - properties: - height: - type: string - example: '100' - result: - type: array - items: - type: object - properties: - pub_proposal: - type: object - properties: - title: - type: string - example: the title of the proposal - description: - type: string - example: the description of the proposal - id: - type: string - example: '1' - committee_id: - type: string - example: '1' - deadline: - type: string - example: '2020-05-10T16:18:43.752522893Z' - '400': - description: Invalid query parameters - '500': - description: Internal Server Error - /committee/proposals/{proposal-id}/votes: - post: - deprecated: true - summary: Create a new vote for a proposal - tags: - - Committee - consumes: - - application/json - produces: - - application/json - parameters: - - in: path - name: proposal-id - required: true - type: string - x-example: 1 - - in: body - name: proposal request body - schema: - properties: - base_req: - type: object - properties: - from: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: a memo - chain_id: - type: string - example: testing - account_number: - type: string - example: '1' - sequence: - type: string - example: '0' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.0' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - voter: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - vote_type: - type: string - example: 'yes' - responses: - '200': - description: The transaction was successfully generated - schema: - type: object - properties: - msg: - type: array - items: - type: object - properties: - type: - type: string - example: cosmos-sdk/MsgSend - value: - type: object - properties: - from_address: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - to_address: - type: string - example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - fee: - type: object - properties: - gas: - type: string - example: '200000' - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - memo: - type: string - signatures: - type: array - items: - type: object - properties: - signature: - type: string - example: >- - W1HfKcc4F0rCSoxheZ7fsrB5nGK58U4gKysuzsmUwhloVnCxmbCx289uVMMvQN6tOcQsz7hMVTJrXSA1xzevvw== - pubkey: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Agey31h/NYpcy0sYm4liHMrXJMzbQUrgV4uHd/w09CXN - '400': - description: Invalid request - '500': - description: Internal server error - get: - deprecated: true - summary: Query proposal votes - description: Query proposal votes by proposal ID - tags: - - Committee - produces: - - application/json - parameters: - - in: path - name: proposal-id - required: true - type: string - x-example: 1 - responses: - '200': - description: Votes - schema: - type: object - properties: - height: - type: string - example: '100' - result: - type: array - items: - type: object - properties: - voter: - type: string - proposal_id: - type: string - vote_type: - type: string - '400': - description: Invalid query parameters - '500': - description: Internal Server Error - /committee/committees: - get: - deprecated: true - summary: Query committees - description: Query all committees - tags: - - Committee - produces: - - application/json - responses: - '200': - description: Committees - schema: - type: object - properties: - height: - type: string - example: '100' - result: - type: array - items: - type: object - properties: - id: - type: string - example: '1' - description: - type: string - example: description of committee - members: - type: array - items: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - permissions: - type: array - items: - type: object - properties: - type: - type: string - example: param_change_permission - allowed_params: - type: array - items: - type: object - properties: - subspace: - type: string - example: cdp - key: - type: string - example: collateral_params - vote_threshold: - type: string - example: '0.5' - proposal_duration: - type: string - example: '3600000000000' - '400': - description: Invalid query parameters - '500': - description: Internal Server Error - /committee/committees/{committee-id}: - get: - deprecated: true - summary: Query committee - description: Query committee by ID - tags: - - Committee - produces: - - application/json - parameters: - - in: path - name: committee-id - required: true - type: string - x-example: 1 - responses: - '200': - description: Committee - schema: - type: object - properties: - height: - type: string - example: '100' - result: - type: object - properties: - id: - type: string - example: '1' - description: - type: string - example: description of committee - members: - type: array - items: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - permissions: - type: array - items: - type: object - properties: - type: - type: string - example: param_change_permission - allowed_params: - type: array - items: - type: object - properties: - subspace: - type: string - example: cdp - key: - type: string - example: collateral_params - vote_threshold: - type: string - example: '0.5' - proposal_duration: - type: string - example: '3600000000000' - '400': - description: Invalid query parameters - '500': - description: Internal Server Error - /committee/proposals/{proposal-id}: - get: - deprecated: true - summary: Query proposal - description: Query proposal by ID - tags: - - Committee - produces: - - application/json - parameters: - - in: path - name: proposal-id - required: true - type: string - x-example: 1 - responses: - '200': - description: Proposal - schema: - type: object - properties: - height: - type: string - example: '100' - result: - type: object - properties: - pub_proposal: - type: object - properties: - title: - type: string - example: the title of the proposal - description: - type: string - example: the description of the proposal - id: - type: string - example: '1' - committee_id: - type: string - example: '1' - deadline: - type: string - example: '2020-05-10T16:18:43.752522893Z' - '400': - description: Invalid query parameters - '500': - description: Internal Server Error - /committee/proposals/{proposal-id}/propser: - get: - deprecated: true - summary: Query proposer - description: Query proposer by proposal ID - tags: - - Committee - produces: - - application/json - parameters: - - in: path - name: proposal-id - required: true - type: string - x-example: 1 - responses: - '200': - description: Proposer - schema: - type: object - properties: - height: - type: string - example: '100' - result: - type: object - properties: - proposal_id: - type: string - example: '1' - proposer: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - '400': - description: Invalid query parameters - '500': - description: Internal Server Error - /committee/proposals/{proposal-id}/tally: - get: - deprecated: true - summary: Query proposal tally - description: Query proposal tally by proposal ID - tags: - - Committee - produces: - - application/json - parameters: - - in: path - name: proposal-id - required: true - type: string - x-example: 1 - responses: - '200': - description: Vote tally - schema: - type: object - properties: - height: - type: string - example: '100' - result: - type: string - example: '3' - '400': - description: Invalid query parameters - '500': - description: Internal Server Error - /hard/deposit: - post: - deprecated: true - summary: Deposit funds to hard liquidity pool - tags: - - Hard - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: hard deposit body - schema: - properties: - base_req: - type: object - properties: - from: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: a memo - chain_id: - type: string - example: testing - account_number: - type: string - example: '1' - sequence: - type: string - example: '0' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.0' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - depositor: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - amount: - $ref: '#/definitions/LegacyCoins' - responses: - '200': - description: OK - schema: - type: object - properties: - msg: - type: array - items: - type: object - properties: - type: - type: string - example: cosmos-sdk/MsgSend - value: - type: object - properties: - from_address: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - to_address: - type: string - example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - fee: - type: object - properties: - gas: - type: string - example: '200000' - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - memo: - type: string - signatures: - type: array - items: - type: object - properties: - signature: - type: string - example: >- - W1HfKcc4F0rCSoxheZ7fsrB5nGK58U4gKysuzsmUwhloVnCxmbCx289uVMMvQN6tOcQsz7hMVTJrXSA1xzevvw== - pubkey: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Agey31h/NYpcy0sYm4liHMrXJMzbQUrgV4uHd/w09CXN - '400': - description: Invalid request - '500': - description: Internal server error - /hard/withdraw: - post: - deprecated: true - summary: Withdraw funds from hard liquidity pool - tags: - - Hard - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: hard withdraw body - schema: - properties: - base_req: - type: object - properties: - from: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: a memo - chain_id: - type: string - example: testing - account_number: - type: string - example: '1' - sequence: - type: string - example: '0' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.0' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - depositor: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - amount: - $ref: '#/definitions/LegacyCoins' - responses: - '200': - description: OK - schema: - type: object - properties: - msg: - type: array - items: - type: object - properties: - type: - type: string - example: cosmos-sdk/MsgSend - value: - type: object - properties: - from_address: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - to_address: - type: string - example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - fee: - type: object - properties: - gas: - type: string - example: '200000' - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - memo: - type: string - signatures: - type: array - items: - type: object - properties: - signature: - type: string - example: >- - W1HfKcc4F0rCSoxheZ7fsrB5nGK58U4gKysuzsmUwhloVnCxmbCx289uVMMvQN6tOcQsz7hMVTJrXSA1xzevvw== - pubkey: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Agey31h/NYpcy0sYm4liHMrXJMzbQUrgV4uHd/w09CXN - '400': - description: Invalid request - '500': - description: Internal server error - /hard/borrow: - post: - deprecated: true - summary: Borrow funds from hard liquidity pool - tags: - - Hard - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: hard borrow body - schema: - properties: - base_req: - type: object - properties: - from: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: a memo - chain_id: - type: string - example: testing - account_number: - type: string - example: '1' - sequence: - type: string - example: '0' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.0' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - depositor: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - amount: - $ref: '#/definitions/LegacyCoins' - responses: - '200': - description: OK - schema: - type: object - properties: - msg: - type: array - items: - type: object - properties: - type: - type: string - example: cosmos-sdk/MsgSend - value: - type: object - properties: - from_address: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - to_address: - type: string - example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - fee: - type: object - properties: - gas: - type: string - example: '200000' - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - memo: - type: string - signatures: - type: array - items: - type: object - properties: - signature: - type: string - example: >- - W1HfKcc4F0rCSoxheZ7fsrB5nGK58U4gKysuzsmUwhloVnCxmbCx289uVMMvQN6tOcQsz7hMVTJrXSA1xzevvw== - pubkey: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Agey31h/NYpcy0sYm4liHMrXJMzbQUrgV4uHd/w09CXN - '400': - description: Invalid request - '500': - description: Internal server error - /hard/repay: - post: - deprecated: true - summary: Repay funds borrowed from hard liquidity pool - tags: - - Hard - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: hard repay body - schema: - properties: - base_req: - type: object - properties: - from: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: a memo - chain_id: - type: string - example: testing - account_number: - type: string - example: '1' - sequence: - type: string - example: '0' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.0' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - owner: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - amount: - $ref: '#/definitions/LegacyCoins' - responses: - '200': - description: OK - schema: - type: object - properties: - msg: - type: array - items: - type: object - properties: - type: - type: string - example: cosmos-sdk/MsgSend - value: - type: object - properties: - from_address: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - to_address: - type: string - example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - fee: - type: object - properties: - gas: - type: string - example: '200000' - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - memo: - type: string - signatures: - type: array - items: - type: object - properties: - signature: - type: string - example: >- - W1HfKcc4F0rCSoxheZ7fsrB5nGK58U4gKysuzsmUwhloVnCxmbCx289uVMMvQN6tOcQsz7hMVTJrXSA1xzevvw== - pubkey: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Agey31h/NYpcy0sYm4liHMrXJMzbQUrgV4uHd/w09CXN - '400': - description: Invalid request - '500': - description: Internal server error - /hard/liquidate: - post: - deprecated: true - summary: Attempt to liquidate a borrower that is over their loan-to-value - tags: - - Hard - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: hard liquidate body - schema: - properties: - base_req: - type: object - properties: - from: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: a memo - chain_id: - type: string - example: testing - account_number: - type: string - example: '1' - sequence: - type: string - example: '0' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.0' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - borrower: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - responses: - '200': - description: OK - schema: - type: object - properties: - msg: - type: array - items: - type: object - properties: - type: - type: string - example: cosmos-sdk/MsgSend - value: - type: object - properties: - from_address: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - to_address: - type: string - example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - fee: - type: object - properties: - gas: - type: string - example: '200000' - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - memo: - type: string - signatures: - type: array - items: - type: object - properties: - signature: - type: string - example: >- - W1HfKcc4F0rCSoxheZ7fsrB5nGK58U4gKysuzsmUwhloVnCxmbCx289uVMMvQN6tOcQsz7hMVTJrXSA1xzevvw== - pubkey: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Agey31h/NYpcy0sYm4liHMrXJMzbQUrgV4uHd/w09CXN - '400': - description: Invalid request - '500': - description: Internal server error - /hard/parameters: - get: - deprecated: true - summary: Get the current parameters of the hard module - tags: - - Hard - produces: - - application/json - responses: - '200': - description: Hard module parameters - schema: - type: object - properties: - height: - type: string - example: '100' - result: - type: array - x-nullable: true - items: - type: object - properties: - money_markets: - type: array - items: - type: object - properties: - denom: - type: string - example: bnb - borrow_limit: - type: object - properties: - has_max_limit: - type: boolean - example: true - maximum_limit: - type: string - example: '100000000000000' - loan_to_value: - type: string - example: '0.8' - spot_market_id: - type: string - example: bnb:usd - conversion_factor: - type: string - example: '100000000' - interest_rate_model: - type: object - properties: - base_rate_apy: - type: string - example: '0' - base_multiplier: - type: string - example: '0.1' - kink: - type: string - example: '0.8' - jump_multiplier: - type: string - example: '0.5' - reserve_factor: - type: string - example: '0.05' - keeper_reward_percentage: - type: string - example: '0.05' - minimum_borrow_usd_value: - type: string - example: '10' - '500': - description: Server internal error - /hard/total-deposited: - get: - deprecated: true - summary: Get total coins deposited to hard liquidity pools - tags: - - Hard - produces: - - application/json - parameters: - - in: query - name: denom - description: Coin denom - required: false - type: string - x-example: btc - responses: - '200': - description: total coins deposited - schema: - type: object - properties: - height: - type: string - example: '100' - result: - type: array - x-nullable: true - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - '500': - description: Server internal error - /hard/total-borrowed: - get: - deprecated: true - summary: Get total coins borrowed from hard liquidity pools - tags: - - Hard - produces: - - application/json - parameters: - - in: query - name: denom - description: Coin denom - required: false - type: string - x-example: btc - responses: - '200': - description: total coins borrowed - schema: - type: object - properties: - height: - type: string - example: '100' - result: - type: array - x-nullable: true - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - '500': - description: Server internal error - /hard/reserves: - get: - deprecated: true - summary: Get total hard reserve coins - tags: - - Hard - produces: - - application/json - parameters: - - in: query - name: denom - description: Coin denom - required: false - type: string - x-example: btc - responses: - '200': - description: reserve coins - schema: - type: object - properties: - height: - type: string - example: '100' - result: - type: array - x-nullable: true - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - '500': - description: Server internal error - /hard/interest-rate: - get: - deprecated: true - summary: Get the hard module interest rates - tags: - - Hard - produces: - - application/json - parameters: - - in: query - name: denom - description: Money market denom - required: false - type: string - x-example: bnb - responses: - '200': - description: money market interest rates - schema: - type: object - properties: - height: - type: string - example: '100' - result: - type: array - x-nullable: true - items: - type: object - properties: - denom: - type: string - example: bnb - supply_interest_rate: - type: string - example: '5.25' - borrow_interest_rate: - type: string - example: '5.25' - '500': - description: Server internal error - /hard/accounts: - get: - deprecated: true - summary: Get the hard module accounts - tags: - - Hard - produces: - - application/json - responses: - '200': - description: The hard module accounts - schema: - type: object - properties: - height: - type: string - example: '100' - result: - type: array - items: - type: object - properties: - account_number: - type: number - address: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - coins: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - name: - type: string - permissions: - type: array - items: - type: string - public_key: - type: object - properties: - type: - type: string - value: - type: string - sequence: - type: number - '500': - description: Server internal error - /hard/deposits: - get: - deprecated: true - summary: Get hard deposits - tags: - - Hard - produces: - - application/json - parameters: - - in: query - name: denom - description: Deposit coin denom - required: false - type: string - x-example: btc - - in: query - name: owner - description: Owner address in bech32 format - required: false - type: string - x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - - in: query - name: page - description: The page number. - type: integer - x-example: 1 - - in: query - name: limit - description: The maximum number of items per page. - type: integer - x-example: 100 - responses: - '200': - description: hard deposits - schema: - type: object - properties: - height: - type: string - example: '100' - result: - type: array - x-nullable: true - items: - type: object - properties: - depositor: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - index: - type: array - items: - type: object - properties: - denom: - type: string - example: bnb - value: - type: string - example: '0.1258' - '500': - description: Server internal error - /hard/borrows: - get: - deprecated: true - summary: Get hard borrows - tags: - - Hard - produces: - - application/json - parameters: - - in: query - name: denom - description: Borrow coin denom - required: false - type: string - x-example: btc - - in: query - name: owner - description: Owner address in bech32 format - required: false - type: string - x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - - in: query - name: page - description: The page number. - type: integer - x-example: 1 - - in: query - name: limit - description: The maximum number of items per page. - type: integer - x-example: 100 - responses: - '200': - description: hard borrows - schema: - type: object - properties: - height: - type: string - example: '100' - result: - type: array - x-nullable: true - items: - type: object - properties: - borrower: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - index: - type: array - items: - type: object - properties: - denom: - type: string - example: bnb - value: - type: string - example: '0.1258' - '500': - description: Server internal error - /issuance/issue: - post: - deprecated: true - summary: Issue tokens - tags: - - Issuance - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: Issue tokens body - schema: - properties: - base_req: - type: object - properties: - from: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: a memo - chain_id: - type: string - example: testing - account_number: - type: string - example: '1' - sequence: - type: string - example: '0' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.0' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - sender: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - tokens: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - receiver: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - responses: - '200': - description: OK - schema: - type: object - properties: - msg: - type: array - items: - type: object - properties: - type: - type: string - example: cosmos-sdk/MsgSend - value: - type: object - properties: - from_address: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - to_address: - type: string - example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - fee: - type: object - properties: - gas: - type: string - example: '200000' - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - memo: - type: string - signatures: - type: array - items: - type: object - properties: - signature: - type: string - example: >- - W1HfKcc4F0rCSoxheZ7fsrB5nGK58U4gKysuzsmUwhloVnCxmbCx289uVMMvQN6tOcQsz7hMVTJrXSA1xzevvw== - pubkey: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Agey31h/NYpcy0sYm4liHMrXJMzbQUrgV4uHd/w09CXN - '400': - description: Invalid request - '500': - description: Internal server error - /issuance/redeem: - post: - deprecated: true - summary: Redeem tokens - tags: - - Issuance - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: Redeem tokens body - schema: - properties: - base_req: - type: object - properties: - from: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: a memo - chain_id: - type: string - example: testing - account_number: - type: string - example: '1' - sequence: - type: string - example: '0' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.0' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - sender: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - tokens: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - responses: - '200': - description: OK - schema: - type: object - properties: - msg: - type: array - items: - type: object - properties: - type: - type: string - example: cosmos-sdk/MsgSend - value: - type: object - properties: - from_address: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - to_address: - type: string - example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - fee: - type: object - properties: - gas: - type: string - example: '200000' - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - memo: - type: string - signatures: - type: array - items: - type: object - properties: - signature: - type: string - example: >- - W1HfKcc4F0rCSoxheZ7fsrB5nGK58U4gKysuzsmUwhloVnCxmbCx289uVMMvQN6tOcQsz7hMVTJrXSA1xzevvw== - pubkey: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Agey31h/NYpcy0sYm4liHMrXJMzbQUrgV4uHd/w09CXN - '400': - description: Invalid request - '500': - description: Internal server error - /issuance/block: - post: - deprecated: true - summary: Block an address from using an issued token - tags: - - Issuance - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: Block address body - schema: - properties: - base_req: - type: object - properties: - from: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: a memo - chain_id: - type: string - example: testing - account_number: - type: string - example: '1' - sequence: - type: string - example: '0' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.0' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - sender: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - denom: - type: string - example: usdt - blocked_address: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - responses: - '200': - description: OK - schema: - type: object - properties: - msg: - type: array - items: - type: object - properties: - type: - type: string - example: cosmos-sdk/MsgSend - value: - type: object - properties: - from_address: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - to_address: - type: string - example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - fee: - type: object - properties: - gas: - type: string - example: '200000' - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - memo: - type: string - signatures: - type: array - items: - type: object - properties: - signature: - type: string - example: >- - W1HfKcc4F0rCSoxheZ7fsrB5nGK58U4gKysuzsmUwhloVnCxmbCx289uVMMvQN6tOcQsz7hMVTJrXSA1xzevvw== - pubkey: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Agey31h/NYpcy0sYm4liHMrXJMzbQUrgV4uHd/w09CXN - '400': - description: Invalid request - '500': - description: Internal server error - /issuance/unblock: - post: - deprecated: true - summary: Unblock an address from using an issued token - tags: - - Issuance - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: Unblock address body - schema: - properties: - base_req: - type: object - properties: - from: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: a memo - chain_id: - type: string - example: testing - account_number: - type: string - example: '1' - sequence: - type: string - example: '0' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.0' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - sender: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - denom: - type: string - example: usdt - address: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - responses: - '200': - description: OK - schema: - type: object - properties: - msg: - type: array - items: - type: object - properties: - type: - type: string - example: cosmos-sdk/MsgSend - value: - type: object - properties: - from_address: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - to_address: - type: string - example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - fee: - type: object - properties: - gas: - type: string - example: '200000' - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - memo: - type: string - signatures: - type: array - items: - type: object - properties: - signature: - type: string - example: >- - W1HfKcc4F0rCSoxheZ7fsrB5nGK58U4gKysuzsmUwhloVnCxmbCx289uVMMvQN6tOcQsz7hMVTJrXSA1xzevvw== - pubkey: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Agey31h/NYpcy0sYm4liHMrXJMzbQUrgV4uHd/w09CXN - '400': - description: Invalid request - '500': - description: Internal server error - /issuance/pause: - post: - deprecated: true - summary: Set an issued token's pause status - tags: - - Issuance - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: Set pause status body - schema: - properties: - base_req: - type: object - properties: - from: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: a memo - chain_id: - type: string - example: testing - account_number: - type: string - example: '1' - sequence: - type: string - example: '0' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.0' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - sender: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - denom: - type: string - example: usdt - status: - type: boolean - example: true - responses: - '200': - description: OK - schema: - type: object - properties: - msg: - type: array - items: - type: object - properties: - type: - type: string - example: cosmos-sdk/MsgSend - value: - type: object - properties: - from_address: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - to_address: - type: string - example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - fee: - type: object - properties: - gas: - type: string - example: '200000' - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - memo: - type: string - signatures: - type: array - items: - type: object - properties: - signature: - type: string - example: >- - W1HfKcc4F0rCSoxheZ7fsrB5nGK58U4gKysuzsmUwhloVnCxmbCx289uVMMvQN6tOcQsz7hMVTJrXSA1xzevvw== - pubkey: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Agey31h/NYpcy0sYm4liHMrXJMzbQUrgV4uHd/w09CXN - '400': - description: Invalid request - '500': - description: Internal server error - /issuance/parameters: - get: - deprecated: true - summary: Get the current parameters of the Issuance module - tags: - - Issuance - produces: - - application/json - responses: - '200': - description: Issuance parameters - schema: - type: object - properties: - height: - type: string - example: '100' - result: - type: array - x-nullable: true - items: - type: object - properties: - assets: - type: array - items: - type: object - properties: - owner: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - denom: - type: string - example: btc - blocked_addresses: - type: array - items: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - paused: - type: boolean - example: false - blockable: - type: boolean - example: true - rate_limit: - type: object - properties: - active: - type: boolean - example: true - limit: - type: string - example: '500000000' - time_period: - type: string - example: '518400000000000' - '500': - description: Server internal error - /swap/deposit: - post: - deprecated: true - summary: Deposit funds to swap liquidity pool - tags: - - Swap - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: swap deposit body - schema: - properties: - base_req: - type: object - properties: - from: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: a memo - chain_id: - type: string - example: testing - account_number: - type: string - example: '1' - sequence: - type: string - example: '0' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.0' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - depositor: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - token_a: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - token_b: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - slippage: - type: string - example: '0.05' - deadline: - type: string - example: '1628073801' - responses: - '200': - description: OK - schema: - type: object - properties: - msg: - type: array - items: - type: object - properties: - type: - type: string - example: cosmos-sdk/MsgSend - value: - type: object - properties: - from_address: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - to_address: - type: string - example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - fee: - type: object - properties: - gas: - type: string - example: '200000' - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - memo: - type: string - signatures: - type: array - items: - type: object - properties: - signature: - type: string - example: >- - W1HfKcc4F0rCSoxheZ7fsrB5nGK58U4gKysuzsmUwhloVnCxmbCx289uVMMvQN6tOcQsz7hMVTJrXSA1xzevvw== - pubkey: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Agey31h/NYpcy0sYm4liHMrXJMzbQUrgV4uHd/w09CXN - '400': - description: Invalid request - '500': - description: Internal server error - /swap/withdraw: - post: - deprecated: true - summary: Withdraw funds from a swap liquidity pool - tags: - - Swap - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: swap withdraw body - schema: - properties: - base_req: - type: object - properties: - from: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: a memo - chain_id: - type: string - example: testing - account_number: - type: string - example: '1' - sequence: - type: string - example: '0' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.0' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - from: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - shares: - type: string - example: '5000' - min_token_a: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - min_token_b: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - deadline: - type: string - example: '1628073801' - responses: - '200': - description: OK - schema: - type: object - properties: - msg: - type: array - items: - type: object - properties: - type: - type: string - example: cosmos-sdk/MsgSend - value: - type: object - properties: - from_address: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - to_address: - type: string - example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - fee: - type: object - properties: - gas: - type: string - example: '200000' - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - memo: - type: string - signatures: - type: array - items: - type: object - properties: - signature: - type: string - example: >- - W1HfKcc4F0rCSoxheZ7fsrB5nGK58U4gKysuzsmUwhloVnCxmbCx289uVMMvQN6tOcQsz7hMVTJrXSA1xzevvw== - pubkey: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Agey31h/NYpcy0sYm4liHMrXJMzbQUrgV4uHd/w09CXN - '400': - description: Invalid request - '500': - description: Internal server error - /swap/swapExactForTokens: - post: - deprecated: true - summary: >- - Swap exact amount of input tokens for approximate amount of output - tokens - tags: - - Swap - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: swap exact for tokens body - schema: - properties: - base_req: - type: object - properties: - from: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: a memo - chain_id: - type: string - example: testing - account_number: - type: string - example: '1' - sequence: - type: string - example: '0' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.0' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - requester: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - exact_token_a: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - token_b: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - slippage: - type: string - example: '0.05' - deadline: - type: string - example: '1628073801' - responses: - '200': - description: OK - schema: - type: object - properties: - msg: - type: array - items: - type: object - properties: - type: - type: string - example: cosmos-sdk/MsgSend - value: - type: object - properties: - from_address: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - to_address: - type: string - example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - fee: - type: object - properties: - gas: - type: string - example: '200000' - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - memo: - type: string - signatures: - type: array - items: - type: object - properties: - signature: - type: string - example: >- - W1HfKcc4F0rCSoxheZ7fsrB5nGK58U4gKysuzsmUwhloVnCxmbCx289uVMMvQN6tOcQsz7hMVTJrXSA1xzevvw== - pubkey: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Agey31h/NYpcy0sYm4liHMrXJMzbQUrgV4uHd/w09CXN - '400': - description: Invalid request - '500': - description: Internal server error - /swap/swapForExactTokens: - post: - deprecated: true - summary: >- - Swap approximate amount of input tokens for exact amount of output - tokens - tags: - - Swap - consumes: - - application/json - produces: - - application/json - parameters: - - in: body - name: swap for exact tokens body - schema: - properties: - base_req: - type: object - properties: - from: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: a memo - chain_id: - type: string - example: testing - account_number: - type: string - example: '1' - sequence: - type: string - example: '0' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.0' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in - conjunction with generate_only) - requester: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - token_a: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - exact_token_b: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - slippage: - type: string - example: '0.05' - deadline: - type: string - example: '1628073801' - responses: - '200': - description: OK - schema: - type: object - properties: - msg: - type: array - items: - type: object - properties: - type: - type: string - example: cosmos-sdk/MsgSend - value: - type: object - properties: - from_address: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - to_address: - type: string - example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - fee: - type: object - properties: - gas: - type: string - example: '200000' - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - memo: - type: string - signatures: - type: array - items: - type: object - properties: - signature: - type: string - example: >- - W1HfKcc4F0rCSoxheZ7fsrB5nGK58U4gKysuzsmUwhloVnCxmbCx289uVMMvQN6tOcQsz7hMVTJrXSA1xzevvw== - pubkey: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Agey31h/NYpcy0sYm4liHMrXJMzbQUrgV4uHd/w09CXN - '400': - description: Invalid request - '500': - description: Internal server error - /swap/parameters: - get: - deprecated: true - summary: Get the current parameters of the swap module - tags: - - Swap - produces: - - application/json - responses: - '200': - description: Swap module parameters - schema: - type: object - properties: - height: - type: string - example: '100' - result: - type: array - x-nullable: true - items: - type: object - properties: - allowed_pools: - type: array - items: - type: object - properties: - token_a: - type: string - example: ukava - token_b: - type: string - example: usdx - swap_fee: - type: string - example: '0.03' - '500': - description: Server internal error - /swap/deposits: - get: - deprecated: true - summary: Get the current deposits of a liquidity pool - tags: - - Swap - produces: - - application/json - parameters: - - in: query - name: owner - description: Owner address in bech32 format - required: false - type: string - x-example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - - in: query - name: pool - description: Pool ID - required: false - type: string - x-example: abc:xyz - responses: - '200': - description: Liquidity pool deposits - schema: - type: object - properties: - height: - type: string - example: '100' - result: - type: array - x-nullable: true - items: - $ref: '#/definitions/LegacySwapDepositsQueryResult' - '500': - description: Server internal error - /swap/pool: - get: - deprecated: true - summary: Get information about a liquidity pool by ID - tags: - - Swap - produces: - - application/json - parameters: - - in: query - name: pool - description: Pool ID - required: true - type: string - x-example: abc:xyz - responses: - '200': - description: Liquidity pool statistics - schema: - type: object - properties: - height: - type: string - example: '100' - result: - type: array - items: - $ref: '#/definitions/LegacySwapPoolStatsQueryResult' - '500': - description: Server internal error - /swap/pools: - get: - deprecated: true - summary: Get information about all liquidity pools - tags: - - Swap - produces: - - application/json - responses: - '200': - description: Statistics for all liquidity pools - schema: - type: object - properties: - height: - type: string - example: '100' - result: - type: array - x-nullable: true - items: - $ref: '#/definitions/LegacySwapPoolStatsQueryResult' - '500': - description: Server internal error - /kavadist/parameters: - get: - deprecated: true - summary: Get the current kavadist parameter values - tags: - - Kavadist - produces: - - application/json - responses: - '200': - description: OK - schema: - type: object - properties: - active: - type: string - periods: - type: array - items: - type: object - properties: - start: - type: string - example: 2020-06-01:14:00:00Z - end: - type: string - example: 2020-06-01:14:00:00Z - inflation: - type: string - example: '1.000000001167363430' - '500': - description: Internal Server Error definitions: cosmos.base.query.v1beta1.PageRequest: type: object @@ -52536,9 +57930,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -53248,9 +58643,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -53936,9 +59332,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -55077,9 +60474,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -56129,9 +61527,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -56368,9 +61767,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -57156,9 +62556,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -57227,9 +62628,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -57450,9 +62852,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -57521,9 +62924,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -59879,9 +65283,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -59961,9 +65366,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -60039,9 +65445,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -60100,1283 +65507,38 @@ definitions: description: >- TotalSupplyResponse defines the response type for the Query/TotalSupply method. - CheckTxResult: + cosmos.auth.v1beta1.AddressBytesToStringResponse: type: object properties: - code: - type: integer - data: + address_string: 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: + description: >- + AddressBytesToStringResponse is the response type for AddressString rpc + method. + + + Since: cosmos-sdk 0.46 + cosmos.auth.v1beta1.AddressStringToBytesResponse: type: object properties: - code: - type: integer - data: + address_bytes: 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: + format: byte + description: >- + AddressStringToBytesResponse is the response type for AddressBytes rpc + method. + + + Since: cosmos-sdk 0.46 + cosmos.auth.v1beta1.Bech32PrefixResponse: 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: + bech32_prefix: 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: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - ValidatorAddress: - type: string - description: bech32 encoded address - example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - Coin: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - 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: stake - 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: stake - 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: stake - 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' - 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: cosmoshub-2 - 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: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - 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: cosmoshub-2 - 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: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - 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: cosmoshub-2 - 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: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - 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: cosmoshub-2 - 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: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - 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: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - reward: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - 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: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - reward: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - total: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - BaseReq: - type: object - properties: - from: - type: string - example: cosmos1g9ahr6xhht5rmqven628nklxluzyv8z9jqjcmc - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: Sent via Cosmos Voyager 🚀 - chain_id: - type: string - example: Cosmos-Hub - 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: stake - 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: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - pub_key: - type: string - example: >- - cosmosvalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf - 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: stake - 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: stake - amount: - type: string - example: '50' - proposal_id: - type: string - depositor: - type: string - description: bech32 encoded address - example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - 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: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - consensus_pubkey: - type: string - example: >- - cosmosvalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf - 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 - security_contact: - 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: stake - amount: - type: string - example: '50' - UnbondingDelegationPair: - 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 - min_time: - type: string - UnbondingEntries: - type: object - properties: - initial_balance: - type: string - balance: - type: string - creation_height: - type: string - min_time: - type: string - UnbondingDelegation: - type: object - properties: - delegator_address: - type: string - validator_address: - type: string - initial_balance: - type: string - balance: - type: string - creation_height: - type: integer - min_time: - type: integer - Redelegation: - type: object - properties: - delegator_address: - type: string - validator_src_address: - type: string - validator_dst_address: - type: string - entries: - type: array - items: - $ref: '#/definitions/Redelegation' - 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: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - self_bond_rewards: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - val_commission: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - PublicKey: - type: object - properties: - type: - type: string - value: - type: string - SigningInfo: - type: object - properties: - start_height: - type: string - index_offset: - type: string - jailed_until: - type: string - 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: stake - amount: - type: string - example: '50' + description: |- + Bech32PrefixResponse is the response type for Bech32Prefix rpc method. + + Since: cosmos-sdk 0.46 cosmos.auth.v1beta1.Params: type: object properties: @@ -61396,6 +65558,15 @@ definitions: type: string format: uint64 description: Params defines the parameters for the auth module. + cosmos.auth.v1beta1.QueryAccountAddressByIDResponse: + type: object + properties: + account_address: + type: string + description: 'Since: cosmos-sdk 0.46.2' + title: >- + QueryAccountAddressByIDResponse is the response type for + AccountAddressByID rpc method cosmos.auth.v1beta1.QueryAccountResponse: type: object properties: @@ -61736,9 +65907,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -61750,6 +65922,347 @@ definitions: description: >- QueryAccountsResponse is the response type for the Query/Accounts RPC method. + + + Since: cosmos-sdk 0.43 + cosmos.auth.v1beta1.QueryModuleAccountByNameResponse: + type: object + properties: + account: + 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: >- + QueryModuleAccountByNameResponse is the response type for the + Query/ModuleAccountByName RPC method. + cosmos.auth.v1beta1.QueryModuleAccountsResponse: + type: object + properties: + accounts: + 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: >- + QueryModuleAccountsResponse is the response type for the + Query/ModuleAccounts RPC method. + + + Since: cosmos-sdk 0.46 cosmos.auth.v1beta1.QueryParamsResponse: type: object properties: @@ -61795,6 +66308,8 @@ definitions: DenomOwner defines structure representing an account that owns or holds a particular denominated token. It contains the account address and account balance of the denominated token. + + Since: cosmos-sdk 0.46 cosmos.bank.v1beta1.DenomUnit: type: object properties: @@ -61809,7 +66324,7 @@ definitions: raise the base_denom to in order to equal the given DenomUnit's denom - 1 denom = 1^exponent base_denom + 1 denom = 10^exponent base_denom (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with @@ -61847,7 +66362,7 @@ definitions: raise the base_denom to in order to equal the given DenomUnit's denom - 1 denom = 1^exponent base_denom + 1 denom = 10^exponent base_denom (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with @@ -61874,6 +66389,7 @@ definitions: displayed in clients. name: type: string + description: 'Since: cosmos-sdk 0.43' title: 'name defines the name of the token (eg: Cosmos Atom)' symbol: type: string @@ -61882,11 +66398,17 @@ definitions: can be the same as the display. + + + Since: cosmos-sdk 0.43 uri: type: string description: >- URI to a document (on or off-chain) that contains additional information. Optional. + + + Since: cosmos-sdk 0.46 uri_hash: type: string description: >- @@ -61894,6 +66416,9 @@ definitions: verify that the document didn't change. Optional. + + + Since: cosmos-sdk 0.46 description: |- Metadata represents a struct that describes a basic token. @@ -61909,7 +66434,6 @@ definitions: type: string enabled: type: boolean - format: boolean description: >- SendEnabled maps coin denom to a send_enabled status (whether a denom is @@ -61917,7 +66441,6 @@ definitions: sendable). default_send_enabled: type: boolean - format: boolean description: Params defines the parameters for the bank module. cosmos.bank.v1beta1.QueryAllBalancesResponse: type: object @@ -61944,9 +66467,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -62005,7 +66529,7 @@ definitions: raise the base_denom to in order to equal the given DenomUnit's denom - 1 denom = 1^exponent base_denom + 1 denom = 10^exponent base_denom (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with @@ -62032,6 +66556,7 @@ definitions: displayed in clients. name: type: string + description: 'Since: cosmos-sdk 0.43' title: 'name defines the name of the token (eg: Cosmos Atom)' symbol: type: string @@ -62040,11 +66565,17 @@ definitions: This can be the same as the display. + + + Since: cosmos-sdk 0.43 uri: type: string description: >- URI to a document (on or off-chain) that contains additional information. Optional. + + + Since: cosmos-sdk 0.46 uri_hash: type: string description: >- @@ -62052,6 +66583,9 @@ definitions: to verify that the document didn't change. Optional. + + + Since: cosmos-sdk 0.46 description: |- Metadata represents a struct that describes a basic token. @@ -62094,6 +66628,9 @@ definitions: account balance of the denominated token. + + + Since: cosmos-sdk 0.46 pagination: description: pagination defines the pagination in the response. type: object @@ -62101,9 +66638,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -62115,6 +66653,9 @@ definitions: description: >- QueryDenomOwnersResponse defines the RPC response of a DenomOwners RPC query. + + + Since: cosmos-sdk 0.46 cosmos.bank.v1beta1.QueryDenomsMetadataResponse: type: object properties: @@ -62144,7 +66685,7 @@ definitions: raise the base_denom to in order to equal the given DenomUnit's denom - 1 denom = 1^exponent base_denom + 1 denom = 10^exponent base_denom (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with @@ -62171,6 +66712,7 @@ definitions: displayed in clients. name: type: string + description: 'Since: cosmos-sdk 0.43' title: 'name defines the name of the token (eg: Cosmos Atom)' symbol: type: string @@ -62179,11 +66721,17 @@ definitions: ATOM). This can be the same as the display. + + + Since: cosmos-sdk 0.43 uri: type: string description: >- URI to a document (on or off-chain) that contains additional information. Optional. + + + Since: cosmos-sdk 0.46 uri_hash: type: string description: >- @@ -62191,6 +66739,9 @@ definitions: to verify that the document didn't change. Optional. + + + Since: cosmos-sdk 0.46 description: |- Metadata represents a struct that describes a basic token. @@ -62204,9 +66755,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -62235,7 +66787,6 @@ definitions: type: string enabled: type: boolean - format: boolean description: >- SendEnabled maps coin denom to a send_enabled status (whether a denom is @@ -62243,11 +66794,55 @@ definitions: 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.QuerySpendableBalancesResponse: + 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 spendable balances of all the coins. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QuerySpendableBalancesResponse defines the gRPC response structure for + querying + + an account's spendable balances. + + + Since: cosmos-sdk 0.46 cosmos.bank.v1beta1.QuerySupplyOfResponse: type: object properties: @@ -62285,15 +66880,19 @@ definitions: signatures required by gogoproto. title: supply is the supply of the coins pagination: - description: pagination defines the pagination in the response. + description: |- + pagination defines the pagination in the response. + + Since: cosmos-sdk 0.43 type: object properties: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -62314,10 +66913,611 @@ definitions: type: string enabled: type: boolean - format: boolean description: |- SendEnabled maps coin denom to a send_enabled status (whether a denom is sendable). + cosmos.base.tendermint.v1beta1.ABCIQueryResponse: + type: object + properties: + code: + type: integer + format: int64 + log: + type: string + info: + type: string + index: + type: string + format: int64 + key: + type: string + format: byte + value: + type: string + format: byte + proof_ops: + type: object + properties: + ops: + type: array + items: + type: object + properties: + type: + type: string + key: + type: string + format: byte + data: + type: string + format: byte + description: >- + ProofOp defines an operation used for calculating Merkle root. + The data could + + be arbitrary format, providing nessecary data for example + neighbouring node + + hash. + + + Note: This type is a duplicate of the ProofOp proto type defined + in + + Tendermint. + description: |- + ProofOps is Merkle proof defined by the list of ProofOps. + + Note: This type is a duplicate of the ProofOps proto type defined in + Tendermint. + height: + type: string + format: int64 + codespace: + type: string + description: |- + ABCIQueryResponse defines the response structure for the ABCIQuery gRPC + query. + + Note: This type is a duplicate of the ResponseQuery proto type defined in + Tendermint. + cosmos.base.tendermint.v1beta1.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 + description: >- + proposer_address is the original block proposer address, formatted + as a Bech32 string. + + In Tendermint, this type is `bytes`, but in the SDK, we convert it + to a Bech32 string + + for better UX. + 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: + 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: |- + Block is tendermint type Block, with the Header proposer address + field converted to bech32 string. cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse: type: object properties: @@ -62339,6 +67539,7 @@ definitions: title: PartsetHeader title: BlockID block: + title: 'Deprecated: please use `sdk_block` instead' type: object properties: header: @@ -62866,9 +68067,550 @@ definitions: description: >- Commit contains the evidence that a block was committed by a set of validators. + sdk_block: + title: 'Since: cosmos-sdk 0.47' + 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 + description: >- + proposer_address is the original block proposer address, + formatted as a Bech32 string. + + In Tendermint, this type is `bytes`, but in the SDK, we + convert it to a Bech32 string + + for better UX. + 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: + 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: |- + Block is tendermint type Block, with the Header proposer address + field converted to bech32 string. description: >- GetBlockByHeightResponse is the response type for the - Query/GetBlockByHeight RPC method. + Query/GetBlockByHeight + + RPC method. cosmos.base.tendermint.v1beta1.GetLatestBlockResponse: type: object properties: @@ -62890,6 +68632,7 @@ definitions: title: PartsetHeader title: BlockID block: + title: 'Deprecated: please use `sdk_block` instead' type: object properties: header: @@ -63417,9 +69160,550 @@ definitions: description: >- Commit contains the evidence that a block was committed by a set of validators. + sdk_block: + title: 'Since: cosmos-sdk 0.47' + 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 + description: >- + proposer_address is the original block proposer address, + formatted as a Bech32 string. + + In Tendermint, this type is `bytes`, but in the SDK, we + convert it to a Bech32 string + + for better UX. + 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: + 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: |- + Block is tendermint type Block, with the Header proposer address + field converted to bech32 string. description: >- GetLatestBlockResponse is the response type for the Query/GetLatestBlock - RPC method. + RPC + + method. cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse: type: object properties: @@ -63616,9 +69900,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -63627,7 +69912,7 @@ definitions: PageRequest.count_total was set, its value is undefined otherwise - description: >- + description: |- GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. cosmos.base.tendermint.v1beta1.GetNodeInfoResponse: @@ -63700,16 +69985,16 @@ definitions: title: Module is the type for VersionInfo cosmos_sdk_version: type: string + title: 'Since: cosmos-sdk 0.43' description: VersionInfo is the type for the GetNodeInfoResponse message. - description: >- - GetNodeInfoResponse is the request type for the Query/GetNodeInfo RPC + description: |- + GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC method. cosmos.base.tendermint.v1beta1.GetSyncingResponse: type: object properties: syncing: type: boolean - format: boolean description: >- GetSyncingResponse is the response type for the Query/GetSyncing RPC method. @@ -63909,9 +70194,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -63920,9 +70206,93 @@ definitions: PageRequest.count_total was set, its value is undefined otherwise - description: >- + description: |- GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. + cosmos.base.tendermint.v1beta1.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 + description: >- + proposer_address is the original block proposer address, formatted as + a Bech32 string. + + In Tendermint, this type is `bytes`, but in the SDK, we convert it to + a Bech32 string + + for better UX. + description: Header defines the structure of a Tendermint block header. cosmos.base.tendermint.v1beta1.Module: type: object properties: @@ -63936,6 +70306,64 @@ definitions: type: string title: checksum title: Module is the type for VersionInfo + cosmos.base.tendermint.v1beta1.ProofOp: + type: object + properties: + type: + type: string + key: + type: string + format: byte + data: + type: string + format: byte + description: >- + ProofOp defines an operation used for calculating Merkle root. The data + could + + be arbitrary format, providing nessecary data for example neighbouring + node + + hash. + + + Note: This type is a duplicate of the ProofOp proto type defined in + + Tendermint. + cosmos.base.tendermint.v1beta1.ProofOps: + type: object + properties: + ops: + type: array + items: + type: object + properties: + type: + type: string + key: + type: string + format: byte + data: + type: string + format: byte + description: >- + ProofOp defines an operation used for calculating Merkle root. The + data could + + be arbitrary format, providing nessecary data for example + neighbouring node + + hash. + + + Note: This type is a duplicate of the ProofOp proto type defined in + + Tendermint. + description: |- + ProofOps is Merkle proof defined by the list of ProofOps. + + Note: This type is a duplicate of the ProofOps proto type defined in + Tendermint. cosmos.base.tendermint.v1beta1.Validator: type: object properties: @@ -64139,6 +70567,7 @@ definitions: title: Module is the type for VersionInfo cosmos_sdk_version: type: string + title: 'Since: cosmos-sdk 0.43' description: VersionInfo is the type for the GetNodeInfoResponse message. tendermint.crypto.PublicKey: type: object @@ -66574,7 +73003,6 @@ definitions: 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 @@ -66705,7 +73133,6 @@ definitions: 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 @@ -66793,9 +73220,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -67035,9 +73463,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -67444,7 +73873,7 @@ definitions: description: |- ProposalStatus enumerates the valid statuses of a proposal. - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal 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 @@ -67456,6 +73885,10 @@ definitions: - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has failed. final_tally_result: + description: |- + final_tally_result is the final tally result of the proposal. When + querying a proposal via gRPC, this field is not populated until the + proposal's voting period has ended. type: object properties: 'yes': @@ -67466,7 +73899,6 @@ definitions: type: string no_with_veto: type: string - description: TallyResult defines a standard tally for a governance proposal. submit_time: type: string format: date-time @@ -67507,7 +73939,7 @@ definitions: description: |- ProposalStatus enumerates the valid statuses of a proposal. - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal 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 @@ -67594,9 +74026,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -67858,7 +74291,7 @@ definitions: description: |- ProposalStatus enumerates the valid statuses of a proposal. - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal 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 @@ -67870,6 +74303,13 @@ definitions: - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has failed. final_tally_result: + description: >- + final_tally_result is the final tally result of the proposal. When + + querying a proposal via gRPC, this field is not populated until + the + + proposal's voting period has ended. type: object properties: 'yes': @@ -67880,7 +74320,6 @@ definitions: type: string no_with_veto: type: string - description: TallyResult defines a standard tally for a governance proposal. submit_time: type: string format: date-time @@ -68107,7 +74546,7 @@ definitions: description: |- ProposalStatus enumerates the valid statuses of a proposal. - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal 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 @@ -68119,6 +74558,14 @@ definitions: - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has failed. final_tally_result: + description: >- + final_tally_result is the final tally result of the proposal. + When + + querying a proposal via gRPC, this field is not populated until + the + + proposal's voting period has ended. type: object properties: 'yes': @@ -68129,7 +74576,6 @@ definitions: type: string no_with_veto: type: string - description: TallyResult defines a standard tally for a governance proposal. submit_time: type: string format: date-time @@ -68167,9 +74613,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -68185,6 +74632,7 @@ definitions: type: object properties: tally: + description: tally defines the requested tally. type: object properties: 'yes': @@ -68195,7 +74643,6 @@ definitions: type: string no_with_veto: type: string - description: TallyResult defines a standard tally for a governance proposal. description: >- QueryTallyResultResponse is the response type for the Query/Tally RPC method. @@ -68252,7 +74699,11 @@ definitions: - 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: |- + WeightedVoteOption defines a unit of vote for vote split. + + Since: cosmos-sdk 0.43 + title: 'Since: cosmos-sdk 0.43' description: |- Vote defines a vote on a governance proposal. A Vote consists of a proposal ID, the voter, and the vote option. @@ -68312,7 +74763,11 @@ definitions: - 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: |- + WeightedVoteOption defines a unit of vote for vote split. + + Since: cosmos-sdk 0.43 + title: 'Since: cosmos-sdk 0.43' description: |- Vote defines a vote on a governance proposal. A Vote consists of a proposal ID, the voter, and the vote option. @@ -68324,9 +74779,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -68420,7 +74876,11 @@ definitions: - 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: |- + WeightedVoteOption defines a unit of vote for vote split. + + Since: cosmos-sdk 0.43 + title: 'Since: cosmos-sdk 0.43' description: |- Vote defines a vote on a governance proposal. A Vote consists of a proposal ID, the voter, and the vote option. @@ -68450,6 +74910,1261 @@ definitions: 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: >- + 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. + + Since: cosmos-sdk 0.43 + cosmos.gov.v1.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. + + 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.v1.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.v1.Proposal: + type: object + properties: + id: + type: string + format: uint64 + 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" + } + 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 proposal 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: + description: |- + final_tally_result is the final tally result of the proposal. When + querying a proposal via gRPC, this field is not populated until the + proposal's voting period has ended. + type: object + properties: + yes_count: + type: string + abstain_count: + type: string + no_count: + type: string + no_with_veto_count: + type: string + 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. + + 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 + metadata: + type: string + description: metadata is any arbitrary metadata attached to the proposal. + description: Proposal defines the core field members of a governance proposal. + cosmos.gov.v1.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. + + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal 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.v1.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. + + + 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. + description: >- + QueryDepositResponse is the response type for the Query/Deposit RPC + method. + cosmos.gov.v1.QueryDepositsResponse: + type: object + properties: + deposits: + type: array + items: + 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. + + + 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 + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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.v1.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 + description: >- + Minimum percentage of total stake needed to vote for a result to + be + considered valid. + threshold: + type: string + description: >- + Minimum proportion of Yes votes for proposal to pass. Default + value: 0.5. + veto_threshold: + type: string + 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.v1.QueryProposalResponse: + type: object + properties: + proposal: + type: object + properties: + id: + type: string + format: uint64 + 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" + } + 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 proposal 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: + description: >- + final_tally_result is the final tally result of the proposal. When + + querying a proposal via gRPC, this field is not populated until + the + + proposal's voting period has ended. + type: object + properties: + yes_count: + type: string + abstain_count: + type: string + no_count: + type: string + no_with_veto_count: + type: string + 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. + + + 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 + metadata: + type: string + description: metadata is any arbitrary metadata attached to the proposal. + 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.v1.QueryProposalsResponse: + type: object + properties: + proposals: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + 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" + } + 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 proposal 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: + description: >- + final_tally_result is the final tally result of the proposal. + When + + querying a proposal via gRPC, this field is not populated until + the + + proposal's voting period has ended. + type: object + properties: + yes_count: + type: string + abstain_count: + type: string + no_count: + type: string + no_with_veto_count: + type: string + 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. + + + 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 + metadata: + type: string + description: metadata is any arbitrary metadata attached to the proposal. + 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 + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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.v1.QueryTallyResultResponse: + type: object + properties: + tally: + description: tally defines the requested tally. + type: object + properties: + yes_count: + type: string + abstain_count: + type: string + no_count: + type: string + no_with_veto_count: + type: string + description: >- + QueryTallyResultResponse is the response type for the Query/Tally RPC + method. + cosmos.gov.v1.QueryVoteResponse: + type: object + properties: + vote: + type: object + properties: + proposal_id: + type: string + 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. + + - 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. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the vote. + 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.v1.QueryVotesResponse: + type: object + properties: + votes: + type: array + items: + type: object + properties: + proposal_id: + type: string + 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. + + - 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. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the vote. + 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. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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.v1.TallyParams: + type: object + properties: + quorum: + type: string + description: |- + Minimum percentage of total stake needed to vote for a result to be + considered valid. + threshold: + type: string + description: >- + Minimum proportion of Yes votes for proposal to pass. Default value: + 0.5. + veto_threshold: + type: string + 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.v1.TallyResult: + type: object + properties: + yes_count: + type: string + abstain_count: + type: string + no_count: + type: string + no_with_veto_count: + type: string + description: TallyResult defines a standard tally for a governance proposal. + cosmos.gov.v1.Vote: + type: object + properties: + proposal_id: + type: string + 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. + + - 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. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the vote. + description: |- + Vote defines a vote on a governance proposal. + A Vote consists of a proposal ID, the voter, and the vote option. + cosmos.gov.v1.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.v1.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.v1.WeightedVoteOption: type: object properties: option: @@ -68569,6 +76284,47 @@ definitions: value: type: string description: QueryParamsResponse is response type for the Query/Params RPC method. + cosmos.params.v1beta1.QuerySubspacesResponse: + type: object + properties: + subspaces: + type: array + items: + type: object + properties: + subspace: + type: string + keys: + type: array + items: + type: string + description: >- + Subspace defines a parameter subspace name and all the keys that + exist for + + the subspace. + + + Since: cosmos-sdk 0.46 + description: |- + QuerySubspacesResponse defines the response types for querying for all + registered subspaces and all keys for a subspace. + + Since: cosmos-sdk 0.46 + cosmos.params.v1beta1.Subspace: + type: object + properties: + subspace: + type: string + keys: + type: array + items: + type: string + description: |- + Subspace defines a parameter subspace name and all the keys that exist for + the subspace. + + Since: cosmos-sdk 0.46 cosmos.slashing.v1beta1.Params: type: object properties: @@ -68640,7 +76396,6 @@ definitions: downtime. tombstoned: type: boolean - format: boolean description: >- Whether or not a validator has been tombstoned (killed out of validator set). It is set @@ -68699,7 +76454,6 @@ definitions: downtime. tombstoned: type: boolean - format: boolean description: >- Whether or not a validator has been tombstoned (killed out of validator set). It is set @@ -68726,9 +76480,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -68778,7 +76533,6 @@ definitions: downtime. tombstoned: type: boolean - format: boolean description: >- Whether or not a validator has been tombstoned (killed out of validator set). It is set @@ -69193,7 +76947,6 @@ definitions: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -69285,6 +77038,9 @@ definitions: description: >- min_self_delegation is the validator's self declared minimum self delegation. + + + Since: cosmos-sdk 0.46 description: >- Validator defines a validator, together with the total amount of the @@ -69339,6 +77095,11 @@ definitions: bond_denom: type: string description: bond_denom defines the bondable coin denomination. + min_commission_rate: + type: string + title: >- + min_commission_rate is the chain-wide minimum commission rate that a + validator can charge their delegators description: Params defines the parameters for the staking module. cosmos.staking.v1beta1.Pool: type: object @@ -69465,9 +77226,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -69536,9 +77298,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -69728,7 +77491,6 @@ definitions: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -69818,6 +77580,9 @@ definitions: description: >- min_self_delegation is the validator's self declared minimum self delegation. + + + Since: cosmos-sdk 0.46 description: >- Validator defines a validator, together with the total amount of the @@ -70026,7 +77791,6 @@ definitions: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -70118,6 +77882,9 @@ definitions: description: >- min_self_delegation is the validator's self declared minimum self delegation. + + + Since: cosmos-sdk 0.46 description: >- Validator defines a validator, together with the total amount of the @@ -70139,7 +77906,7 @@ definitions: 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. + description: validators defines the validators' info of a delegator. pagination: description: pagination defines the pagination in the response. type: object @@ -70147,9 +77914,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -70432,7 +78200,6 @@ definitions: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -70524,6 +78291,9 @@ definitions: description: >- min_self_delegation is the validator's self declared minimum self delegation. + + + Since: cosmos-sdk 0.46 description: >- Validator defines a validator, together with the total amount of the @@ -70579,6 +78349,11 @@ definitions: bond_denom: type: string description: bond_denom defines the bondable coin denomination. + min_commission_rate: + type: string + title: >- + min_commission_rate is the chain-wide minimum commission rate that + a validator can charge their delegators description: QueryParamsResponse is response type for the Query/Params RPC method. cosmos.staking.v1beta1.QueryPoolResponse: type: object @@ -70713,9 +78488,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -70834,9 +78610,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -71026,7 +78803,6 @@ definitions: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -71116,6 +78892,9 @@ definitions: description: >- min_self_delegation is the validator's self declared minimum self delegation. + + + Since: cosmos-sdk 0.46 description: >- Validator defines a validator, together with the total amount of the @@ -71195,9 +78974,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -71393,7 +79173,6 @@ definitions: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -71485,6 +79264,9 @@ definitions: description: >- min_self_delegation is the validator's self declared minimum self delegation. + + + Since: cosmos-sdk 0.46 description: >- Validator defines a validator, together with the total amount of the @@ -71514,9 +79296,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -71972,7 +79755,6 @@ definitions: } jailed: type: boolean - format: boolean description: >- jailed defined whether the validator has been jailed from bonded status or not. @@ -72060,6 +79842,9 @@ definitions: description: >- min_self_delegation is the validator's self declared minimum self delegation. + + + Since: cosmos-sdk 0.46 description: >- Validator defines a validator, together with the total amount of the @@ -72152,6 +79937,11 @@ definitions: length prefixed in order to separate data from multiple message executions. + + Deprecated. This field is still populated, but prefer msg_response + instead + + because it also contains the Msg response typeURL. log: type: string description: Log contains the log information from message or handler execution. @@ -72175,7 +79965,6 @@ definitions: format: byte index: type: boolean - format: boolean description: >- EventAttribute is a single key-value pair, associated with an event. @@ -72192,6 +79981,174 @@ definitions: message or handler execution. + msg_responses: + 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: |- + msg_responses contains the Msg handler responses type packed in Anys. + + Since: cosmos-sdk 0.46 description: Result is the union of ResponseFormat and ResponseCheckTx. cosmos.base.abci.v1beta1.StringEvent: type: object @@ -72465,6 +80422,50 @@ definitions: == 1, it's genesis time. + 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 + 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. + + Later, transactions may be queried using these events. + description: >- + Events defines all the events emitted by processing a transaction. + Note, + + these events include those emitted by processing all the messages and + those + + emitted from the ante. Whereas Logs contains the events, with + + additional metadata, emitted only by processing the messages. + + + Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 description: >- TxResponse defines a structure containing relevant tx data and metadata. The @@ -72490,20 +80491,45 @@ definitions: - SIGN_MODE_UNSPECIFIED - SIGN_MODE_DIRECT - SIGN_MODE_TEXTUAL + - SIGN_MODE_DIRECT_AUX - SIGN_MODE_LEGACY_AMINO_JSON + - SIGN_MODE_EIP_191 default: SIGN_MODE_UNSPECIFIED description: |- SignMode represents a signing mode with its own security guarantees. + This enum should be considered a registry of all known sign modes + in the Cosmos ecosystem. Apps are not expected to support all known + sign modes. Apps that would like to support custom sign modes are + encouraged to open a small PR against this file to add a new case + to this SignMode enum describing their sign mode so that different + apps have a consistent version of this enum. + - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be - rejected + rejected. - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is - verified with raw bytes from Tx + 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 + from SIGN_MODE_DIRECT. It is currently not supported. + - SIGN_MODE_DIRECT_AUX: SIGN_MODE_DIRECT_AUX specifies a signing mode which uses + SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not + require signers signing over other signers' `signer_info`. It also allows + for adding Tips in transactions. + + Since: cosmos-sdk 0.46 - 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 + Amino JSON and will be removed in the future. + - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos + SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 + + Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, + but is not implemented on the SDK by default. To enable EIP-191, you need + to pass a custom `TxConfig` that has an implementation of + `SignModeHandler` for EIP-191. The SDK may decide to fully support + EIP-191 in the future. + + Since: cosmos-sdk 0.45.2 cosmos.tx.v1beta1.AuthInfo: type: object properties: @@ -72582,6 +80608,42 @@ definitions: appropriate fee grant does not exist or the chain does not support fee grants, this will fail + tip: + description: >- + Tip is the optional tip used for transactions fees paid in another + denom. + + + This field is ignored if the chain didn't enable tips, i.e. didn't add + the + + `TipDecorator` in its posthandler. + + + Since: cosmos-sdk 0.46 + 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 the tip + tipper: + type: string + title: tipper is the address of the account paying for the tip description: |- AuthInfo describes the fee and signer modes that are used to sign a transaction. @@ -72895,6 +80957,50 @@ definitions: height == 1, it's genesis time. + 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 + 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. + + Later, transactions may be queried using these events. + description: >- + Events defines all the events emitted by processing a transaction. + Note, + + these events include those emitted by processing all the messages + and those + + emitted from the ante. Whereas Logs contains the events, with + + additional metadata, emitted only by processing the messages. + + + Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 description: >- TxResponse defines a structure containing relevant tx data and metadata. The @@ -72957,6 +81063,584 @@ definitions: "gasprice", which must be above some miminum to be accepted into the mempool. + cosmos.tx.v1beta1.GetBlockWithTxsResponse: + type: object + properties: + txs: + type: array + items: + $ref: '#/definitions/cosmos.tx.v1beta1.Tx' + description: txs are the transactions in the block. + 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, + + 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: + 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. + pagination: + description: pagination defines a pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + GetBlockWithTxsResponse is the response type for the + Service.GetBlockWithTxs method. + + + Since: cosmos-sdk 0.45.2 cosmos.tx.v1beta1.GetTxResponse: type: object properties: @@ -73222,6 +81906,50 @@ definitions: height == 1, it's genesis time. + 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 + 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. + + Later, transactions may be queried using these events. + description: >- + Events defines all the events emitted by processing a transaction. + Note, + + these events include those emitted by processing all the messages + and those + + emitted from the ante. Whereas Logs contains the events, with + + additional metadata, emitted only by processing the messages. + + + Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 description: >- TxResponse defines a structure containing relevant tx data and metadata. The @@ -73501,6 +82229,50 @@ definitions: height == 1, it's genesis time. + 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 + 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. + + Later, transactions may be queried using these events. + description: >- + Events defines all the events emitted by processing a + transaction. Note, + + these events include those emitted by processing all the + messages and those + + emitted from the ante. Whereas Logs contains the events, with + + additional metadata, emitted only by processing the messages. + + + Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 description: >- TxResponse defines a structure containing relevant tx data and metadata. The @@ -73508,15 +82280,18 @@ definitions: 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. + description: |- + pagination defines a pagination for the response. + Deprecated post v0.46.x: use total instead. type: object properties: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -73525,6 +82300,10 @@ definitions: PageRequest.count_total was set, its value is undefined otherwise + total: + type: string + format: uint64 + title: total is total number of results available description: |- GetTxsEventResponse is the response type for the Service.TxsByEvents RPC method. @@ -73542,23 +82321,68 @@ definitions: - SIGN_MODE_UNSPECIFIED - SIGN_MODE_DIRECT - SIGN_MODE_TEXTUAL + - SIGN_MODE_DIRECT_AUX - SIGN_MODE_LEGACY_AMINO_JSON + - SIGN_MODE_EIP_191 default: SIGN_MODE_UNSPECIFIED description: >- SignMode represents a signing mode with its own security guarantees. + + This enum should be considered a registry of all known sign modes + + in the Cosmos ecosystem. Apps are not expected to support all + known + + sign modes. Apps that would like to support custom sign modes are + + encouraged to open a small PR against this file to add a new case + + to this SignMode enum describing their sign mode so that different + + apps have a consistent version of this enum. + - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be - rejected + rejected. - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is - verified with raw bytes from Tx + 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 + from SIGN_MODE_DIRECT. It is currently not supported. + - SIGN_MODE_DIRECT_AUX: SIGN_MODE_DIRECT_AUX specifies a signing mode which uses + SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode + does not + + require signers signing over other signers' `signer_info`. It also + allows + + for adding Tips in transactions. + + + Since: cosmos-sdk 0.46 - 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 + Amino JSON and will be removed in the future. + - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos + SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 + + + Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum + variant, + + but is not implemented on the SDK by default. To enable EIP-191, + you need + + to pass a custom `TxConfig` that has an implementation of + + `SignModeHandler` for EIP-191. The SDK may decide to fully support + + EIP-191 in the future. + + + Since: cosmos-sdk 0.45.2 multi: $ref: '#/definitions/cosmos.tx.v1beta1.ModeInfo.Multi' title: multi represents a nested multisig signer @@ -73603,22 +82427,65 @@ definitions: - SIGN_MODE_UNSPECIFIED - SIGN_MODE_DIRECT - SIGN_MODE_TEXTUAL + - SIGN_MODE_DIRECT_AUX - SIGN_MODE_LEGACY_AMINO_JSON + - SIGN_MODE_EIP_191 default: SIGN_MODE_UNSPECIFIED description: >- SignMode represents a signing mode with its own security guarantees. + + This enum should be considered a registry of all known sign modes + + in the Cosmos ecosystem. Apps are not expected to support all known + + sign modes. Apps that would like to support custom sign modes are + + encouraged to open a small PR against this file to add a new case + + to this SignMode enum describing their sign mode so that different + + apps have a consistent version of this enum. + - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be - rejected + rejected. - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is - verified with raw bytes from Tx + 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 + from SIGN_MODE_DIRECT. It is currently not supported. + - SIGN_MODE_DIRECT_AUX: SIGN_MODE_DIRECT_AUX specifies a signing mode which uses + SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does + not + + require signers signing over other signers' `signer_info`. It also + allows + + for adding Tips in transactions. + + + Since: cosmos-sdk 0.46 - 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 + Amino JSON and will be removed in the future. + - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos + SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 + + + Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, + + but is not implemented on the SDK by default. To enable EIP-191, you + need + + to pass a custom `TxConfig` that has an implementation of + + `SignModeHandler` for EIP-191. The SDK may decide to fully support + + EIP-191 in the future. + + + Since: cosmos-sdk 0.45.2 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 @@ -73827,7 +82694,10 @@ definitions: tx_bytes: type: string format: byte - description: tx_bytes is the raw transaction. + description: |- + tx_bytes is the raw transaction. + + Since: cosmos-sdk 0.43 description: |- SimulateRequest is the request type for the Service.Simulate RPC method. @@ -73861,6 +82731,11 @@ definitions: length prefixed in order to separate data from multiple message executions. + + Deprecated. This field is still populated, but prefer msg_response + instead + + because it also contains the Msg response typeURL. log: type: string description: >- @@ -73886,7 +82761,6 @@ definitions: format: byte index: type: boolean - format: boolean description: >- EventAttribute is a single key-value pair, associated with an event. @@ -73903,9 +82777,211 @@ definitions: message or handler execution. + msg_responses: + 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: >- + msg_responses contains the Msg handler responses type packed in + Anys. + + + Since: cosmos-sdk 0.46 description: |- SimulateResponse is the response type for the Service.SimulateRPC method. + cosmos.tx.v1beta1.Tip: + 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 the tip + tipper: + type: string + title: tipper is the address of the account paying for the tip + description: |- + Tip is the tip used for meta-transactions. + + Since: cosmos-sdk 0.46 cosmos.tx.v1beta1.Tx: type: object properties: @@ -75057,7 +84133,6 @@ definitions: 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 @@ -75077,7 +84152,6 @@ definitions: format: byte index: type: boolean - format: boolean description: EventAttribute is a single key-value pair, associated with an event. cosmos.upgrade.v1beta1.ModuleVersion: type: object @@ -75089,7 +84163,10 @@ definitions: type: string format: uint64 title: consensus version of the app module - description: ModuleVersion specifies a module and its consensus version. + description: |- + ModuleVersion specifies a module and its consensus version. + + Since: cosmos-sdk 0.43 cosmos.upgrade.v1beta1.Plan: type: object properties: @@ -75308,6 +84385,13 @@ definitions: RPC method. + cosmos.upgrade.v1beta1.QueryAuthorityResponse: + type: object + properties: + address: + type: string + description: 'Since: cosmos-sdk 0.46' + title: QueryAuthorityResponse is the response type for Query/Authority cosmos.upgrade.v1beta1.QueryCurrentPlanResponse: type: object properties: @@ -75545,7 +84629,10 @@ definitions: type: string format: uint64 title: consensus version of the app module - description: ModuleVersion specifies a module and its consensus version. + description: |- + ModuleVersion specifies a module and its consensus version. + + Since: cosmos-sdk 0.43 description: >- module_versions is a list of module names with their consensus versions. @@ -75554,12 +84641,16 @@ definitions: Query/ModuleVersions RPC method. + + + Since: cosmos-sdk 0.43 cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse: type: object properties: upgraded_consensus_state: type: string format: byte + title: 'Since: cosmos-sdk 0.43' description: >- QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState @@ -75730,9 +84821,614 @@ definitions: expiration: type: string format: date-time + title: >- + time when the grant will expire and will be pruned. If null, then the + grant + + doesn't have a time expiration (other conditions in `authorization` + + may apply to invalidate the grant) description: |- Grant gives permissions to execute the provide method with expiration time. + cosmos.authz.v1beta1.GrantAuthorization: + type: object + properties: + granter: + type: string + grantee: + type: string + 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: >- + GrantAuthorization extends a grant with both the addresses of the grantee + and granter. + + It is used in genesis.proto and query.proto + cosmos.authz.v1beta1.QueryGranteeGrantsResponse: + type: object + properties: + grants: + type: array + items: + type: object + properties: + granter: + type: string + grantee: + type: string + 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: >- + GrantAuthorization extends a grant with both the addresses of the + grantee and granter. + + It is used in genesis.proto and query.proto + description: grants is a list of grants granted to the grantee. + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QueryGranteeGrantsResponse is the response type for the + Query/GranteeGrants RPC method. + cosmos.authz.v1beta1.QueryGranterGrantsResponse: + type: object + properties: + grants: + type: array + items: + type: object + properties: + granter: + type: string + grantee: + type: string + 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: >- + GrantAuthorization extends a grant with both the addresses of the + grantee and granter. + + It is used in genesis.proto and query.proto + description: grants is a list of grants granted by the granter. + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QueryGranterGrantsResponse is the response type for the + Query/GranterGrants RPC method. cosmos.authz.v1beta1.QueryGrantsResponse: type: object properties: @@ -75913,6 +85609,14 @@ definitions: expiration: type: string format: date-time + title: >- + time when the grant will expire and will be pruned. If null, + then the grant + + doesn't have a time expiration (other conditions in + `authorization` + + may apply to invalidate the grant) description: |- Grant gives permissions to execute the provide method with expiration time. @@ -75924,9 +85628,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -75952,7 +85657,7 @@ definitions: grantee is the address of the user being granted an allowance of another user's funds. allowance: - description: allowance can be any of basic and filtered fee allowance. + description: allowance can be any of basic, periodic, allowed fee allowance. type: object properties: type_url: @@ -76032,7 +85737,7 @@ definitions: grantee is the address of the user being granted an allowance of another user's funds. allowance: - description: allowance can be any of basic and filtered fee allowance. + description: allowance can be any of basic, periodic, allowed fee allowance. type: object properties: type_url: @@ -76100,6 +85805,118 @@ definitions: description: >- QueryAllowanceResponse is the response type for the Query/Allowance RPC method. + cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse: + type: object + properties: + allowances: + type: array + items: + type: object + properties: + granter: + type: string + description: >- + granter is the address of the user granting an allowance of + their funds. + grantee: + type: string + description: >- + grantee is the address of the user being granted an allowance of + another user's funds. + allowance: + description: allowance can be any of basic, periodic, allowed fee allowance. + 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. + title: Grant is stored in the KVStore to record a grant with full context + description: allowances that have been issued by the granter. + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QueryAllowancesByGranterResponse is the response type for the + Query/AllowancesByGranter RPC method. + + + Since: cosmos-sdk 0.46 cosmos.feegrant.v1beta1.QueryAllowancesResponse: type: object properties: @@ -76119,7 +85936,7 @@ definitions: grantee is the address of the user being granted an allowance of another user's funds. allowance: - description: allowance can be any of basic and filtered fee allowance. + description: allowance can be any of basic, periodic, allowed fee allowance. type: object properties: type_url: @@ -76194,9 +86011,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -76208,6 +86026,3552 @@ definitions: description: >- QueryAllowancesResponse is the response type for the Query/Allowances RPC method. + cosmos.nft.v1beta1.Class: + type: object + properties: + id: + type: string + title: >- + id defines the unique identifier of the NFT classification, similar to + the contract address of ERC721 + name: + type: string + title: >- + name defines the human-readable name of the NFT classification. + Optional + symbol: + type: string + title: symbol is an abbreviated name for nft classification. Optional + description: + type: string + title: description is a brief description of nft classification. Optional + uri: + type: string + title: >- + uri for the class metadata stored off chain. It can define schema for + Class and NFT `Data` attributes. Optional + uri_hash: + type: string + title: uri_hash is a hash of the document pointed by uri. Optional + data: + 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: data is the app specific metadata of the NFT class. Optional + description: Class defines the class of the nft type. + cosmos.nft.v1beta1.NFT: + type: object + properties: + class_id: + type: string + title: >- + class_id associated with the NFT, similar to the contract address of + ERC721 + id: + type: string + title: id is a unique identifier of the NFT + uri: + type: string + title: uri for the NFT metadata stored off chain + uri_hash: + type: string + title: uri_hash is a hash of the document pointed by uri + data: + 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: data is an app specific data of the NFT. Optional + description: NFT defines the NFT. + cosmos.nft.v1beta1.QueryBalanceResponse: + type: object + properties: + amount: + type: string + format: uint64 + title: QueryBalanceResponse is the response type for the Query/Balance RPC method + cosmos.nft.v1beta1.QueryClassResponse: + type: object + properties: + class: + type: object + properties: + id: + type: string + title: >- + id defines the unique identifier of the NFT classification, + similar to the contract address of ERC721 + name: + type: string + title: >- + name defines the human-readable name of the NFT classification. + Optional + symbol: + type: string + title: symbol is an abbreviated name for nft classification. Optional + description: + type: string + title: description is a brief description of nft classification. Optional + uri: + type: string + title: >- + uri for the class metadata stored off chain. It can define schema + for Class and NFT `Data` attributes. Optional + uri_hash: + type: string + title: uri_hash is a hash of the document pointed by uri. Optional + data: + 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: data is the app specific metadata of the NFT class. Optional + description: Class defines the class of the nft type. + title: QueryClassResponse is the response type for the Query/Class RPC method + cosmos.nft.v1beta1.QueryClassesResponse: + type: object + properties: + classes: + type: array + items: + type: object + properties: + id: + type: string + title: >- + id defines the unique identifier of the NFT classification, + similar to the contract address of ERC721 + name: + type: string + title: >- + name defines the human-readable name of the NFT classification. + Optional + symbol: + type: string + title: symbol is an abbreviated name for nft classification. Optional + description: + type: string + title: >- + description is a brief description of nft classification. + Optional + uri: + type: string + title: >- + uri for the class metadata stored off chain. It can define + schema for Class and NFT `Data` attributes. Optional + uri_hash: + type: string + title: uri_hash is a hash of the document pointed by uri. Optional + data: + 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: data is the app specific metadata of the NFT class. Optional + description: Class defines the class of the nft type. + pagination: + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: QueryClassesResponse is the response type for the Query/Classes RPC method + cosmos.nft.v1beta1.QueryNFTResponse: + type: object + properties: + nft: + type: object + properties: + class_id: + type: string + title: >- + class_id associated with the NFT, similar to the contract address + of ERC721 + id: + type: string + title: id is a unique identifier of the NFT + uri: + type: string + title: uri for the NFT metadata stored off chain + uri_hash: + type: string + title: uri_hash is a hash of the document pointed by uri + data: + 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: data is an app specific data of the NFT. Optional + description: NFT defines the NFT. + title: QueryNFTResponse is the response type for the Query/NFT RPC method + cosmos.nft.v1beta1.QueryNFTsResponse: + type: object + properties: + nfts: + type: array + items: + type: object + properties: + class_id: + type: string + title: >- + class_id associated with the NFT, similar to the contract + address of ERC721 + id: + type: string + title: id is a unique identifier of the NFT + uri: + type: string + title: uri for the NFT metadata stored off chain + uri_hash: + type: string + title: uri_hash is a hash of the document pointed by uri + data: + 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: data is an app specific data of the NFT. Optional + description: NFT defines the NFT. + pagination: + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: QueryNFTsResponse is the response type for the Query/NFTs RPC methods + cosmos.nft.v1beta1.QueryOwnerResponse: + type: object + properties: + owner: + type: string + title: QueryOwnerResponse is the response type for the Query/Owner RPC method + cosmos.nft.v1beta1.QuerySupplyResponse: + type: object + properties: + amount: + type: string + format: uint64 + title: QuerySupplyResponse is the response type for the Query/Supply RPC method + cosmos.group.v1.GroupInfo: + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group's admin. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the group. + version: + type: string + format: uint64 + title: >- + version is used to track changes to a group's membership structure + that + + would break existing proposals. Whenever any members weight is + changed, + + or any member is added or removed this version is incremented and will + + cause proposals based on older versions of this group to fail + total_weight: + type: string + description: total_weight is the sum of the group members' weights. + created_at: + type: string + format: date-time + description: created_at is a timestamp specifying when a group was created. + description: GroupInfo represents the high-level on-chain information for a group. + cosmos.group.v1.GroupMember: + type: object + properties: + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + member: + description: member is the member data. + type: object + properties: + address: + type: string + description: address is the member's account address. + weight: + type: string + description: >- + weight is the member's voting weight that should be greater than + 0. + metadata: + type: string + description: metadata is any arbitrary metadata attached to the member. + added_at: + type: string + format: date-time + description: added_at is a timestamp specifying when a member was added. + description: GroupMember represents the relationship between a group and a member. + cosmos.group.v1.GroupPolicyInfo: + type: object + properties: + address: + type: string + description: address is the account address of group policy. + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group admin. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the group policy. + version: + type: string + format: uint64 + description: >- + version is used to track changes to a group's GroupPolicyInfo + structure that + + would create a different result on a running proposal. + decision_policy: + 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" + } + created_at: + type: string + format: date-time + description: created_at is a timestamp specifying when a group policy was created. + description: >- + GroupPolicyInfo represents the high-level on-chain information for a group + policy. + cosmos.group.v1.Member: + type: object + properties: + address: + type: string + description: address is the member's account address. + weight: + type: string + description: weight is the member's voting weight that should be greater than 0. + metadata: + type: string + description: metadata is any arbitrary metadata attached to the member. + added_at: + type: string + format: date-time + description: added_at is a timestamp specifying when a member was added. + description: |- + Member represents a group member with an account address, + non-zero weight, metadata and added_at timestamp. + cosmos.group.v1.Proposal: + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique id of the proposal. + group_policy_address: + type: string + description: group_policy_address is the account address of group policy. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the proposal. + proposers: + type: array + items: + type: string + description: proposers are the account addresses of the proposers. + submit_time: + type: string + format: date-time + description: submit_time is a timestamp specifying when a proposal was submitted. + group_version: + type: string + format: uint64 + description: |- + group_version tracks the version of the group at proposal submission. + This field is here for informational purposes only. + group_policy_version: + type: string + format: uint64 + description: >- + group_policy_version tracks the version of the group policy at + proposal submission. + + When a decision policy is changed, existing proposals from previous + policy + + versions will become invalid with the `ABORTED` status. + + This field is here for informational purposes only. + status: + description: >- + status represents the high level position in the life cycle of the + proposal. Initial value is Submitted. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_SUBMITTED + - PROPOSAL_STATUS_ACCEPTED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_ABORTED + - PROPOSAL_STATUS_WITHDRAWN + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: >- + final_tally_result contains the sums of all weighted votes for this + + proposal for each vote option. It is empty at submission, and only + + populated after tallying, at voting period end or at proposal + execution, + + whichever happens first. + type: object + properties: + yes_count: + type: string + description: yes_count is the weighted sum of yes votes. + abstain_count: + type: string + description: abstain_count is the weighted sum of abstainers. + no_count: + type: string + description: no_count is the weighted sum of no votes. + no_with_veto_count: + type: string + description: no_with_veto_count is the weighted sum of veto. + voting_period_end: + type: string + format: date-time + description: >- + voting_period_end is the timestamp before which voting must be done. + + Unless a successfull MsgExec is called before (to execute a proposal + whose + + tally is successful before the voting period ends), tallying will be + done + + at this point, and the `final_tally_result`and `status` fields will be + + accordingly updated. + executor_result: + description: >- + executor_result is the final result of the proposal execution. Initial + value is NotRun. + type: string + enum: + - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + - PROPOSAL_EXECUTOR_RESULT_NOT_RUN + - PROPOSAL_EXECUTOR_RESULT_SUCCESS + - PROPOSAL_EXECUTOR_RESULT_FAILURE + default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + 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 `sdk.Msg`s that will be executed if the proposal + passes. + description: >- + Proposal defines a group proposal. Any member of a group can submit a + proposal + + for a group policy to decide upon. + + A proposal consists of a set of `sdk.Msg`s that will be executed if the + proposal + + passes as well as some optional metadata associated with the proposal. + cosmos.group.v1.ProposalExecutorResult: + type: string + enum: + - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + - PROPOSAL_EXECUTOR_RESULT_NOT_RUN + - PROPOSAL_EXECUTOR_RESULT_SUCCESS + - PROPOSAL_EXECUTOR_RESULT_FAILURE + default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + description: |- + ProposalExecutorResult defines types of proposal executor results. + + - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED: An empty value is not allowed. + - PROPOSAL_EXECUTOR_RESULT_NOT_RUN: We have not yet run the executor. + - PROPOSAL_EXECUTOR_RESULT_SUCCESS: The executor was successful and proposed action updated state. + - PROPOSAL_EXECUTOR_RESULT_FAILURE: The executor returned an error and proposed action didn't update state. + cosmos.group.v1.ProposalStatus: + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_SUBMITTED + - PROPOSAL_STATUS_ACCEPTED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_ABORTED + - PROPOSAL_STATUS_WITHDRAWN + default: PROPOSAL_STATUS_UNSPECIFIED + description: |- + ProposalStatus defines proposal statuses. + + - PROPOSAL_STATUS_UNSPECIFIED: An empty value is invalid and not allowed. + - PROPOSAL_STATUS_SUBMITTED: Initial status of a proposal when submitted. + - PROPOSAL_STATUS_ACCEPTED: Final status of a proposal when the final tally is done and the outcome + passes the group policy's decision policy. + - PROPOSAL_STATUS_REJECTED: Final status of a proposal when the final tally is done and the outcome + is rejected by the group policy's decision policy. + - PROPOSAL_STATUS_ABORTED: Final status of a proposal when the group policy is modified before the + final tally. + - PROPOSAL_STATUS_WITHDRAWN: A proposal can be withdrawn before the voting start time by the owner. + When this happens the final status is Withdrawn. + cosmos.group.v1.QueryGroupInfoResponse: + type: object + properties: + info: + description: info is the GroupInfo for the group. + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group's admin. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the group. + version: + type: string + format: uint64 + title: >- + version is used to track changes to a group's membership structure + that + + would break existing proposals. Whenever any members weight is + changed, + + or any member is added or removed this version is incremented and + will + + cause proposals based on older versions of this group to fail + total_weight: + type: string + description: total_weight is the sum of the group members' weights. + created_at: + type: string + format: date-time + description: created_at is a timestamp specifying when a group was created. + description: QueryGroupInfoResponse is the Query/GroupInfo response type. + cosmos.group.v1.QueryGroupMembersResponse: + type: object + properties: + members: + type: array + items: + type: object + properties: + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + member: + description: member is the member data. + type: object + properties: + address: + type: string + description: address is the member's account address. + weight: + type: string + description: >- + weight is the member's voting weight that should be greater + than 0. + metadata: + type: string + description: metadata is any arbitrary metadata attached to the member. + added_at: + type: string + format: date-time + description: added_at is a timestamp specifying when a member was added. + description: >- + GroupMember represents the relationship between a group and a + member. + description: members are the members of the group with given group_id. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: QueryGroupMembersResponse is the Query/GroupMembersResponse response type. + cosmos.group.v1.QueryGroupPoliciesByAdminResponse: + type: object + properties: + group_policies: + type: array + items: + type: object + properties: + address: + type: string + description: address is the account address of group policy. + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group admin. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the group + policy. + version: + type: string + format: uint64 + description: >- + version is used to track changes to a group's GroupPolicyInfo + structure that + + would create a different result on a running proposal. + decision_policy: + 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" + } + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group policy was + created. + description: >- + GroupPolicyInfo represents the high-level on-chain information for a + group policy. + description: group_policies are the group policies info with provided admin. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QueryGroupPoliciesByAdminResponse is the Query/GroupPoliciesByAdmin + response type. + cosmos.group.v1.QueryGroupPoliciesByGroupResponse: + type: object + properties: + group_policies: + type: array + items: + type: object + properties: + address: + type: string + description: address is the account address of group policy. + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group admin. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the group + policy. + version: + type: string + format: uint64 + description: >- + version is used to track changes to a group's GroupPolicyInfo + structure that + + would create a different result on a running proposal. + decision_policy: + 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" + } + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group policy was + created. + description: >- + GroupPolicyInfo represents the high-level on-chain information for a + group policy. + description: >- + group_policies are the group policies info associated with the + provided group. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QueryGroupPoliciesByGroupResponse is the Query/GroupPoliciesByGroup + response type. + cosmos.group.v1.QueryGroupPolicyInfoResponse: + type: object + properties: + info: + type: object + properties: + address: + type: string + description: address is the account address of group policy. + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group admin. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the group + policy. + version: + type: string + format: uint64 + description: >- + version is used to track changes to a group's GroupPolicyInfo + structure that + + would create a different result on a running proposal. + decision_policy: + 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" + } + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group policy was + created. + description: >- + GroupPolicyInfo represents the high-level on-chain information for a + group policy. + description: QueryGroupPolicyInfoResponse is the Query/GroupPolicyInfo response type. + cosmos.group.v1.QueryGroupsByAdminResponse: + type: object + properties: + groups: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group's admin. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the group. + version: + type: string + format: uint64 + title: >- + version is used to track changes to a group's membership + structure that + + would break existing proposals. Whenever any members weight is + changed, + + or any member is added or removed this version is incremented + and will + + cause proposals based on older versions of this group to fail + total_weight: + type: string + description: total_weight is the sum of the group members' weights. + created_at: + type: string + format: date-time + description: created_at is a timestamp specifying when a group was created. + description: >- + GroupInfo represents the high-level on-chain information for a + group. + description: groups are the groups info with the provided admin. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QueryGroupsByAdminResponse is the Query/GroupsByAdminResponse response + type. + cosmos.group.v1.QueryGroupsByMemberResponse: + type: object + properties: + groups: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group's admin. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the group. + version: + type: string + format: uint64 + title: >- + version is used to track changes to a group's membership + structure that + + would break existing proposals. Whenever any members weight is + changed, + + or any member is added or removed this version is incremented + and will + + cause proposals based on older versions of this group to fail + total_weight: + type: string + description: total_weight is the sum of the group members' weights. + created_at: + type: string + format: date-time + description: created_at is a timestamp specifying when a group was created. + description: >- + GroupInfo represents the high-level on-chain information for a + group. + description: groups are the groups info with the provided group member. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: QueryGroupsByMemberResponse is the Query/GroupsByMember response type. + cosmos.group.v1.QueryProposalResponse: + type: object + properties: + proposal: + description: proposal is the proposal info. + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique id of the proposal. + group_policy_address: + type: string + description: group_policy_address is the account address of group policy. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the proposal. + proposers: + type: array + items: + type: string + description: proposers are the account addresses of the proposers. + submit_time: + type: string + format: date-time + description: >- + submit_time is a timestamp specifying when a proposal was + submitted. + group_version: + type: string + format: uint64 + description: >- + group_version tracks the version of the group at proposal + submission. + + This field is here for informational purposes only. + group_policy_version: + type: string + format: uint64 + description: >- + group_policy_version tracks the version of the group policy at + proposal submission. + + When a decision policy is changed, existing proposals from + previous policy + + versions will become invalid with the `ABORTED` status. + + This field is here for informational purposes only. + status: + description: >- + status represents the high level position in the life cycle of the + proposal. Initial value is Submitted. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_SUBMITTED + - PROPOSAL_STATUS_ACCEPTED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_ABORTED + - PROPOSAL_STATUS_WITHDRAWN + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: >- + final_tally_result contains the sums of all weighted votes for + this + + proposal for each vote option. It is empty at submission, and only + + populated after tallying, at voting period end or at proposal + execution, + + whichever happens first. + type: object + properties: + yes_count: + type: string + description: yes_count is the weighted sum of yes votes. + abstain_count: + type: string + description: abstain_count is the weighted sum of abstainers. + no_count: + type: string + description: no_count is the weighted sum of no votes. + no_with_veto_count: + type: string + description: no_with_veto_count is the weighted sum of veto. + voting_period_end: + type: string + format: date-time + description: >- + voting_period_end is the timestamp before which voting must be + done. + + Unless a successfull MsgExec is called before (to execute a + proposal whose + + tally is successful before the voting period ends), tallying will + be done + + at this point, and the `final_tally_result`and `status` fields + will be + + accordingly updated. + executor_result: + description: >- + executor_result is the final result of the proposal execution. + Initial value is NotRun. + type: string + enum: + - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + - PROPOSAL_EXECUTOR_RESULT_NOT_RUN + - PROPOSAL_EXECUTOR_RESULT_SUCCESS + - PROPOSAL_EXECUTOR_RESULT_FAILURE + default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + 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 `sdk.Msg`s that will be executed if the + proposal passes. + description: QueryProposalResponse is the Query/Proposal response type. + cosmos.group.v1.QueryProposalsByGroupPolicyResponse: + type: object + properties: + proposals: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique id of the proposal. + group_policy_address: + type: string + description: group_policy_address is the account address of group policy. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the proposal. + proposers: + type: array + items: + type: string + description: proposers are the account addresses of the proposers. + submit_time: + type: string + format: date-time + description: >- + submit_time is a timestamp specifying when a proposal was + submitted. + group_version: + type: string + format: uint64 + description: >- + group_version tracks the version of the group at proposal + submission. + + This field is here for informational purposes only. + group_policy_version: + type: string + format: uint64 + description: >- + group_policy_version tracks the version of the group policy at + proposal submission. + + When a decision policy is changed, existing proposals from + previous policy + + versions will become invalid with the `ABORTED` status. + + This field is here for informational purposes only. + status: + description: >- + status represents the high level position in the life cycle of + the proposal. Initial value is Submitted. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_SUBMITTED + - PROPOSAL_STATUS_ACCEPTED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_ABORTED + - PROPOSAL_STATUS_WITHDRAWN + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: >- + final_tally_result contains the sums of all weighted votes for + this + + proposal for each vote option. It is empty at submission, and + only + + populated after tallying, at voting period end or at proposal + execution, + + whichever happens first. + type: object + properties: + yes_count: + type: string + description: yes_count is the weighted sum of yes votes. + abstain_count: + type: string + description: abstain_count is the weighted sum of abstainers. + no_count: + type: string + description: no_count is the weighted sum of no votes. + no_with_veto_count: + type: string + description: no_with_veto_count is the weighted sum of veto. + voting_period_end: + type: string + format: date-time + description: >- + voting_period_end is the timestamp before which voting must be + done. + + Unless a successfull MsgExec is called before (to execute a + proposal whose + + tally is successful before the voting period ends), tallying + will be done + + at this point, and the `final_tally_result`and `status` fields + will be + + accordingly updated. + executor_result: + description: >- + executor_result is the final result of the proposal execution. + Initial value is NotRun. + type: string + enum: + - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + - PROPOSAL_EXECUTOR_RESULT_NOT_RUN + - PROPOSAL_EXECUTOR_RESULT_SUCCESS + - PROPOSAL_EXECUTOR_RESULT_FAILURE + default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + 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 `sdk.Msg`s that will be executed if the + proposal passes. + description: >- + Proposal defines a group proposal. Any member of a group can submit + a proposal + + for a group policy to decide upon. + + A proposal consists of a set of `sdk.Msg`s that will be executed if + the proposal + + passes as well as some optional metadata associated with the + proposal. + description: proposals are the proposals with given group policy. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: >- + QueryProposalsByGroupPolicyResponse is the Query/ProposalByGroupPolicy + response type. + cosmos.group.v1.QueryTallyResultResponse: + type: object + properties: + tally: + description: tally defines the requested tally. + type: object + properties: + yes_count: + type: string + description: yes_count is the weighted sum of yes votes. + abstain_count: + type: string + description: abstain_count is the weighted sum of abstainers. + no_count: + type: string + description: no_count is the weighted sum of no votes. + no_with_veto_count: + type: string + description: no_with_veto_count is the weighted sum of veto. + description: QueryTallyResultResponse is the Query/TallyResult response type. + cosmos.group.v1.QueryVoteByProposalVoterResponse: + type: object + properties: + vote: + description: vote is the vote with given proposal_id and voter. + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal is the unique ID of the proposal. + voter: + type: string + description: voter is the account address of the voter. + option: + description: option is the voter's choice on the proposal. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the vote. + submit_time: + type: string + format: date-time + description: submit_time is the timestamp when the vote was submitted. + description: >- + QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter response + type. + cosmos.group.v1.QueryVotesByProposalResponse: + type: object + properties: + votes: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal is the unique ID of the proposal. + voter: + type: string + description: voter is the account address of the voter. + option: + description: option is the voter's choice on the proposal. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the vote. + submit_time: + type: string + format: date-time + description: submit_time is the timestamp when the vote was submitted. + description: Vote represents a vote for a proposal. + description: votes are the list of votes for given proposal_id. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: QueryVotesByProposalResponse is the Query/VotesByProposal response type. + cosmos.group.v1.QueryVotesByVoterResponse: + type: object + properties: + votes: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal is the unique ID of the proposal. + voter: + type: string + description: voter is the account address of the voter. + option: + description: option is the voter's choice on the proposal. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the vote. + submit_time: + type: string + format: date-time + description: submit_time is the timestamp when the vote was submitted. + description: Vote represents a vote for a proposal. + description: votes are the list of votes by given voter. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + 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: QueryVotesByVoterResponse is the Query/VotesByVoter response type. + cosmos.group.v1.TallyResult: + type: object + properties: + yes_count: + type: string + description: yes_count is the weighted sum of yes votes. + abstain_count: + type: string + description: abstain_count is the weighted sum of abstainers. + no_count: + type: string + description: no_count is the weighted sum of no votes. + no_with_veto_count: + type: string + description: no_with_veto_count is the weighted sum of veto. + description: TallyResult represents the sum of weighted votes for each vote option. + cosmos.group.v1.Vote: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal is the unique ID of the proposal. + voter: + type: string + description: voter is the account address of the voter. + option: + description: option is the voter's choice on the proposal. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the vote. + submit_time: + type: string + format: date-time + description: submit_time is the timestamp when the vote was submitted. + description: Vote represents a vote for a proposal. + cosmos.group.v1.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 proposal. + + - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines an unspecified vote option which will + return an error. + - 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. ibc.applications.transfer.v1.DenomTrace: type: object properties: @@ -76318,9 +89682,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -76433,6 +89798,697 @@ definitions: allow_messages defines a list of sdk message typeURLs allowed to be executed on a host chain. description: QueryParamsResponse is the response type for the Query/Params RPC method. + ibc.applications.fee.v1.Fee: + type: object + properties: + recv_fee: + 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: the packet receive fee + ack_fee: + 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: the packet acknowledgement fee + timeout_fee: + 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: the packet timeout fee + title: Fee defines the ICS29 receive, acknowledgement and timeout fees + ibc.applications.fee.v1.FeeEnabledChannel: + type: object + properties: + port_id: + type: string + title: unique port identifier + channel_id: + type: string + title: unique channel identifier + title: >- + FeeEnabledChannel contains the PortID & ChannelID for a fee enabled + channel + ibc.applications.fee.v1.IdentifiedPacketFees: + type: object + properties: + packet_id: + title: >- + unique packet identifier comprised of the channel ID, port ID and + sequence + type: object + properties: + port_id: + type: string + title: channel port identifier + channel_id: + type: string + title: channel unique identifier + sequence: + type: string + format: uint64 + title: packet sequence + packet_fees: + type: array + items: + type: object + properties: + fee: + title: >- + fee encapsulates the recv, ack and timeout fees associated with + an IBC packet + type: object + properties: + recv_fee: + 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: the packet receive fee + ack_fee: + 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: the packet acknowledgement fee + timeout_fee: + 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: the packet timeout fee + refund_address: + type: string + title: the refund address for unspent fees + relayers: + type: array + items: + type: string + title: optional list of relayers permitted to receive fees + title: >- + PacketFee contains ICS29 relayer fees, refund address and optional + list of permitted relayers + title: list of packet fees + title: >- + IdentifiedPacketFees contains a list of type PacketFee and associated + PacketId + ibc.applications.fee.v1.PacketFee: + type: object + properties: + fee: + title: >- + fee encapsulates the recv, ack and timeout fees associated with an IBC + packet + type: object + properties: + recv_fee: + 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: the packet receive fee + ack_fee: + 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: the packet acknowledgement fee + timeout_fee: + 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: the packet timeout fee + refund_address: + type: string + title: the refund address for unspent fees + relayers: + type: array + items: + type: string + title: optional list of relayers permitted to receive fees + title: >- + PacketFee contains ICS29 relayer fees, refund address and optional list of + permitted relayers + ibc.applications.fee.v1.QueryCounterpartyPayeeResponse: + type: object + properties: + counterparty_payee: + type: string + title: the counterparty payee address used to compensate forward relaying + title: >- + QueryCounterpartyPayeeResponse defines the response type for the + CounterpartyPayee rpc + ibc.applications.fee.v1.QueryFeeEnabledChannelResponse: + type: object + properties: + fee_enabled: + type: boolean + format: boolean + title: boolean flag representing the fee enabled channel status + title: >- + QueryFeeEnabledChannelResponse defines the response type for the + FeeEnabledChannel rpc + ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse: + type: object + properties: + fee_enabled_channels: + type: array + items: + type: object + properties: + port_id: + type: string + title: unique port identifier + channel_id: + type: string + title: unique channel identifier + title: >- + FeeEnabledChannel contains the PortID & ChannelID for a fee enabled + channel + title: list of fee enabled channels + title: >- + QueryFeeEnabledChannelsResponse defines the response type for the + FeeEnabledChannels rpc + ibc.applications.fee.v1.QueryIncentivizedPacketResponse: + type: object + properties: + incentivized_packet: + type: object + properties: + packet_id: + title: >- + unique packet identifier comprised of the channel ID, port ID and + sequence + type: object + properties: + port_id: + type: string + title: channel port identifier + channel_id: + type: string + title: channel unique identifier + sequence: + type: string + format: uint64 + title: packet sequence + packet_fees: + type: array + items: + type: object + properties: + fee: + title: >- + fee encapsulates the recv, ack and timeout fees associated + with an IBC packet + type: object + properties: + recv_fee: + 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: the packet receive fee + ack_fee: + 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: the packet acknowledgement fee + timeout_fee: + 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: the packet timeout fee + refund_address: + type: string + title: the refund address for unspent fees + relayers: + type: array + items: + type: string + title: optional list of relayers permitted to receive fees + title: >- + PacketFee contains ICS29 relayer fees, refund address and + optional list of permitted relayers + title: list of packet fees + title: >- + IdentifiedPacketFees contains a list of type PacketFee and associated + PacketId + title: >- + QueryIncentivizedPacketsResponse defines the response type for the + IncentivizedPacket rpc + ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse: + type: object + properties: + incentivized_packets: + type: array + items: + type: object + properties: + packet_id: + title: >- + unique packet identifier comprised of the channel ID, port ID + and sequence + type: object + properties: + port_id: + type: string + title: channel port identifier + channel_id: + type: string + title: channel unique identifier + sequence: + type: string + format: uint64 + title: packet sequence + packet_fees: + type: array + items: + type: object + properties: + fee: + title: >- + fee encapsulates the recv, ack and timeout fees associated + with an IBC packet + type: object + properties: + recv_fee: + 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: the packet receive fee + ack_fee: + 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: the packet acknowledgement fee + timeout_fee: + 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: the packet timeout fee + refund_address: + type: string + title: the refund address for unspent fees + relayers: + type: array + items: + type: string + title: optional list of relayers permitted to receive fees + title: >- + PacketFee contains ICS29 relayer fees, refund address and + optional list of permitted relayers + title: list of packet fees + title: >- + IdentifiedPacketFees contains a list of type PacketFee and + associated PacketId + title: Map of all incentivized_packets + title: >- + QueryIncentivizedPacketsResponse defines the response type for the + incentivized packets RPC + ibc.applications.fee.v1.QueryIncentivizedPacketsResponse: + type: object + properties: + incentivized_packets: + type: array + items: + type: object + properties: + packet_id: + title: >- + unique packet identifier comprised of the channel ID, port ID + and sequence + type: object + properties: + port_id: + type: string + title: channel port identifier + channel_id: + type: string + title: channel unique identifier + sequence: + type: string + format: uint64 + title: packet sequence + packet_fees: + type: array + items: + type: object + properties: + fee: + title: >- + fee encapsulates the recv, ack and timeout fees associated + with an IBC packet + type: object + properties: + recv_fee: + 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: the packet receive fee + ack_fee: + 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: the packet acknowledgement fee + timeout_fee: + 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: the packet timeout fee + refund_address: + type: string + title: the refund address for unspent fees + relayers: + type: array + items: + type: string + title: optional list of relayers permitted to receive fees + title: >- + PacketFee contains ICS29 relayer fees, refund address and + optional list of permitted relayers + title: list of packet fees + title: >- + IdentifiedPacketFees contains a list of type PacketFee and + associated PacketId + title: list of identified fees for incentivized packets + title: >- + QueryIncentivizedPacketsResponse defines the response type for the + IncentivizedPackets rpc + ibc.applications.fee.v1.QueryPayeeResponse: + type: object + properties: + payee_address: + type: string + title: the payee address to which packet fees are paid out + title: QueryPayeeResponse defines the response type for the Payee rpc + ibc.applications.fee.v1.QueryTotalAckFeesResponse: + type: object + properties: + ack_fees: + 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: the total packet acknowledgement fees + title: >- + QueryTotalAckFeesResponse defines the response type for the TotalAckFees + rpc + ibc.applications.fee.v1.QueryTotalRecvFeesResponse: + type: object + properties: + recv_fees: + 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: the total packet receive fees + title: >- + QueryTotalRecvFeesResponse defines the response type for the TotalRecvFees + rpc + ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse: + type: object + properties: + timeout_fees: + 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: the total packet timeout fees + title: >- + QueryTotalTimeoutFeesResponse defines the response type for the + TotalTimeoutFees rpc + ibc.core.channel.v1.PacketId: + type: object + properties: + port_id: + type: string + title: channel port identifier + channel_id: + type: string + title: channel unique identifier + sequence: + type: string + format: uint64 + title: packet sequence + title: |- + PacketId is an identifer for a unique Packet + Source chains refer to packets by source port/channel + Destination chains refer to packets by destination port/channel ibc.core.client.v1.ConsensusStateWithHeight: type: object properties: @@ -76661,6 +90717,7 @@ definitions: type: string title: client identifier client_state: + title: client state type: object properties: type_url: @@ -76819,7 +90876,6 @@ definitions: "@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. @@ -77063,6 +91119,7 @@ definitions: type: string title: client identifier client_state: + title: client state type: object properties: type_url: @@ -77231,7 +91288,6 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: client state description: >- IdentifiedClientState defines a client state with an additional client @@ -77245,9 +91301,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -77327,9 +91384,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -77777,9 +91835,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -78340,6 +92399,21 @@ definitions: description: |- IdentifiedConnection defines a connection with additional connection identifier field. + ibc.core.connection.v1.Params: + type: object + properties: + max_expected_time_per_block: + type: string + format: uint64 + description: >- + maximum expected time per block (in nanoseconds), used to enforce + block delay. This parameter should reflect the + + largest amount of time that the chain might reasonably take to produce + the next block under normal operating + + conditions. A safe choice is 3-5x the expected time per block. + description: Params defines the set of Connection parameters. ibc.core.connection.v1.QueryClientConnectionsResponse: type: object properties: @@ -78798,6 +92872,27 @@ definitions: title: |- QueryConnectionConsensusStateResponse is the response type for the Query/ConnectionConsensusState RPC method + ibc.core.connection.v1.QueryConnectionParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + max_expected_time_per_block: + type: string + format: uint64 + description: >- + maximum expected time per block (in nanoseconds), used to enforce + block delay. This parameter should reflect the + + largest amount of time that the chain might reasonably take to + produce the next block under normal operating + + conditions. A safe choice is 3-5x the expected time per block. + description: >- + QueryConnectionParamsResponse is the response type for the + Query/ConnectionParams RPC method. ibc.core.connection.v1.QueryConnectionResponse: type: object properties: @@ -79024,9 +93119,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -79896,9 +93992,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -80031,9 +94128,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -80204,9 +94302,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -80338,9 +94437,10 @@ definitions: next_key: type: string format: byte - title: |- + description: |- next_key is the key to be passed to PageRequest.key to - query the next page most efficiently + query the next page most efficiently. It will be empty if + there are no more results. total: type: string format: uint64 @@ -80534,1607 +94634,3 @@ definitions: ready to send and receive packets. - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive packets. - LegacyCrossChain: - type: boolean - example: true - LegacyMsg: - type: object - properties: - type: - type: string - example: cosmos-sdk/MsgSend - value: - type: object - properties: - from_address: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - to_address: - type: string - example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - LegacyAddress: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - LegacyAddress2: - type: string - description: bech32 encoded address - example: kava1atsrkjac6ulgmwhudfc36lnjfgv340vlvm757z - LegacyBinanceChainAddress: - type: string - description: address on another chain (binance) - example: bnb1uky3me9ggqypmrsvxk7ur6hqkzq7zmv4ed4ng7 - LegacyBinanceChainAddress2: - type: string - description: address on another chain (binance) - example: bnb10uypsspvl6jlxcx5xse02pag39l8xpe7a3468h - LegacyRandomNumberHash: - type: string - description: hex-encoded sha256 hash of a 64bit random number - example: c0544b7f4b890a673ea3f61bdb4650fbfe2f3e56bda1b397d6d592fca7163c8c - LegacyTimestamp: - type: string - description: unix timestamp - example: '1585252531' - LegacyHeightSpan: - type: string - description: span of blocks for which an atomic swap is valid - example: '3600' - LegacyCoin: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - LegacyCoins: - type: array - items: - $ref: '#/definitions/LegacyCoins' - LegacyCoinBNB: - type: object - properties: - denom: - type: string - example: bnb - amount: - type: string - example: '555555' - LegacyCollateralType: - type: string - example: xrpb-a - LegacyCoinCollateral: - type: object - properties: - denom: - type: string - example: xrp - amount: - type: string - example: '10000000000' - LegacyCoinPrincipal: - type: object - properties: - denom: - type: string - example: usdx - amount: - type: string - example: '10000000' - LegacyCoinBid: - type: object - properties: - denom: - type: string - example: usdx - amount: - type: string - example: '100000000' - LegacySignature: - type: object - properties: - signature: - type: string - example: >- - W1HfKcc4F0rCSoxheZ7fsrB5nGK58U4gKysuzsmUwhloVnCxmbCx289uVMMvQN6tOcQsz7hMVTJrXSA1xzevvw== - pubkey: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Agey31h/NYpcy0sYm4liHMrXJMzbQUrgV4uHd/w09CXN - LegacyStdTx: - type: object - properties: - msg: - type: array - items: - type: object - properties: - type: - type: string - example: cosmos-sdk/MsgSend - value: - type: object - properties: - from_address: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - to_address: - type: string - example: kava1ls82zzghsx0exkpr52m8vht5jqs3un0ceysshz - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - fee: - type: object - properties: - gas: - type: string - example: '200000' - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - memo: - type: string - signatures: - type: array - items: - type: object - properties: - signature: - type: string - example: >- - W1HfKcc4F0rCSoxheZ7fsrB5nGK58U4gKysuzsmUwhloVnCxmbCx289uVMMvQN6tOcQsz7hMVTJrXSA1xzevvw== - pubkey: - type: object - properties: - type: - type: string - example: tendermint/PubKeySecp256k1 - value: - type: string - example: Agey31h/NYpcy0sYm4liHMrXJMzbQUrgV4uHd/w09CXN - LegacyBaseReq: - type: object - properties: - from: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - description: Sender address or Keybase name to generate a transaction - memo: - type: string - example: a memo - chain_id: - type: string - example: testing - account_number: - type: string - example: '1' - sequence: - type: string - example: '0' - gas: - type: string - example: '200000' - gas_adjustment: - type: string - example: '1.0' - fees: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - simulate: - type: boolean - example: false - description: >- - Estimate gas for a transaction (cannot be used in conjunction with - generate_only) - LegacyAtomicSwapResponse: - type: object - properties: - id: - type: string - example: FFEA80A3D9A42427CC12DB957866C6D428C16AA5EA6D9A4A756EF04BF9F2FF06 - status: - type: string - example: Completed - amount: - type: object - properties: - denom: - type: string - example: bnb - amount: - type: string - example: '555555' - random_number_hash: - type: string - example: 0b1e35e991bf052be230ae8dd3ff90b69a610160d28a9eb3c0701395f9d2b291 - expire_hieght: - type: string - example: '532463' - timestamp: - type: string - example: '1589020884' - sender: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - recipient: - type: string - description: bech32 encoded address - example: kava1atsrkjac6ulgmwhudfc36lnjfgv340vlvm757z - sender_other_chain: - type: string - description: address on another chain (binance) - example: bnb1uky3me9ggqypmrsvxk7ur6hqkzq7zmv4ed4ng7 - recipient_other_chain: - type: string - description: address on another chain (binance) - example: bnb10uypsspvl6jlxcx5xse02pag39l8xpe7a3468h - closed_block: - type: string - example: '532105' - cross_chain: - type: boolean - example: true - direction: - type: string - example: Incoming - LegacyAssetSupplyResponse: - type: object - properties: - denom: - type: string - example: bnb - incoming_supply: - type: object - properties: - denom: - type: string - example: bnb - amount: - type: string - example: '555555' - outgoing_supply: - type: object - properties: - denom: - type: string - example: bnb - amount: - type: string - example: '555555' - current_supply: - type: object - properties: - denom: - type: string - example: bnb - amount: - type: string - example: '555555' - limit: - type: object - properties: - denom: - type: string - example: bnb - amount: - type: string - example: '555555' - LegacyBep3ParamsResponse: - type: object - properties: - bnb_deputy_address: - type: string - example: kava1aphsdnz5hu2t5ty2au6znprug5kx3zpy6zwq29 - min_block_lock: - type: string - example: '80' - max_block_lock: - type: string - example: '3600' - supported_assets: - type: array - items: - type: object - properties: - denom: - type: string - example: bnb - coin_id: - type: string - example: '714' - limit: - type: string - example: '100' - active: - type: boolean - example: true - LegacyBep3Asset: - type: object - properties: - denom: - type: string - example: bnb - coin_id: - type: string - example: '714' - limit: - type: string - example: '100' - active: - type: boolean - example: true - LegacyRewardResult: - type: object - properties: - hard_claims: - type: array - items: - type: object - properties: - base_claim: - type: object - properties: - owner: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - reward: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - supply_reward_indexes: - type: array - items: - type: object - properties: - collateral_type: - type: string - example: bnb - reward_indexes: - type: array - items: - type: object - properties: - collateral_type: - type: string - example: bnb - reward_factor: - type: string - example: '1.2581' - borrow_reward_indexes: - type: array - items: - type: object - properties: - collateral_type: - type: string - example: bnb - reward_indexes: - type: array - items: - type: object - properties: - collateral_type: - type: string - example: bnb - reward_factor: - type: string - example: '1.2581' - delegator_reward_indexes: - type: array - items: - type: object - properties: - collateral_type: - type: string - example: bnb - reward_factor: - type: string - example: '1.2581' - usdx_minting_claims: - type: array - items: - type: object - properties: - base_claim: - type: object - properties: - owner: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - reward: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - reward_indexes: - type: array - items: - type: object - properties: - collateral_type: - type: string - example: bnb - reward_factor: - type: string - example: '1.2581' - LegacyHardLiquidityProviderClaim: - type: object - properties: - base_claim: - type: object - properties: - owner: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - reward: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - supply_reward_indexes: - type: array - items: - type: object - properties: - collateral_type: - type: string - example: bnb - reward_indexes: - type: array - items: - type: object - properties: - collateral_type: - type: string - example: bnb - reward_factor: - type: string - example: '1.2581' - borrow_reward_indexes: - type: array - items: - type: object - properties: - collateral_type: - type: string - example: bnb - reward_indexes: - type: array - items: - type: object - properties: - collateral_type: - type: string - example: bnb - reward_factor: - type: string - example: '1.2581' - delegator_reward_indexes: - type: array - items: - type: object - properties: - collateral_type: - type: string - example: bnb - reward_factor: - type: string - example: '1.2581' - LegacyUSDXMintingClaims: - type: object - properties: - base_claim: - type: object - properties: - owner: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - reward: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - reward_indexes: - type: array - items: - type: object - properties: - collateral_type: - type: string - example: bnb - reward_factor: - type: string - example: '1.2581' - LegacyBaseClaim: - type: object - properties: - owner: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - reward: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - LegacyBaseMultiClaim: - type: object - properties: - owner: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - reward: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - LegacyMultiRewardIndex: - type: object - properties: - collateral_type: - type: string - example: bnb - reward_indexes: - type: array - items: - type: object - properties: - collateral_type: - type: string - example: bnb - reward_factor: - type: string - example: '1.2581' - LegacyRewardIndex: - type: object - properties: - collateral_type: - type: string - example: bnb - reward_factor: - type: string - example: '1.2581' - LegacyIncentiveParams: - type: object - properties: - usdx_minting_reward_periods: - type: array - items: - type: object - properties: - active: - type: boolean - example: true - collateral_type: - type: string - example: bnb - start: - type: string - example: '2020-02-05T23:45:55.761435272Z' - end: - type: string - example: '2024-02-05T23:45:55.761435272Z' - rewards_per_second: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - hard_supply_reward_periods: - type: array - items: - type: object - properties: - active: - type: boolean - example: true - collateral_type: - type: string - example: bnb - start: - type: string - example: '2020-02-05T23:45:55.761435272Z' - end: - type: string - example: '2024-02-05T23:45:55.761435272Z' - rewards_per_second: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - hard_borrow_reward_periods: - type: array - items: - type: object - properties: - active: - type: boolean - example: true - collateral_type: - type: string - example: bnb - start: - type: string - example: '2020-02-05T23:45:55.761435272Z' - end: - type: string - example: '2024-02-05T23:45:55.761435272Z' - rewards_per_second: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - hard_delegator_reward_periods: - type: array - items: - type: object - properties: - active: - type: boolean - example: true - collateral_type: - type: string - example: bnb - start: - type: string - example: '2020-02-05T23:45:55.761435272Z' - end: - type: string - example: '2024-02-05T23:45:55.761435272Z' - rewards_per_second: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - claim_multipliers: - type: array - items: - type: object - properties: - name: - type: string - example: small - months_lockup: - type: string - example: '12' - factor: - type: string - example: '0.33' - claim_end: - type: string - example: '2022-02-05T23:45:55.761435272Z' - LegacyRewardPeriod: - type: object - properties: - active: - type: boolean - example: true - collateral_type: - type: string - example: bnb - start: - type: string - example: '2020-02-05T23:45:55.761435272Z' - end: - type: string - example: '2024-02-05T23:45:55.761435272Z' - rewards_per_second: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - LegacyMultiRewardPeriod: - type: object - properties: - active: - type: boolean - example: true - collateral_type: - type: string - example: bnb - start: - type: string - example: '2020-02-05T23:45:55.761435272Z' - end: - type: string - example: '2024-02-05T23:45:55.761435272Z' - rewards_per_second: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - LegacyPubProposal: - type: object - properties: - title: - type: string - example: the title of the proposal - description: - type: string - example: the description of the proposal - LegacyCdpResponse: - type: object - properties: - id: - type: string - example: '1' - owner: - type: string - example: kava1q53rwutgpzx7szcrgzqguxyccjpzt9j4cyctn9 - collateral: - type: object - properties: - denom: - type: string - example: xrp - amount: - type: string - example: '10000000000' - type: - type: string - example: xrpb-a - principal: - type: object - properties: - denom: - type: string - example: usdx - amount: - type: string - example: '10000000' - accumulated_fees: - type: object - properties: - denom: - type: string - example: usdx - amount: - type: string - example: '10000000' - fees_updated: - type: string - example: '2020-02-05T23:45:55.761435272Z' - collateral_value: - type: object - properties: - denom: - type: string - example: usdx - amount: - type: string - example: '10000000' - collateralization_ratio: - type: string - example: '2.721734157907653857' - LegacyCdpDepositResponse: - type: object - properties: - cdp_id: - type: string - example: '1' - depositor: - type: string - example: kava1q53rwutgpzx7szcrgzqguxyccjpzt9j4cyctn9 - amount: - type: object - properties: - denom: - type: string - example: xrp - amount: - type: string - example: '10000000000' - LegacyPricefeedParameters: - type: object - properties: - markets: - type: array - items: - type: object - properties: - market_id: - type: string - example: xrp:usd - base_asset: - type: string - example: xrp - quote_asset: - type: string - example: usd - oracles: - type: array - x-nullable: true - items: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - active: - type: boolean - example: true - LegacyPrice: - type: object - properties: - market_id: - type: string - example: xrp:usd - price: - type: string - example: '0.298758999999999997' - LegacyPostedPrice: - type: object - properties: - market_id: - type: string - example: xrp:usd - oracle_address: - type: string - example: kava10cw2m04528dwlc44k0myd7strj3eq5jr6s8pxs - price: - type: string - example: '0.298758999999999997' - expiry: - type: string - example: '2021-02-12T23:10:00Z' - LegacyMarket: - type: object - properties: - market_id: - type: string - example: xrp:usd - base_asset: - type: string - example: xrp - quote_asset: - type: string - example: usd - oracles: - type: array - x-nullable: true - items: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - active: - type: boolean - example: true - LegacySwapParams: - type: object - properties: - allowed_pools: - type: array - items: - type: object - properties: - token_a: - type: string - example: ukava - token_b: - type: string - example: usdx - swap_fee: - type: string - example: '0.03' - LegacyAllowedPool: - type: object - properties: - token_a: - type: string - example: ukava - token_b: - type: string - example: usdx - LegacySwapDepositsQueryResult: - type: object - properties: - depositor: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - pool_id: - type: string - example: abc:xyz - shares_owned: - type: string - example: '500' - shares_value: - $ref: '#/definitions/LegacyCoins' - LegacySwapPoolStatsQueryResult: - type: object - properties: - name: - type: string - example: abc:xyz - coins: - $ref: '#/definitions/LegacyCoins' - total_shares: - type: string - example: '500' - LegacyHardParams: - type: object - properties: - money_markets: - type: array - items: - type: object - properties: - denom: - type: string - example: bnb - borrow_limit: - type: object - properties: - has_max_limit: - type: boolean - example: true - maximum_limit: - type: string - example: '100000000000000' - loan_to_value: - type: string - example: '0.8' - spot_market_id: - type: string - example: bnb:usd - conversion_factor: - type: string - example: '100000000' - interest_rate_model: - type: object - properties: - base_rate_apy: - type: string - example: '0' - base_multiplier: - type: string - example: '0.1' - kink: - type: string - example: '0.8' - jump_multiplier: - type: string - example: '0.5' - reserve_factor: - type: string - example: '0.05' - keeper_reward_percentage: - type: string - example: '0.05' - minimum_borrow_usd_value: - type: string - example: '10' - LegacyMoneyMarket: - type: object - properties: - denom: - type: string - example: bnb - borrow_limit: - type: object - properties: - has_max_limit: - type: boolean - example: true - maximum_limit: - type: string - example: '100000000000000' - loan_to_value: - type: string - example: '0.8' - spot_market_id: - type: string - example: bnb:usd - conversion_factor: - type: string - example: '100000000' - interest_rate_model: - type: object - properties: - base_rate_apy: - type: string - example: '0' - base_multiplier: - type: string - example: '0.1' - kink: - type: string - example: '0.8' - jump_multiplier: - type: string - example: '0.5' - reserve_factor: - type: string - example: '0.05' - keeper_reward_percentage: - type: string - example: '0.05' - LegacyBorrowLimit: - type: object - properties: - has_max_limit: - type: boolean - example: true - maximum_limit: - type: string - example: '100000000000000' - loan_to_value: - type: string - example: '0.8' - LegacyInterestRateModel: - type: object - properties: - base_rate_apy: - type: string - example: '0' - base_multiplier: - type: string - example: '0.1' - kink: - type: string - example: '0.8' - jump_multiplier: - type: string - example: '0.5' - LegacyHardDepositResponse: - type: object - properties: - depositor: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - index: - type: array - items: - type: object - properties: - denom: - type: string - example: bnb - value: - type: string - example: '0.1258' - LegacyHardBorrowResponse: - type: object - properties: - borrower: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - amount: - type: array - items: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - index: - type: array - items: - type: object - properties: - denom: - type: string - example: bnb - value: - type: string - example: '0.1258' - LegacySupplyInterestFactor: - type: object - properties: - denom: - type: string - example: bnb - value: - type: string - example: '0.1258' - LegacyBorrowInterestFactor: - type: object - properties: - denom: - type: string - example: bnb - value: - type: string - example: '0.1258' - LegacyMoneyMarketInterestRate: - type: object - properties: - denom: - type: string - example: bnb - supply_interest_rate: - type: string - example: '5.25' - borrow_interest_rate: - type: string - example: '5.25' - LegacyMultiplierName: - type: string - example: small - LegacyMultiplier: - type: object - properties: - name: - type: string - example: small - months_lockup: - type: string - example: '12' - factor: - type: string - example: '0.33' - LegacyIssuanceParams: - type: object - properties: - assets: - type: array - items: - type: object - properties: - owner: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - denom: - type: string - example: btc - blocked_addresses: - type: array - items: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - paused: - type: boolean - example: false - blockable: - type: boolean - example: true - rate_limit: - type: object - properties: - active: - type: boolean - example: true - limit: - type: string - example: '500000000' - time_period: - type: string - example: '518400000000000' - LegacyIssuanceAsset: - type: object - properties: - owner: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - denom: - type: string - example: btc - blocked_addresses: - type: array - items: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - paused: - type: boolean - example: false - blockable: - type: boolean - example: true - rate_limit: - type: object - properties: - active: - type: boolean - example: true - limit: - type: string - example: '500000000' - time_period: - type: string - example: '518400000000000' - LegacyRateLimit: - type: object - properties: - active: - type: boolean - example: true - limit: - type: string - example: '500000000' - time_period: - type: string - example: '518400000000000' - LegacyAuctionParameters: - type: object - properties: - max_auction_duration: - type: string - example: '172800000000000' - bid_duration: - type: string - example: '600000000000' - increment_surplus: - type: string - example: '0.05' - increment_debt: - type: string - example: '0.05' - increment_collateral: - type: string - example: '0.05' - LegacyAuctionResponse: - type: object - properties: - id: - type: string - example: '1' - initiator: - type: string - example: liquidator - lot: - type: object - properties: - denom: - type: string - example: xrp - amount: - type: string - example: '10000000000' - bidder: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - bid: - type: object - properties: - denom: - type: string - example: ukava - amount: - type: string - example: '50000' - has_received_bids: - type: boolean - example: false - end_time: - type: string - example: '2020-02-05T23:45:55.761435272Z' - max_end_time: - type: string - example: '2020-02-05T23:45:55.761435272Z' - type: - type: string - example: collateral - phase: - type: string - example: forward - LegacyCollateralParam: - type: object - properties: - denom: - type: string - example: xrp - type: - type: string - example: xrp-a - liquidation_ratio: - type: string - example: '2.000000000000000000' - debt_limit: - type: object - properties: - denom: - type: string - example: usdx - amount: - type: string - example: '10000000' - stability_fee: - type: string - example: '1.000000001547126000' - auction_size: - type: string - example: '5000000000' - liquidation_penalty: - type: string - example: '0.050000000000000000' - prefix: - type: integer - example: 0 - spot_market_id: - type: string - example: xrp:usd - liquidation_market_id: - type: string - example: xrp:usd:30 - keeper_reward_percentage: - type: string - example: '0.05' - check_collateralization_index_count: - type: string - example: '10' - conversion_factor: - type: string - example: '6' - LegacyDebtParam: - type: object - properties: - denom: - type: string - example: usdx - reference_asset: - type: string - example: usd - conversion_factor: - type: string - example: '6' - debt_floor: - type: string - example: '10000000' - LegacyProposer: - type: object - properties: - proposal_id: - type: string - example: '1' - proposer: - type: string - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - LegacyCommitteeVote: - type: object - properties: - voter: - type: string - proposal_id: - type: string - vote_type: - type: string - LegacyCommitteeProposal: - type: object - properties: - pub_proposal: - type: object - properties: - title: - type: string - example: the title of the proposal - description: - type: string - example: the description of the proposal - id: - type: string - example: '1' - committee_id: - type: string - example: '1' - deadline: - type: string - example: '2020-05-10T16:18:43.752522893Z' - LegacyCommittee: - type: object - properties: - id: - type: string - example: '1' - description: - type: string - example: description of committee - members: - type: array - items: - type: string - description: bech32 encoded address - example: kava1ffv7nhd3z6sych2qpqkk03ec6hzkmufy0r2s4c - permissions: - type: array - items: - type: object - properties: - type: - type: string - example: param_change_permission - allowed_params: - type: array - items: - type: object - properties: - subspace: - type: string - example: cdp - key: - type: string - example: collateral_params - vote_threshold: - type: string - example: '0.5' - proposal_duration: - type: string - example: '3600000000000' - LegacyPermission: - type: object - properties: - type: - type: string - example: param_change_permission - allowed_params: - type: array - items: - type: object - properties: - subspace: - type: string - example: cdp - key: - type: string - example: collateral_params - LegacyAllowedParam: - type: object - properties: - subspace: - type: string - example: cdp - key: - type: string - example: collateral_params - LegacyRedelegation: - type: object - properties: - delegator_address: - type: string - validator_src_address: - type: string - validator_dst_address: - type: string - entries: - type: array - items: - $ref: '#/definitions/LegacyRedelegation' - LegacyPublicKey: - type: object - properties: - type: - type: string - value: - type: string - LegacyKavadistPeriod: - type: object - properties: - start: - type: string - example: 2020-06-01:14:00:00Z - end: - type: string - example: 2020-06-01:14:00:00Z - inflation: - type: string - example: '1.000000001167363430' -securityDefinitions: - kms: - type: basic diff --git a/client/keys.go b/client/keys.go index 8de84035..62ba114a 100644 --- a/client/keys.go +++ b/client/keys.go @@ -11,9 +11,9 @@ import ( "github.com/tendermint/tendermint/libs/cli" "github.com/cosmos/cosmos-sdk/crypto/keyring" - ethclient "github.com/tharsis/ethermint/client" - clientkeys "github.com/tharsis/ethermint/client/keys" - "github.com/tharsis/ethermint/crypto/hd" + ethclient "github.com/evmos/ethermint/client" + clientkeys "github.com/evmos/ethermint/client/keys" + "github.com/evmos/ethermint/crypto/hd" ) var ethFlag = "eth" @@ -88,7 +88,14 @@ func runAddCmd(cmd *cobra.Command, args []string) error { dryRun, _ := cmd.Flags().GetBool(flags.FlagDryRun) if dryRun { - kr, err = keyring.New(sdk.KeyringServiceName(), keyring.BackendMemory, clientCtx.KeyringDir, buf, hd.EthSecp256k1Option()) + kr, err = keyring.New( + sdk.KeyringServiceName(), + keyring.BackendMemory, + clientCtx.KeyringDir, + buf, + clientCtx.Codec, + hd.EthSecp256k1Option(), + ) clientCtx = clientCtx.WithKeyring(kr) } eth, _ := cmd.Flags().GetBool(ethFlag) diff --git a/cmd/kava/cmd/app.go b/cmd/kava/cmd/app.go index 755d620c..ac238430 100644 --- a/cmd/kava/cmd/app.go +++ b/cmd/kava/cmd/app.go @@ -12,14 +12,15 @@ import ( "github.com/cosmos/cosmos-sdk/server" servertypes "github.com/cosmos/cosmos-sdk/server/types" "github.com/cosmos/cosmos-sdk/snapshots" + snapshottypes "github.com/cosmos/cosmos-sdk/snapshots/types" "github.com/cosmos/cosmos-sdk/store" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/crisis" + ethermintflags "github.com/evmos/ethermint/server/flags" "github.com/spf13/cast" "github.com/spf13/cobra" "github.com/tendermint/tendermint/libs/log" db "github.com/tendermint/tm-db" - ethermintflags "github.com/tharsis/ethermint/server/flags" "github.com/kava-labs/kava/app" "github.com/kava-labs/kava/app/params" @@ -77,11 +78,16 @@ func (ac appCreator) newApp( panic(fmt.Sprintf("could not get authorized address from config: %v", err)) } - iavlDisableFastNode := appOpts.Get(server.FlagIAVLFastNode) + iavlDisableFastNode := appOpts.Get(server.FlagDisableIAVLFastNode) if iavlDisableFastNode == nil { iavlDisableFastNode = true } + snapshotOptions := snapshottypes.NewSnapshotOptions( + cast.ToUint64(appOpts.Get(server.FlagStateSyncSnapshotInterval)), + cast.ToUint32(appOpts.Get(server.FlagStateSyncSnapshotKeepRecent)), + ) + return app.NewApp( logger, db, homeDir, traceStore, ac.encodingConfig, app.Options{ @@ -102,11 +108,10 @@ func (ac appCreator) newApp( baseapp.SetInterBlockCache(cache), baseapp.SetTrace(cast.ToBool(appOpts.Get(server.FlagTrace))), baseapp.SetIndexEvents(cast.ToStringSlice(appOpts.Get(server.FlagIndexEvents))), - baseapp.SetSnapshotStore(snapshotStore), - baseapp.SetSnapshotInterval(cast.ToUint64(appOpts.Get(server.FlagStateSyncSnapshotInterval))), - baseapp.SetSnapshotKeepRecent(cast.ToUint32(appOpts.Get(server.FlagStateSyncSnapshotKeepRecent))), + baseapp.SetSnapshot(snapshotStore, snapshotOptions), baseapp.SetIAVLCacheSize(cast.ToInt(appOpts.Get(server.FlagIAVLCacheSize))), baseapp.SetIAVLDisableFastNode(cast.ToBool(iavlDisableFastNode)), + baseapp.SetIAVLLazyLoading(cast.ToBool(appOpts.Get(server.FlagIAVLLazyLoading))), ) } diff --git a/cmd/kava/cmd/genaccounts.go b/cmd/kava/cmd/genaccounts.go index 22be7d18..5a5d157f 100644 --- a/cmd/kava/cmd/genaccounts.go +++ b/cmd/kava/cmd/genaccounts.go @@ -1,4 +1,4 @@ -// Sourced from https://github.com/tharsis/ethermint/blob/main/cmd/ethermintd/genaccounts.go +// Sourced from https://github.com/evmos/ethermint/blob/main/cmd/ethermintd/genaccounts.go package cmd import ( @@ -20,7 +20,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" - "github.com/tharsis/ethermint/crypto/hd" + "github.com/evmos/ethermint/crypto/hd" ) const ( @@ -61,6 +61,7 @@ contain valid denominations. Accounts may optionally be supplied with vesting pa keyringBackend, clientCtx.HomeDir, inBuf, + clientCtx.Codec, hd.EthSecp256k1Option(), ) if err != nil { @@ -75,7 +76,10 @@ contain valid denominations. Accounts may optionally be supplied with vesting pa return fmt.Errorf("failed to get address from Keyring: %w", err) } - addr = info.GetAddress() + addr, err = info.GetAddress() + if err != nil { + return fmt.Errorf("failed to get address from Keyring: %w", err) + } } coins, err := sdk.ParseCoinsNormalized(args[1]) diff --git a/cmd/kava/cmd/root.go b/cmd/kava/cmd/root.go index e195c8c4..6d536880 100644 --- a/cmd/kava/cmd/root.go +++ b/cmd/kava/cmd/root.go @@ -12,12 +12,13 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" + ethermintclient "github.com/evmos/ethermint/client" + "github.com/evmos/ethermint/crypto/hd" + ethermintserver "github.com/evmos/ethermint/server" + servercfg "github.com/evmos/ethermint/server/config" "github.com/spf13/cobra" + tmcfg "github.com/tendermint/tendermint/config" tmcli "github.com/tendermint/tendermint/libs/cli" - ethermintclient "github.com/tharsis/ethermint/client" - "github.com/tharsis/ethermint/crypto/hd" - ethermintserver "github.com/tharsis/ethermint/server" - servercfg "github.com/tharsis/ethermint/server/config" "github.com/kava-labs/kava/app" "github.com/kava-labs/kava/app/params" @@ -69,7 +70,12 @@ func NewRootCmd() *cobra.Command { customAppTemplate, customAppConfig := servercfg.AppConfig("ukava") - return server.InterceptConfigsPreRunHandler(cmd, customAppTemplate, customAppConfig) + return server.InterceptConfigsPreRunHandler( + cmd, + customAppTemplate, + customAppConfig, + tmcfg.DefaultConfig(), + ) }, } @@ -81,6 +87,7 @@ func NewRootCmd() *cobra.Command { // addSubCmds registers all the sub commands used by kava. func addSubCmds(rootCmd *cobra.Command, encodingConfig params.EncodingConfig, defaultNodeHome string) { rootCmd.AddCommand( + StatusCommand(), ethermintclient.ValidateChainID( genutilcli.InitCmd(app.ModuleBasics, defaultNodeHome), ), @@ -101,11 +108,18 @@ func addSubCmds(rootCmd *cobra.Command, encodingConfig params.EncodingConfig, de } // ethermintserver adds additional flags to start the JSON-RPC server for evm support - ethermintserver.AddCommands(rootCmd, defaultNodeHome, ac.newApp, ac.appExport, ac.addStartCmdFlags) + ethermintserver.AddCommands( + rootCmd, + ethermintserver.NewDefaultStartOptions( + ac.newApp, + app.DefaultNodeHome, + ), + ac.appExport, + ac.addStartCmdFlags, + ) // add keybase, auxiliary RPC, query, and tx child commands rootCmd.AddCommand( - StatusCommand(), newQueryCmd(), newTxCmd(), kavaclient.KeyCommands(app.DefaultNodeHome), diff --git a/cmd/kava/cmd/status.go b/cmd/kava/cmd/status.go index 3a36691b..ac6028f2 100644 --- a/cmd/kava/cmd/status.go +++ b/cmd/kava/cmd/status.go @@ -2,20 +2,17 @@ package cmd import ( "context" - "net/http" "github.com/spf13/cobra" "github.com/tendermint/tendermint/libs/bytes" "github.com/tendermint/tendermint/p2p" - ctypes "github.com/tendermint/tendermint/rpc/core/types" + coretypes "github.com/tendermint/tendermint/rpc/core/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - "github.com/cosmos/cosmos-sdk/types/rest" - "github.com/cosmos/cosmos-sdk/version" ) // ValidatorInfo is info about the node's validator, same as Tendermint, @@ -30,7 +27,7 @@ type validatorInfo struct { // PubKey. type resultStatus struct { NodeInfo p2p.DefaultNodeInfo `json:"node_info"` - SyncInfo ctypes.SyncInfo `json:"sync_info"` + SyncInfo coretypes.SyncInfo `json:"sync_info"` ValidatorInfo validatorInfo `json:"validator_info"` } @@ -80,53 +77,11 @@ func StatusCommand() *cobra.Command { return cmd } -func getNodeStatus(clientCtx client.Context) (*ctypes.ResultStatus, error) { +func getNodeStatus(clientCtx client.Context) (*coretypes.ResultStatus, error) { node, err := clientCtx.GetNode() if err != nil { - return &ctypes.ResultStatus{}, err + return &coretypes.ResultStatus{}, err } return node.Status(context.Background()) } - -// NodeInfoResponse defines a response type that contains node status and version -// information. -type NodeInfoResponse struct { - p2p.DefaultNodeInfo `json:"node_info"` - - ApplicationVersion version.Info `json:"application_version"` -} - -// REST handler for node info -func NodeInfoRequestHandlerFn(clientCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - status, err := getNodeStatus(clientCtx) - if rest.CheckInternalServerError(w, err) { - return - } - - resp := NodeInfoResponse{ - DefaultNodeInfo: status.NodeInfo, - ApplicationVersion: version.NewInfo(), - } - - rest.PostProcessResponseBare(w, clientCtx, resp) - } -} - -// SyncingResponse defines a response type that contains node syncing information. -type SyncingResponse struct { - Syncing bool `json:"syncing"` -} - -// REST handler for node syncing -func NodeSyncingRequestHandlerFn(clientCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - status, err := getNodeStatus(clientCtx) - if rest.CheckInternalServerError(w, err) { - return - } - - rest.PostProcessResponseBare(w, clientCtx, SyncingResponse{Syncing: status.SyncInfo.CatchingUp}) - } -} diff --git a/contrib/devnet/init-new-chain.sh b/contrib/devnet/init-new-chain.sh index 5bb2715f..bbe548cb 100755 --- a/contrib/devnet/init-new-chain.sh +++ b/contrib/devnet/init-new-chain.sh @@ -87,7 +87,10 @@ jq '.app_state.feemarket.params.no_base_fee = true' $DATA/config/genesis.json|sp # Disable london fork jq '.app_state.evm.params.chain_config.london_block = null' $DATA/config/genesis.json|sponge $DATA/config/genesis.json jq '.app_state.evm.params.chain_config.arrow_glacier_block = null' $DATA/config/genesis.json|sponge $DATA/config/genesis.json -jq '.app_state.evm.params.chain_config.merge_fork_block = null' $DATA/config/genesis.json|sponge $DATA/config/genesis.json +jq '.app_state.evm.params.chain_config.gray_glacier_block = null' $DATA/config/genesis.json|sponge $DATA/config/genesis.json +jq '.app_state.evm.params.chain_config.merge_netsplit_block = null' $DATA/config/genesis.json|sponge $DATA/config/genesis.json +jq '.app_state.evm.params.chain_config.shanghai_block = null' $DATA/config/genesis.json|sponge $DATA/config/genesis.json +jq '.app_state.evm.params.chain_config.cancun_block = null' $DATA/config/genesis.json|sponge $DATA/config/genesis.json # Add earn vault jq '.app_state.earn.params.allowed_vaults = [ diff --git a/go.mod b/go.mod index 1003ce23..c295f40e 100644 --- a/go.mod +++ b/go.mod @@ -1,111 +1,145 @@ module github.com/kava-labs/kava -go 1.18 +go 1.19 require ( + cosmossdk.io/math v1.0.0-beta.6.0.20230216172121-959ce49135e4 github.com/cenkalti/backoff/v4 v4.1.3 - github.com/cosmos/cosmos-proto v1.0.0-alpha6 - github.com/cosmos/cosmos-sdk v0.45.10 + github.com/cosmos/cosmos-proto v1.0.0-beta.1 + github.com/cosmos/cosmos-sdk v0.46.11 github.com/cosmos/go-bip39 v1.0.0 - github.com/cosmos/ibc-go/v3 v3.4.0 - github.com/ethereum/go-ethereum v1.10.16 + github.com/cosmos/ibc-go/v6 v6.1.0 + github.com/ethereum/go-ethereum v1.10.26 + github.com/evmos/ethermint v0.21.0 github.com/gogo/protobuf v1.3.3 - github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.2 - github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/spf13/cast v1.5.0 - github.com/spf13/cobra v1.6.0 - github.com/stretchr/testify v1.8.0 + github.com/spf13/cobra v1.6.1 + github.com/stretchr/testify v1.8.1 github.com/subosito/gotenv v1.4.1 - github.com/tendermint/tendermint v0.34.24 + github.com/tendermint/tendermint v0.34.27 github.com/tendermint/tm-db v0.6.7 - github.com/tharsis/ethermint v0.14.0 - google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a - google.golang.org/grpc v1.50.1 - google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8 + google.golang.org/genproto v0.0.0-20230202175211-008b39050e57 + google.golang.org/grpc v1.53.0 + google.golang.org/protobuf v1.28.2-0.20230208135220-49eaa78c6c9c sigs.k8s.io/yaml v1.3.0 ) require ( - filippo.io/edwards25519 v1.0.0-beta.2 // indirect - github.com/99designs/keyring v1.1.6 // indirect + cloud.google.com/go v0.107.0 // indirect + cloud.google.com/go/compute v1.15.1 // indirect + cloud.google.com/go/compute/metadata v0.2.3 // indirect + cloud.google.com/go/iam v0.8.0 // indirect + cloud.google.com/go/storage v1.27.0 // indirect + cosmossdk.io/errors v1.0.0-beta.7 // indirect + filippo.io/edwards25519 v1.0.0-rc.1 // indirect + github.com/99designs/keyring v1.2.1 // indirect github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect github.com/StackExchange/wmi v1.2.1 // indirect github.com/VictoriaMetrics/fastcache v1.6.0 // indirect github.com/Workiva/go-datastructures v1.0.53 // indirect github.com/allegro/bigcache v1.2.1 // indirect - github.com/armon/go-metrics v0.4.0 // indirect + github.com/armon/go-metrics v0.4.1 // indirect + github.com/aws/aws-sdk-go v1.40.45 // indirect github.com/beorn7/perks v1.0.1 // indirect + github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.1.0 // indirect github.com/btcsuite/btcd v0.22.1 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 // indirect github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect - github.com/coinbase/rosetta-sdk-go v0.7.0 // indirect - github.com/confio/ics23/go v0.7.0 // indirect - github.com/cosmos/btcutil v1.0.4 // indirect - github.com/cosmos/iavl v0.19.4 // indirect - github.com/cosmos/ledger-cosmos-go v0.11.1 // indirect - github.com/cosmos/ledger-go v0.9.2 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect + github.com/cockroachdb/apd/v2 v2.0.2 // indirect + github.com/coinbase/rosetta-sdk-go v0.7.9 // indirect + github.com/cometbft/cometbft-db v0.7.0 // indirect + github.com/confio/ics23/go v0.9.0 // indirect + github.com/cosmos/btcutil v1.0.5 // indirect + github.com/cosmos/gogoproto v1.4.6 // indirect + github.com/cosmos/iavl v0.19.5 // indirect + github.com/cosmos/ledger-cosmos-go v0.12.2 // indirect github.com/creachadair/taskgroup v0.3.2 // indirect - github.com/danieljoos/wincred v1.0.2 // indirect + github.com/danieljoos/wincred v1.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/deckarep/golang-set v1.8.0 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect + github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/badger/v3 v3.2103.2 // indirect github.com/dgraph-io/ristretto v0.1.0 // indirect + github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect + github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91 // indirect + github.com/dop251/goja v0.0.0-20220405120441-9037c2b61cbf // indirect github.com/dustin/go-humanize v1.0.0 // indirect - github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b // indirect + github.com/dvsekhvalnov/jose2go v1.5.0 // indirect github.com/edsrzf/mmap-go v1.0.0 // indirect github.com/felixge/httpsnoop v1.0.1 // indirect - github.com/fsnotify/fsnotify v1.5.4 // indirect + github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect + github.com/gin-gonic/gin v1.8.1 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect - github.com/go-ole/go-ole v1.2.5 // indirect + github.com/go-ole/go-ole v1.2.6 // indirect + github.com/go-playground/validator/v10 v10.11.1 // indirect + github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect github.com/go-stack/stack v1.8.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/gateway v1.1.0 // indirect - github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect + github.com/golang/glog v1.0.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/snappy v0.0.4 // indirect - github.com/google/btree v1.0.1 // indirect + github.com/google/btree v1.1.2 // indirect github.com/google/flatbuffers v1.12.1 // indirect + github.com/google/go-cmp v0.5.9 // indirect github.com/google/orderedcode v0.0.1 // indirect github.com/google/uuid v1.3.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.2.0 // indirect + github.com/googleapis/gax-go/v2 v2.7.0 // indirect github.com/gorilla/handlers v1.5.1 // indirect + github.com/gorilla/mux v1.8.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/gtank/merlin v0.1.1 // indirect github.com/gtank/ristretto255 v0.1.2 // indirect + github.com/hashicorp/go-cleanhttp v0.5.2 // indirect + github.com/hashicorp/go-getter v1.6.1 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect + github.com/hashicorp/go-safetemp v1.0.0 // indirect + github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87 // indirect + github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect - github.com/holiman/uint256 v1.2.0 // indirect - github.com/huin/goupnp v1.0.2 // indirect + github.com/holiman/uint256 v1.2.1 // indirect + github.com/huin/goupnp v1.0.3 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.0.1 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d // indirect - github.com/klauspost/compress v1.15.11 // indirect - github.com/lib/pq v1.10.6 // indirect + github.com/klauspost/compress v1.15.15 // indirect + github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.7.1 // indirect + github.com/linxGnu/grocksdb v1.7.14 // indirect github.com/magiconair/properties v1.8.6 // indirect + github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.16 // indirect + github.com/mattn/go-isatty v0.0.17 // indirect github.com/mattn/go-runewidth v0.0.9 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect github.com/minio/highwayhash v1.0.2 // indirect + github.com/mitchellh/go-homedir v1.1.0 // indirect + github.com/mitchellh/go-testing-interface v1.0.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mtibben/percent v0.2.1 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/pelletier/go-toml v1.9.5 // indirect @@ -113,45 +147,53 @@ require ( github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.12.2 // indirect - github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/common v0.34.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect + github.com/prometheus/client_golang v1.14.0 // indirect + github.com/prometheus/client_model v0.3.0 // indirect + github.com/prometheus/common v0.40.0 // indirect + github.com/prometheus/procfs v0.9.0 // indirect github.com/prometheus/tsdb v0.7.1 // indirect github.com/rakyll/statik v0.1.7 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/regen-network/cosmos-proto v0.3.1 // indirect github.com/rjeczalik/notify v0.9.1 // indirect - github.com/rs/cors v1.8.2 // indirect - github.com/rs/zerolog v1.27.0 // indirect + github.com/rogpeppe/go-internal v1.9.0 // indirect + github.com/rs/cors v1.8.3 // indirect + github.com/rs/zerolog v1.29.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect - github.com/spf13/afero v1.8.2 // indirect + github.com/spf13/afero v1.9.2 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.13.0 // indirect + github.com/spf13/viper v1.14.0 // indirect github.com/status-im/keycard-go v0.0.0-20200402102358-957c09536969 // indirect - github.com/stretchr/objx v0.4.0 // indirect - github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect - github.com/tendermint/btcd v0.1.1 // indirect - github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 // indirect + github.com/stretchr/objx v0.5.0 // indirect + github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect + github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect github.com/tendermint/go-amino v0.16.0 // indirect - github.com/tklauser/go-sysconf v0.3.7 // indirect - github.com/tklauser/numcpus v0.2.3 // indirect + github.com/tidwall/btree v1.5.0 // indirect + github.com/tklauser/go-sysconf v0.3.10 // indirect + github.com/tklauser/numcpus v0.4.0 // indirect github.com/tyler-smith/go-bip39 v1.1.0 // indirect - github.com/zondax/hid v0.9.0 // indirect + github.com/ugorji/go/codec v1.2.7 // indirect + github.com/ulikunitz/xz v0.5.8 // indirect + github.com/zondax/hid v0.9.1 // indirect + github.com/zondax/ledger-go v0.14.1 // indirect go.etcd.io/bbolt v1.3.6 // indirect - go.opencensus.io v0.23.0 // indirect - golang.org/x/crypto v0.1.0 // indirect - golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect - golang.org/x/net v0.1.0 // indirect - golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0 // indirect - golang.org/x/sys v0.1.0 // indirect - golang.org/x/term v0.1.0 // indirect - golang.org/x/text v0.4.0 // indirect + go.opencensus.io v0.24.0 // indirect + golang.org/x/crypto v0.6.0 // indirect + golang.org/x/exp v0.0.0-20230213192124-5e25df0256eb // indirect + golang.org/x/net v0.7.0 // indirect + golang.org/x/oauth2 v0.4.0 // indirect + golang.org/x/sync v0.1.0 // indirect + golang.org/x/sys v0.5.0 // indirect + golang.org/x/term v0.5.0 // indirect + golang.org/x/text v0.7.0 // indirect + golang.org/x/time v0.0.0-20220922220347-f3bd1da661af // indirect + golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect + google.golang.org/api v0.103.0 // indirect + google.golang.org/appengine v1.6.7 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect - gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect nhooyr.io/websocket v1.8.6 // indirect @@ -163,15 +205,17 @@ replace ( // Required replace for dragonberry security patch github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0 // Use cosmos-sdk fork with backported fix for unsafe-reset-all, staking transfer events, and custom tally handler support - github.com/cosmos/cosmos-sdk => github.com/kava-labs/cosmos-sdk v0.45.9-kava.4 + github.com/cosmos/cosmos-sdk => github.com/kava-labs/cosmos-sdk v0.46.11-kava.1 + // Use ethermint fork that respects min-gas-price with NoBaseFee true and london enabled, and includes eip712 support + github.com/evmos/ethermint => github.com/kava-labs/ethermint v0.21.0-kava-v22 // See https://github.com/cosmos/cosmos-sdk/pull/10401, https://github.com/cosmos/cosmos-sdk/commit/0592ba6158cd0bf49d894be1cef4faeec59e8320 github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.7.0 // Use the cosmos modified protobufs github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 + // Downgraded to avoid bugs in following commits which causes "version does not exist" errors + github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 + // Use cometbft fork of tendermint + github.com/tendermint/tendermint => github.com/cometbft/cometbft v0.34.27 // Use rocksdb 7.1.2 github.com/tendermint/tm-db => github.com/kava-labs/tm-db v0.6.7-kava.1 - // Use ethermint fork that respects min-gas-price with NoBaseFee true and london enabled, and includes eip712 support - github.com/tharsis/ethermint => github.com/kava-labs/ethermint v0.14.0-kava-v20.1 - // Make sure that we use grpc compatible with cosmos - google.golang.org/grpc => google.golang.org/grpc v1.33.2 ) diff --git a/go.sum b/go.sum index 7ad6a249..86657887 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,4 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= @@ -18,6 +19,8 @@ cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHOb cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= +cloud.google.com/go v0.107.0 h1:qkj22L7bgkl6vIeZDlOY2po43Mx/TIa2Wsa7VR+PEww= +cloud.google.com/go v0.107.0/go.mod h1:wpc2eNrD7hXUTy8EKS10jkxpZBjASrORK7goS+3YX2I= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -25,8 +28,15 @@ cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUM cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= +cloud.google.com/go/compute v1.15.1 h1:7UGq3QknM33pw5xATlpzeoomNxsacIVvTqTTvbfajmE= +cloud.google.com/go/compute v1.15.1/go.mod h1:bjjoF/NtFUrkD/urWfdHaKuOPDR5nWIs63rR+SXhcpA= +cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= +cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/iam v0.8.0 h1:E2osAkZzxI/+8pZcxVLcDtAQx/u+hZXVryUaYQ5O0Kk= +cloud.google.com/go/iam v0.8.0/go.mod h1:lga0/y3iH6CX7sYqypWJ33hf7kkfXJag67naqGESjkE= +cloud.google.com/go/longrunning v0.3.0 h1:NjljC+FYPV3uh5/OwWT6pVU+doBqMg2x/rZlE+CamDs= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -37,32 +47,29 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= +cloud.google.com/go/storage v1.27.0 h1:YOO045NZI9RKfCj1c5A/ZtuuENUc8OAW+gHdGnDgyMQ= +cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= +cosmossdk.io/errors v1.0.0-beta.7 h1:gypHW76pTQGVnHKo6QBkb4yFOJjC+sUGRc5Al3Odj1w= +cosmossdk.io/errors v1.0.0-beta.7/go.mod h1:mz6FQMJRku4bY7aqS/Gwfcmr/ue91roMEKAmDUDpBfE= +cosmossdk.io/math v1.0.0-beta.6.0.20230216172121-959ce49135e4 h1:/jnzJ9zFsL7qkV8LCQ1JH3dYHh2EsKZ3k8Mr6AqqiOA= +cosmossdk.io/math v1.0.0-beta.6.0.20230216172121-959ce49135e4/go.mod h1:gUVtWwIzfSXqcOT+lBVz2jyjfua8DoBdzRsIyaUAT/8= 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/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= +filippo.io/edwards25519 v1.0.0-rc.1 h1:m0VOOB23frXZvAOK44usCgLWvtsxIoMCTBGJZlpmGfU= +filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= +git.sr.ht/~sircmpwn/getopt v0.0.0-20191230200459-23622cc906b3/go.mod h1:wMEGFFFNuPos7vHmWXfszqImLppbc0wEhh6JBfJIUgw= +git.sr.ht/~sircmpwn/go-bare v0.0.0-20210406120253-ab86bc2846d9/go.mod h1:BVJwbDfVjCjoFiKrhkei6NdGcZYpkDkdyCdg1ukytRA= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM= +github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0/go.mod h1:tPaiy8S5bQ+S5sOiDlINkp7+Ef339+Nz5L5XO+cnOHo= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= -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/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= -github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= +github.com/DataDog/zstd v1.5.0/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= @@ -73,7 +80,6 @@ github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMx github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= -github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8= github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= @@ -98,17 +104,18 @@ github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kd github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= 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.4.0 h1:yCQqn7dwca4ITXb+CbubHmedzaQYHhNhrEXLYUeEe8Q= -github.com/armon/go-metrics v0.4.0/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= +github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= +github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= 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.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.40.45 h1:QN1nsY27ssD/JmW4s83qmSb+uL6DG4GmCDzjmJB4xUI= +github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= github.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y= @@ -123,21 +130,25 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= +github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= -github.com/btcsuite/btcd v0.0.0-20171128150713-2e60448ffcc6/go.mod h1:Dmm/EzmjnCiweXmzRIAiUWCInVmPgjkzgv5k4tVyXiQ= -github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d/go.mod h1:d3C0AkH6BRcvO8T0UEPu53cnw4IbV63x1bEjildYhO0= github.com/btcsuite/btcd v0.0.0-20190315201642-aa6e0f35703c/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= -github.com/btcsuite/btcd v0.21.0-beta/go.mod h1:ZSWyehm27aAuS9bvkATT+Xte3hjHZ+MRgMY/8NJ7K94= +github.com/btcsuite/btcd v0.21.0-beta.0.20201114000516-e9c7a5ac6401/go.mod h1:Sv4JPQ3/M+teHz9Bo5jBpkNcP0x6r7rdihlNL/7tTAs= github.com/btcsuite/btcd v0.22.1 h1:CnwP9LM/M9xuRrGSCGeMVs9iv09uMqwsVX7EeIpgV2c= github.com/btcsuite/btcd v0.22.1/go.mod h1:wqgTSL29+50LRkmOVknEdmt8ZojIzhuWvgu/iptuN7Y= +github.com/btcsuite/btcd/btcec/v2 v2.1.2/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= +github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= +github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= +github.com/btcsuite/btcd/btcutil v1.1.2 h1:XLMbX8JQEiwMcYft2EGi8zPUkoa0abKIU6/BJSRsjzQ= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= -github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20190207003914-4c204d697803/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= @@ -150,6 +161,7 @@ github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= @@ -163,23 +175,38 @@ github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW 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/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= +github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= 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/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/cloudflare-go v0.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3hQ7C/YWzIGLeu5c304= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= +github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= 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.7.0 h1:lmTO/JEpCvZgpbkOITL95rA80CPKb5CtMzLaqF2mCNg= -github.com/coinbase/rosetta-sdk-go v0.7.0/go.mod h1:7nD3oBPIiHqhRprqvMgPoGxe/nyq3yftRmpsy29coWE= +github.com/coinbase/kryptology v1.8.0/go.mod h1:RYXOAPdzOGUe3qlSFkMGn58i3xUA8hmxYHksuq+8ciI= +github.com/coinbase/rosetta-sdk-go v0.7.9 h1:lqllBjMnazTjIqYrOGv8h8jxjg9+hJazIGZr9ZvoCcA= +github.com/coinbase/rosetta-sdk-go v0.7.9/go.mod h1:0/knutI7XGVqXmmH4OQD8OckFrbQ8yMsUZTG7FXCR2M= +github.com/cometbft/cometbft v0.34.27 h1:ri6BvmwjWR0gurYjywcBqRe4bbwc3QVs9KRcCzgh/J0= +github.com/cometbft/cometbft v0.34.27/go.mod h1:BcCbhKv7ieM0KEddnYXvQZR+pZykTKReJJYf7YC7qhw= +github.com/cometbft/cometbft-db v0.7.0 h1:uBjbrBx4QzU0zOEnU8KxoDl18dMNgDh+zZRUE0ucsbo= +github.com/cometbft/cometbft-db v0.7.0/go.mod h1:yiKJIm2WKrt6x8Cyxtq9YTEcIMPcEe4XPxhgX59Fzf0= github.com/consensys/bavard v0.1.8-0.20210406032232-f3452dc9b572/go.mod h1:Bpd0/3mZuaj6Sj+PqrmIquiOKy397AKGThQPaGzNXAQ= +github.com/consensys/bavard v0.1.8-0.20210915155054-088da2f7f54a/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1:815PAHg3wvysy0SyIqanF8gZ0Y1wjk/hrDHD/iT88+Q= +github.com/consensys/gnark-crypto v0.5.3/go.mod h1:hOdPlWQV1gDLp7faZVeg8Y0iEPFaOUnCc4XeCCk96p0= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= @@ -187,49 +214,57 @@ github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cosmos/btcutil v1.0.4 h1:n7C2ngKXo7UC9gNyMNLbzqz7Asuf+7Qv4gnX/rOdQ44= -github.com/cosmos/btcutil v1.0.4/go.mod h1:Ffqc8Hn6TJUdDgHBwIZLtrLQC1KdJ9jGJl/TvgUaxbU= -github.com/cosmos/cosmos-proto v1.0.0-alpha6 h1:N2BvV2AyzGAXCJnvlw1pMzEQ+76tj5FDBrkYQYIDCdU= -github.com/cosmos/cosmos-proto v1.0.0-alpha6/go.mod h1:msdDWOvfStHLG+Z2y2SJ0dcqimZ2vc8M1MPnZ4jOF7U= +github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= +github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= +github.com/cosmos/cosmos-proto v1.0.0-beta.1 h1:iDL5qh++NoXxG8hSy93FdYJut4XfgbShIocllGaXx/0= +github.com/cosmos/cosmos-proto v1.0.0-beta.1/go.mod h1:8k2GNZghi5sDRFw/scPL8gMSowT1vDA+5ouxL8GjaUE= github.com/cosmos/cosmos-sdk/ics23/go v0.8.0 h1:iKclrn3YEOwk4jQHT2ulgzuXyxmzmPczUalMwW4XH9k= github.com/cosmos/cosmos-sdk/ics23/go v0.8.0/go.mod h1:2a4dBq88TUoqoWAU5eu0lGvpFP3wWDPgdHPargtyw30= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= -github.com/cosmos/iavl v0.19.4 h1:t82sN+Y0WeqxDLJRSpNd8YFX5URIrT+p8n6oJbJ2Dok= -github.com/cosmos/iavl v0.19.4/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw= -github.com/cosmos/ibc-go/v3 v3.4.0 h1:ha3cqEG36pqMWqA1D+kxDWBTZXpeFMd/aZIQF7I0xro= -github.com/cosmos/ibc-go/v3 v3.4.0/go.mod h1:VwB/vWu4ysT5DN2aF78d17LYmx3omSAdq6gpKvM7XRA= +github.com/cosmos/gogoproto v1.4.6 h1:Ee7z15dWJaGlgM2rWrK8N2IX7PQcuccu8oG68jp5RL4= +github.com/cosmos/gogoproto v1.4.6/go.mod h1:VS/ASYmPgv6zkPKLjR9EB91lwbLHOzaGCirmKKhncfI= +github.com/cosmos/iavl v0.19.5 h1:rGA3hOrgNxgRM5wYcSCxgQBap7fW82WZgY78V9po/iY= +github.com/cosmos/iavl v0.19.5/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw= +github.com/cosmos/ibc-go/v6 v6.1.0 h1:o7oXws2vKkKfOFzJI+oNylRn44PCNt5wzHd/zKQKbvQ= +github.com/cosmos/ibc-go/v6 v6.1.0/go.mod h1:CY3zh2HLfetRiW8LY6kVHMATe90Wj/UOoY8T6cuB0is= github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76 h1:DdzS1m6o/pCqeZ8VOAit/gyATedRgjvkVI+UCrLpyuU= github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76/go.mod h1:0mkLWIoZuQ7uBoospo5Q9zIpqq6rYCPJDSUdeCJvPM8= -github.com/cosmos/ledger-cosmos-go v0.11.1 h1:9JIYsGnXP613pb2vPjFeMMjBI5lEDsEaF6oYorTy6J4= -github.com/cosmos/ledger-cosmos-go v0.11.1/go.mod h1:J8//BsAGTo3OC/vDLjMRFLW6q0WAaXvHnVc7ZmE8iUY= -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/cosmos/ledger-cosmos-go v0.12.2 h1:/XYaBlE2BJxtvpkHiBm97gFGSGmYGKunKyF3nNqAXZA= +github.com/cosmos/ledger-cosmos-go v0.12.2/go.mod h1:ZcqYgnfNJ6lAXe4HPtWgarNEY+B74i+2/8MhZw4ziiI= +github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creachadair/taskgroup v0.3.2 h1:zlfutDS+5XG40AOxcHDSThxKzns8Tnr9jnr6VqkYlkM= github.com/creachadair/taskgroup v0.3.2/go.mod h1:wieWwecHVzsidg2CsUnFinW1faVN4+kq+TDlRJQ0Wbk= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= -github.com/danieljoos/wincred v1.0.2 h1:zf4bhty2iLuwgjgpraD2E9UbvO+fe54XXGJbOwe23fU= github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= +github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= +github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4= github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= +github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= +github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw= 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.2/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= +github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= +github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= github.com/dgraph-io/badger/v3 v3.2103.2 h1:dpyM5eCJAtQCBcMCZcT4UBZchuTJgCywerHHgmxfxM8= github.com/dgraph-io/badger/v3 v3.2103.2/go.mod h1:RHo4/GmYcKKh5Lxu63wLEMHJ70Pac2JqZRYGhlyAo2M= github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= @@ -242,38 +277,46 @@ 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/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91 h1:Izz0+t1Z5nI16/II7vuEo/nHjodOg0p7+OiDpjX5t1E= github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= +github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= +github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= -github.com/dop251/goja v0.0.0-20200721192441-a695b0cdd498/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= github.com/dop251/goja v0.0.0-20211011172007-d99e4b8cbf48/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= +github.com/dop251/goja v0.0.0-20220405120441-9037c2b61cbf h1:Yt+4K30SdjOkRoRRm3vYNQgR+/ZIy0RmeUDZo7Y8zeQ= +github.com/dop251/goja v0.0.0-20220405120441-9037c2b61cbf/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= 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/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= +github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= 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/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= -github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/ethereum/go-ethereum v1.9.25/go.mod h1:vMkFiYLHI4tgPw4k2j4MHKoovchFE8plZ0M9VMk4/oM= -github.com/ethereum/go-ethereum v1.10.16 h1:3oPrumn0bCW/idjcxMn5YYVCdK7VzJYIvwGZUGLEaoc= -github.com/ethereum/go-ethereum v1.10.16/go.mod h1:Anj6cxczl+AHy63o4X9O8yWNHuN5wMpfb8MAnHkWn7Y= -github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/ethereum/go-ethereum v1.10.17/go.mod h1:Lt5WzjM07XlXc95YzrhosmR4J9Ahd6X2wyEV2SvGhk0= +github.com/ethereum/go-ethereum v1.10.26 h1:i/7d9RBBwiXCEuyduBQzJw/mKmnvzsN14jqBmytw72s= +github.com/ethereum/go-ethereum v1.10.26/go.mod h1:EYFyF19u3ezGLD4RqOkLq+ZCXzYbLoNDdZlMt7kyKFg= +github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= +github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= +github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= 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/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= @@ -283,8 +326,8 @@ github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2 github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= -github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= +github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= @@ -305,8 +348,6 @@ github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= @@ -314,19 +355,24 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= -github.com/go-ole/go-ole v1.2.5 h1:t4MGB5xEDZvXI+0rMjjsfBsD7yAgp/s9ZDkL1JndXwY= github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= 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/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= +github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= -github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= +github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= +github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= -github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= +github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= +github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= +github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= @@ -344,16 +390,21 @@ github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5x github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/gateway v1.1.0 h1:u0SuhL9+Il+UbjM9VIE3ntfRujKbvVpFvNB4HbjeVQ0= github.com/gogo/gateway v1.1.0/go.mod h1:S7rR8FRQyG3QFESeSv4l2WnsyzlCLG0CzBbUUo/mbic= +github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/golang-jwt/jwt/v4 v4.3.0 h1:kHL1vqdqWNfATmA0FNMdmZNMyZI1U6O31X4rlIPoBog= +github.com/golang-jwt/jwt/v4 v4.3.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= +github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= @@ -361,7 +412,6 @@ github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -381,16 +431,14 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.3-0.20201103224600-674baa8c7fc3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= -github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= +github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= +github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/flatbuffers v1.12.1 h1:MVlul7pQNoDzWRLTw5imwYsl+usrS1TXG2H4jg6ImGw= github.com/google/flatbuffers v1.12.1/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= @@ -406,13 +454,16 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= 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 h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1 h1:d8MncMlErDFTwQGBK1xhv026j9kqhvw1Qv9IbWT1VLQ= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -429,11 +480,15 @@ github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm4 github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.5/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.2.0 h1:y8Yozv7SZtlU//QXbezB6QkpuE6jMD2/gfzk4AftXjs= +github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.7.0 h1:IcsPKeInNvYi7eqSaDjiZqDDKu5rsmunY0Y1YupQSSQ= +github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= @@ -444,12 +499,10 @@ github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2z 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.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/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= 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.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= @@ -474,6 +527,10 @@ github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpx github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-getter v1.6.1 h1:NASsgP4q6tL94WH6nJxKWj8As2H/2kop/bB1d8JMyRY= +github.com/hashicorp/go-getter v1.6.1/go.mod h1:IZCrswsZPeWv9IkVnLElzRU/gz/QPi6pZHn4tv6vbwA= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -481,16 +538,20 @@ github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iP github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= +github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= +github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= @@ -499,18 +560,18 @@ 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/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3 h1:aSVUgRRRtOrZOC1fYmY9gV0e9z/Iu+xNVSASWjsuyGU= +github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3/go.mod h1:5PC6ZNPde8bBqU/ewGZig35+UIZtw9Ytxez8/q5ZyFE= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= -github.com/holiman/uint256 v1.1.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= -github.com/holiman/uint256 v1.2.0 h1:gpSYcPLWGv4sG43I2mVLiDZCNDh/EpGjSk8tmtxitHM= github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= +github.com/holiman/uint256 v1.2.1 h1:XRtyuda/zw2l+Bq/38n5XUoEF72aSOu/77Thd9pPp2o= +github.com/holiman/uint256 v1.2.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= 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/goupnp v1.0.2 h1:RfGLP+h3mvisuWEyybxNq5Eft3NWhHLPeUN72kpKZoI= -github.com/huin/goupnp v1.0.2/go.mod h1:0dxJBVBHqTMjIUMkESDTNgOOx/Mw5wYIfyFmdzSamkM= +github.com/huin/goupnp v1.0.3-0.20220313090229-ca81a64b4204/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y= +github.com/huin/goupnp v1.0.3 h1:N8No57ls+MnjlB+JPiCVSOyy/ot7MJTqlo7rn+NYSqQ= +github.com/huin/goupnp v1.0.3/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -520,7 +581,6 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/flux v0.65.1/go.mod h1:J754/zds0vvpfwuq7Gc2wRdVwEodfpCFM7mYlOw2LqY= -github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= github.com/influxdata/influxdb v1.8.3/go.mod h1:JugdFhsvvI8gadxOI6noqNeeBHvWNTbfYGtiAn+2jhI= github.com/influxdata/influxdb-client-go/v2 v2.4.0/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= @@ -532,15 +592,17 @@ github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19y github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE= github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= -github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= 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.12.1-0.20220721211354-060cc04fc18b h1:izTof8BKh/nE1wrKOrloNA5q4odOarjf+Xpe+4qow98= +github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= @@ -552,24 +614,21 @@ github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u 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/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o= 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/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= -github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= github.com/karalabe/usb v0.0.2/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= -github.com/kava-labs/cosmos-sdk v0.45.9-kava.4 h1:nOsUMvY9qWvPyORBSV3k7G7D7Lc5JjzYqZE8ohuxskQ= -github.com/kava-labs/cosmos-sdk v0.45.9-kava.4/go.mod h1:Z5M4TX7PsHNHlF/1XanI2DIpORQ+Q/st7oaeufEjnvU= -github.com/kava-labs/ethermint v0.14.0-kava-v20.1 h1:4ZM/SFPU7RLmioHICs9j+c4hzDZ9Rxb/b+Hs/guAyN4= -github.com/kava-labs/ethermint v0.14.0-kava-v20.1/go.mod h1:+/TXGhi6XwF9B8h2NrYZCKrrv0+pC3RkpM0950lYyJg= +github.com/kava-labs/cosmos-sdk v0.46.11-kava.1 h1:3VRpm4zf/gQgmpRVd1p99/2P8ZecAu2FVAXHru5caIo= +github.com/kava-labs/cosmos-sdk v0.46.11-kava.1/go.mod h1:bG4AkW9bqc8ycrryyKGQEl3YV9BY2wr6HggGq8kvcgM= +github.com/kava-labs/ethermint v0.21.0-kava-v22 h1:/RX0Ho8FwssFrxioMfzB16BItK/F/mpswjmjwAdQZjo= +github.com/kava-labs/ethermint v0.21.0-kava-v22/go.mod h1:SRmFSh3smdYjJ2pLzQ034AKh4dX7VSqEKkgtJr9ppxw= github.com/kava-labs/tm-db v0.6.7-kava.1 h1:7cVYlvWx1yP+gGdaAWcfm6NwMLzf4z6DxXguWn3+O3w= github.com/kava-labs/tm-db v0.6.7-kava.1/go.mod h1:HVZfZzWXuqWseXQVplxsWXK6kLHLkk3kQB6c+nuSZvk= github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d h1:Z+RDyXzjKE0i2sTjZ/b1uxiGtPhFy34Ou/Tk0qwN0kM= @@ -579,10 +638,11 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.11.2/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.15.11 h1:Lcadnb3RKGin4FYM/orgq0qde+nc15E5Cbqg4B9Sx9c= -github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= +github.com/klauspost/compress v1.15.15 h1:EF27CXIuDsYJ6mmvtBRlEuB2UVOqHG1tAXgZ7yIO+lw= +github.com/klauspost/compress v1.15.15/go.mod h1:ZcK2JAFqKOpnBlxcLsJzYfrS9X1akm9fHZNnD9+Vo/4= github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= @@ -591,9 +651,9 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxv 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/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -602,43 +662,45 @@ github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+ github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= -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/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= +github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.10.6 h1:jbk+ZieJ0D7EVGJYpL9QTz7/YW6UHbmdnZWYyK5cdBs= -github.com/lib/pq v1.10.6/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= +github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= 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/linxGnu/grocksdb v1.7.1 h1:KBdzX2OQ6tZcZglsRdBwZmGpwHTEb+VqXR5iLuh72+Q= -github.com/linxGnu/grocksdb v1.7.1/go.mod h1:Puj0cSlfTWTp9UdIBijNtNrudkMXXu4er2g+p+CvlJo= +github.com/linxGnu/grocksdb v1.7.14 h1:8lMZzyWeNP5lI0BIppX05DzmQzXj/Tgu82bgWYtowLY= +github.com/linxGnu/grocksdb v1.7.14/go.mod h1:pY55D0o+r8yUYLq70QmhdudxYvoDb9F+9puf4m3/W+U= github.com/lucasjones/reggen v0.0.0-20180717132126-cdb49ff09d77/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4= +github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= +github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= 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.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -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.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= 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= @@ -647,8 +709,8 @@ github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miguelmota/go-ethereum-hdwallet v0.1.1 h1:zdXGlHao7idpCBjEGTXThVAtMKs+IxAgivZ75xqkWK0= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= @@ -658,14 +720,16 @@ github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= @@ -677,6 +741,7 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= 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= @@ -693,27 +758,27 @@ github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzE github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/neilotoole/errgroup v0.1.5/go.mod h1:Q2nLGf+594h0CLBs/Mbg6qOr7GtqDK7C2S41udRnToE= +github.com/neilotoole/errgroup v0.1.6/go.mod h1:Q2nLGf+594h0CLBs/Mbg6qOr7GtqDK7C2S41udRnToE= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= 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/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo/v2 v2.7.0 h1:/XxtEV3I3Eif/HobnVx9YmJgk8ENdRsuUmM+fLCFNow= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.24.2 h1:J/tulyYK6JwBldPViHJReihxxZ+22FHs0piGjQAvoUE= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= @@ -728,13 +793,11 @@ github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJ 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/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= -github.com/otiai10/copy v1.6.0 h1:IinKAryFFuPONZ7cm6T6E2QX/vcJwSnlaA5lfoaXIiQ= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= 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/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE= -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.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= @@ -750,6 +813,7 @@ github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -766,17 +830,16 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.12.2 h1:51L9cDoUHVrXx4zWYlcLQIZ+d+VXHgqnYKkIuq4g/34= -github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= +github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= 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= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= +github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -785,21 +848,16 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2 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.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.34.0 h1:RBmGO9d/FVjqHT0yUGQwBJhkwKV+wPCn7KGpvfab0uE= -github.com/prometheus/common v0.34.0/go.mod h1:gB3sOl7P0TvJabZpLY5uQMpUqRCPPCyRLCZYc7JZTNE= +github.com/prometheus/common v0.40.0 h1:Afz7EVRqGg2Mqqf4JuF9vdvp1pi220m55Pi9T2JnO4Q= +github.com/prometheus/common v0.40.0/go.mod h1:L65ZJPSmfn/UBWLQIHV7dBrKFidB/wPlF1y5TlSt9OE= 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.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= +github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= @@ -817,17 +875,20 @@ github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRr 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/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= -github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U= -github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= -github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.27.0 h1:1T7qCieN22GVc8S4Q2yuexzBb1EqjbgjSH9RohbMjKs= -github.com/rs/zerolog v1.27.0/go.mod h1:7frBqO0oezxmnO7GF86FY++uy8I0Tk/If5ni1G9Qc0U= +github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= +github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.29.0 h1:Zes4hju04hjbvkVkOhdl2HpZa+0PmVwigmo8XoORE5w= +github.com/rs/zerolog v1.29.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= +github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= 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/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= @@ -838,7 +899,6 @@ github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KR github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= @@ -855,15 +915,15 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasO github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= -github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= +github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= +github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.6.0 h1:42a0n6jwCot1pUmomAp4T7DeMD+20LFv4Q54pxLf2LI= -github.com/spf13/cobra v1.6.0/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= +github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= 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= @@ -872,21 +932,20 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.13.0 h1:BWSJ/M+f+3nmdz9bxB+bWX28kkALN2ok11D0rSo8EJU= -github.com/spf13/viper v1.13.0/go.mod h1:Icm2xNL3/8uyh/wFuB1jI7TiTNKp8632Nwegu+zgdYw= +github.com/spf13/viper v1.14.0 h1:Rg7d3Lo706X9tHsJMUjdiwMpHB7W8WnSVOssIY+JElU= +github.com/spf13/viper v1.14.0/go.mod h1:WT//axPky3FdvXHzGw33dNdXXXfFQqmEalje+egj8As= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= github.com/status-im/keycard-go v0.0.0-20200402102358-957c09536969 h1:Oo2KZNP70KE0+IUJSidPj/BFS/RXNHmKIJOdckzml2E= github.com/status-im/keycard-go v0.0.0-20200402102358-957c09536969/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= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -895,33 +954,32 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= -github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= -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/crypto v0.0.0-20191022145703-50d29ede1e15 h1:hqAk8riJvK4RMWx1aInLzndwxKalgi5rTqgfXxOxbEI= -github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= +github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= +github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tendermint/tendermint v0.34.24 h1:879MKKJWYYPJEMMKME+DWUTY4V9f/FBpnZDI82ky+4k= -github.com/tendermint/tendermint v0.34.24/go.mod h1:rXVrl4OYzmIa1I91av3iLv2HS0fGSiucyW9J4aMTpKI= -github.com/tidwall/gjson v1.6.7/go.mod h1:zeFuBCIqD4sN/gmqBzZ4j7Jd6UcA2Fc56x7QFsv+8fI= -github.com/tidwall/match v1.0.3/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= -github.com/tidwall/pretty v1.0.2/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tidwall/sjson v1.1.4/go.mod h1:wXpKXu8CtDjKAZ+3DrKY5ROCorDFahq8l0tey/Lx1fg= +github.com/tidwall/btree v1.5.0 h1:iV0yVY/frd7r6qGBXfEYs7DH0gTDgrKTrDjS7xt/IyQ= +github.com/tidwall/btree v1.5.0/go.mod h1:LGm8L/DZjPLmeWGjv5kFrY8dL4uVhMmzmmLYmsObdKE= +github.com/tidwall/gjson v1.12.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/gjson v1.14.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/sjson v1.2.4/go.mod h1:098SZ494YoMWPmMO6ct4dcFnqxwj9r/gF0Etp19pSNM= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= -github.com/tklauser/go-sysconf v0.3.7 h1:HT7h4+536gjqeq1ZIJPgOl1rg1XFatQGVZWp7Py53eg= -github.com/tklauser/go-sysconf v0.3.7/go.mod h1:JZIdXh4RmBvZDBZ41ld2bGxRV3n4daiiqA3skYhAoQ4= +github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw= +github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk= github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZFu0T9wgjM= -github.com/tklauser/numcpus v0.2.3 h1:nQ0QYpiritP6ViFhrKYsiv6VVxOpum2Gks5GhnJbS/8= -github.com/tklauser/numcpus v0.2.3/go.mod h1:vpEPS/JC+oZGGQ/My/vJnNsvMDQL6PwOqt8dsCw5j+E= +github.com/tklauser/numcpus v0.4.0 h1:E53Dm1HjH1/R2/aoCtXtPgzmElmn51aOkhCFSuZq//o= +github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= @@ -929,32 +987,39 @@ github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:s github.com/tyler-smith/go-bip39 v1.0.2/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= -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 v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= 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/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= +github.com/ulikunitz/xz v0.5.8 h1:ERv8V6GKqVi23rgu5cj9pVfVzJbOqAY2Ntl88O6c2nQ= +github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= +github.com/urfave/cli/v2 v2.10.2 h1:x3p8awjp/2arX+Nl/G2040AZpOCHS/eMJJ1/a+mye4Y= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/vmihailenco/msgpack/v5 v5.1.4/go.mod h1:C5gboKD0TJPqWDTVTtrQNfRbiBwHZGo8UTqP/9/XvLI= -github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= +github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= +github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= -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/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= github.com/ybbus/jsonrpc v2.1.2+incompatible/go.mod h1:XJrh1eMSzdIYFbM08flv0wp5G35eRniyeGut1z+LSiE= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 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/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= -github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= +github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.14.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c= +github.com/zondax/ledger-go v0.14.1/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= @@ -967,8 +1032,8 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -998,16 +1063,17 @@ golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= -golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc= +golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/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-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= @@ -1016,11 +1082,12 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= +golang.org/x/exp v0.0.0-20230213192124-5e25df0256eb h1:PaBZQdo+iSDyHT053FjUCgZQ/9uqVwPOcl7KSWhKn6w= +golang.org/x/exp v0.0.0-20230213192124-5e25df0256eb/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -1033,22 +1100,20 @@ golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPI 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/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0 h1:b9gGHsz9/HhJ3HF5DHQytPpuwocVTChQJK3AvoLRD5I= +golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= 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-20180826012351-8a410e7b638d/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= @@ -1083,7 +1148,7 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200707034311-ab3426394381/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-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= @@ -1093,12 +1158,13 @@ golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1108,8 +1174,8 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.4.0 h1:NF0gk8LVPg1Ml7SSbGyySuoxdsXitj7TvgvuRxIMc/M= +golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1121,9 +1187,10 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ 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/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0 h1:cu5kTvlzcw1Q5S9f5ip1/cpiB4nXvw1XYzFPGgzLUOY= -golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sync v0.1.0/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-20180830151530-49385e6e1522/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= golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1176,10 +1243,8 @@ golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/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-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1195,23 +1260,24 @@ golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220517195934-5e4e11fc645e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.1.0 h1:g6Z6vPFA9dYBAF7DWcH6sCcOntplXsDKcliusYijMlw= -golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1221,17 +1287,20 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= +golang.org/x/time v0.0.0-20220922220347-f3bd1da661af h1:Yx9k8YCG3dvF87UAn2tu2HQLf2dt/eR1bXxpLMWeH+Y= +golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -1258,7 +1327,6 @@ golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200108203644-89082a384178/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-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -1287,13 +1355,14 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.2.0 h1:G6AHpWxTMGY1KyEYoAQ5WTtIekUUvDNjan3ugu60JvE= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df h1:5Pf6pFKu98ODmgnpvkJ3kFUOQGGLIzLIkbzUHp47618= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= @@ -1320,12 +1389,16 @@ google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz513 google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.103.0 h1:9yuVqlu2JCvcLg9p8S3fcFLZij8EPSyvODIY1rkMizQ= +google.golang.org/api v0.103.0/go.mod h1:hGtW6nK1AC+d9si/UBhw8Xli+QMOf6xyNAyJw4qU9w0= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -1371,10 +1444,34 @@ google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a h1:GH6UPn3ixhWcKDhpnEC55S75cerLPdpp3hrhfKYjZgw= -google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= -google.golang.org/grpc v1.33.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o= +google.golang.org/genproto v0.0.0-20230202175211-008b39050e57 h1:vArvWooPH749rNHpBGgVl+U9B9dATjiEhJzcWGlovNs= +google.golang.org/genproto v0.0.0-20230202175211-008b39050e57/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc= +google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1387,16 +1484,17 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/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/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8 h1:KR8+MyP7/qOlV+8Af01LtjL04bu7on42eVsxT4EyBQk= -google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.2-0.20230208135220-49eaa78c6c9c h1:gDe3xeLH/W6iv5d9xQBo6IwJbCdVcZRiV8xuix6FJW8= +google.golang.org/protobuf v1.28.2-0.20230208135220-49eaa78c6c9c/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= @@ -1404,12 +1502,10 @@ gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= 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 h1:a6cXbcDDUkSBlpnkWV1bJ+vv3mOgQEltEJ2rPxroVu0= 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 h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0= 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= @@ -1427,6 +1523,7 @@ gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 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= @@ -1437,11 +1534,12 @@ honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= -pgregory.net/rapid v0.4.7/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU= +pgregory.net/rapid v0.5.3 h1:163N50IHFqr1phZens4FQOdPgfJscR7a562mjQqeo4M= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/migrate/utils/periodic_vesting.go b/migrate/utils/periodic_vesting.go index fca9b4df..5ae6d17e 100644 --- a/migrate/utils/periodic_vesting.go +++ b/migrate/utils/periodic_vesting.go @@ -42,7 +42,7 @@ func ResetPeriodicVestingAccount(vacc *v040vesting.PeriodicVestingAccount, start delegationAdjustment := delegatedVestingCoin.Sub(newDelegatedVestingCoin) if !delegationAdjustment.IsZero() { - vacc.DelegatedVesting = vacc.DelegatedVesting.Sub(sdk.NewCoins(delegationAdjustment)) + vacc.DelegatedVesting = vacc.DelegatedVesting.Sub(delegationAdjustment) vacc.DelegatedFree = vacc.DelegatedFree.Add(delegationAdjustment) } } diff --git a/tests/e2e/e2e_test.go b/tests/e2e/e2e_test.go index 4c534b52..f9a30e39 100644 --- a/tests/e2e/e2e_test.go +++ b/tests/e2e/e2e_test.go @@ -12,10 +12,10 @@ import ( "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - ibctypes "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" - ibcclienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" + ibctypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" + ibcclienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" ethtypes "github.com/ethereum/go-ethereum/core/types" - emtypes "github.com/tharsis/ethermint/types" + emtypes "github.com/evmos/ethermint/types" "github.com/kava-labs/kava/app" "github.com/kava-labs/kava/tests/e2e/testutil" @@ -135,6 +135,7 @@ func (suite *IntegrationTestSuite) TestIbcTransfer() { ibcAcc.SdkAddress.String(), ibcclienttypes.NewHeight(0, 0), // timeout height disabled when 0 uint64(time.Now().Add(30*time.Second).UnixNano()), + "", ) // initial - sent - fee expectedSrcBalance := funds.Sub(fundsToSend).Sub(fee) diff --git a/tests/e2e/testutil/account.go b/tests/e2e/testutil/account.go index 9978df0f..05c2af8c 100644 --- a/tests/e2e/testutil/account.go +++ b/tests/e2e/testutil/account.go @@ -15,9 +15,9 @@ import ( "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" + "github.com/evmos/ethermint/crypto/ethsecp256k1" + emtypes "github.com/evmos/ethermint/types" "github.com/stretchr/testify/require" - "github.com/tharsis/ethermint/crypto/ethsecp256k1" - emtypes "github.com/tharsis/ethermint/types" "github.com/kava-labs/kava/app" "github.com/kava-labs/kava/tests/util" diff --git a/third_party/proto/cosmos/app/module/v1alpha1/module.proto b/third_party/proto/cosmos/app/module/v1alpha1/module.proto new file mode 100644 index 00000000..487e195c --- /dev/null +++ b/third_party/proto/cosmos/app/module/v1alpha1/module.proto @@ -0,0 +1,13 @@ +syntax = "proto3"; + +package cosmos.app.module.v1alpha1; + +import "cosmos/app/v1alpha1/module.proto"; + +// Module is the module config object for the cosmos.app v1 app module. +message Module { + option (cosmos.app.v1alpha1.module) = { + go_import: "github.com/cosmos/cosmos-sdk/app" + use_package: {name: "cosmos.app.v1alpha1"} + }; +} diff --git a/third_party/proto/cosmos/app/v1alpha1/config.proto b/third_party/proto/cosmos/app/v1alpha1/config.proto new file mode 100644 index 00000000..ed775006 --- /dev/null +++ b/third_party/proto/cosmos/app/v1alpha1/config.proto @@ -0,0 +1,36 @@ +syntax = "proto3"; + +package cosmos.app.v1alpha1; + +import "google/protobuf/any.proto"; + +// Config represents the configuration for a Cosmos SDK ABCI app. +// It is intended that all state machine logic including the version of +// baseapp and tx handlers (and possibly even Tendermint) that an app needs +// can be described in a config object. For compatibility, the framework should +// allow a mixture of declarative and imperative app wiring, however, apps +// that strive for the maximum ease of maintainability should be able to describe +// their state machine with a config object alone. +message Config { + // modules are the module configurations for the app. + repeated ModuleConfig modules = 1; +} + +// ModuleConfig is a module configuration for an app. +message ModuleConfig { + // name is the unique name of the module within the app. It should be a name + // that persists between different versions of a module so that modules + // can be smoothly upgraded to new versions. + // + // For example, for the module cosmos.bank.module.v1.Module, we may chose + // to simply name the module "bank" in the app. When we upgrade to + // cosmos.bank.module.v2.Module, the app-specific name "bank" stays the same + // and the framework knows that the v2 module should receive all the same state + // that the v1 module had. Note: modules should provide info on which versions + // they can migrate from in the ModuleDescriptor.can_migration_from field. + string name = 1; + + // config is the config object for the module. Module config messages should + // define a ModuleDescriptor using the cosmos.app.v1alpha1.is_module extension. + google.protobuf.Any config = 2; +} diff --git a/third_party/proto/cosmos/app/v1alpha1/module.proto b/third_party/proto/cosmos/app/v1alpha1/module.proto new file mode 100644 index 00000000..99085717 --- /dev/null +++ b/third_party/proto/cosmos/app/v1alpha1/module.proto @@ -0,0 +1,91 @@ +syntax = "proto3"; + +package cosmos.app.v1alpha1; + +import "google/protobuf/descriptor.proto"; + +extend google.protobuf.MessageOptions { + // module indicates that this proto type is a config object for an app module + // and optionally provides other descriptive information about the module. + // It is recommended that a new module config object and go module is versioned + // for every state machine breaking version of a module. The recommended + // pattern for doing this is to put module config objects in a separate proto + // package from the API they expose. Ex: the cosmos.group.v1 API would be + // exposed by module configs cosmos.group.module.v1, cosmos.group.module.v2, etc. + ModuleDescriptor module = 57193479; +} + +// ModuleDescriptor describes an app module. +message ModuleDescriptor { + // go_import names the package that should be imported by an app to load the + // module in the runtime module registry. It is required to make debugging + // of configuration errors easier for users. + string go_import = 1; + + // use_package refers to a protobuf package that this module + // uses and exposes to the world. In an app, only one module should "use" + // or own a single protobuf package. It is assumed that the module uses + // all of the .proto files in a single package. + repeated PackageReference use_package = 2; + + // can_migrate_from defines which module versions this module can migrate + // state from. The framework will check that one module version is able to + // migrate from a previous module version before attempting to update its + // config. It is assumed that modules can transitively migrate from earlier + // versions. For instance if v3 declares it can migrate from v2, and v2 + // declares it can migrate from v1, the framework knows how to migrate + // from v1 to v3, assuming all 3 module versions are registered at runtime. + repeated MigrateFromInfo can_migrate_from = 3; +} + +// PackageReference is a reference to a protobuf package used by a module. +message PackageReference { + // name is the fully-qualified name of the package. + string name = 1; + + // revision is the optional revision of the package that is being used. + // Protobuf packages used in Cosmos should generally have a major version + // as the last part of the package name, ex. foo.bar.baz.v1. + // The revision of a package can be thought of as the minor version of a + // package which has additional backwards compatible definitions that weren't + // present in a previous version. + // + // A package should indicate its revision with a source code comment + // above the package declaration in one of its files containing the + // text "Revision N" where N is an integer revision. All packages start + // at revision 0 the first time they are released in a module. + // + // When a new version of a module is released and items are added to existing + // .proto files, these definitions should contain comments of the form + // "Since Revision N" where N is an integer revision. + // + // When the module runtime starts up, it will check the pinned proto + // image and panic if there are runtime protobuf definitions that are not + // in the pinned descriptor which do not have + // a "Since Revision N" comment or have a "Since Revision N" comment where + // N is <= to the revision specified here. This indicates that the protobuf + // files have been updated, but the pinned file descriptor hasn't. + // + // If there are items in the pinned file descriptor with a revision + // greater than the value indicated here, this will also cause a panic + // as it may mean that the pinned descriptor for a legacy module has been + // improperly updated or that there is some other versioning discrepancy. + // Runtime protobuf definitions will also be checked for compatibility + // with pinned file descriptors to make sure there are no incompatible changes. + // + // This behavior ensures that: + // * pinned proto images are up-to-date + // * protobuf files are carefully annotated with revision comments which + // are important good client UX + // * protobuf files are changed in backwards and forwards compatible ways + uint32 revision = 2; +} + +// MigrateFromInfo is information on a module version that a newer module +// can migrate from. +message MigrateFromInfo { + + // module is the fully-qualified protobuf name of the module config object + // for the previous module version, ex: "cosmos.group.module.v1.Module". + string module = 1; +} diff --git a/third_party/proto/cosmos/app/v1alpha1/query.proto b/third_party/proto/cosmos/app/v1alpha1/query.proto new file mode 100644 index 00000000..efec9c81 --- /dev/null +++ b/third_party/proto/cosmos/app/v1alpha1/query.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; + +package cosmos.app.v1alpha1; + +import "cosmos/app/v1alpha1/config.proto"; + +// Query is the app module query service. +service Query { + + // Config returns the current app config. + rpc Config(QueryConfigRequest) returns (QueryConfigResponse) {} +} + +// QueryConfigRequest is the Query/Config request type. +message QueryConfigRequest {} + +// QueryConfigRequest is the Query/Config response type. +message QueryConfigResponse { + + // config is the current app config. + Config config = 1; +} diff --git a/third_party/proto/cosmos/auth/v1beta1/auth.proto b/third_party/proto/cosmos/auth/v1beta1/auth.proto index 72e1d9ec..963c6f15 100644 --- a/third_party/proto/cosmos/auth/v1beta1/auth.proto +++ b/third_party/proto/cosmos/auth/v1beta1/auth.proto @@ -17,11 +17,10 @@ message BaseAccount { option (cosmos_proto.implements_interface) = "AccountI"; - string address = 1; - google.protobuf.Any pub_key = 2 - [(gogoproto.jsontag) = "public_key,omitempty", (gogoproto.moretags) = "yaml:\"public_key\""]; - uint64 account_number = 3 [(gogoproto.moretags) = "yaml:\"account_number\""]; - uint64 sequence = 4; + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + google.protobuf.Any pub_key = 2 [(gogoproto.jsontag) = "public_key,omitempty"]; + uint64 account_number = 3; + uint64 sequence = 4; } // ModuleAccount defines an account for modules that holds coins on a pool. @@ -30,7 +29,7 @@ message ModuleAccount { option (gogoproto.goproto_stringer) = false; option (cosmos_proto.implements_interface) = "ModuleAccountI"; - BaseAccount base_account = 1 [(gogoproto.embed) = true, (gogoproto.moretags) = "yaml:\"base_account\""]; + BaseAccount base_account = 1 [(gogoproto.embed) = true]; string name = 2; repeated string permissions = 3; } @@ -40,11 +39,9 @@ message Params { option (gogoproto.equal) = true; option (gogoproto.goproto_stringer) = false; - uint64 max_memo_characters = 1 [(gogoproto.moretags) = "yaml:\"max_memo_characters\""]; - uint64 tx_sig_limit = 2 [(gogoproto.moretags) = "yaml:\"tx_sig_limit\""]; - uint64 tx_size_cost_per_byte = 3 [(gogoproto.moretags) = "yaml:\"tx_size_cost_per_byte\""]; - uint64 sig_verify_cost_ed25519 = 4 - [(gogoproto.customname) = "SigVerifyCostED25519", (gogoproto.moretags) = "yaml:\"sig_verify_cost_ed25519\""]; - uint64 sig_verify_cost_secp256k1 = 5 - [(gogoproto.customname) = "SigVerifyCostSecp256k1", (gogoproto.moretags) = "yaml:\"sig_verify_cost_secp256k1\""]; + uint64 max_memo_characters = 1; + uint64 tx_sig_limit = 2; + uint64 tx_size_cost_per_byte = 3; + uint64 sig_verify_cost_ed25519 = 4 [(gogoproto.customname) = "SigVerifyCostED25519"]; + uint64 sig_verify_cost_secp256k1 = 5 [(gogoproto.customname) = "SigVerifyCostSecp256k1"]; } diff --git a/third_party/proto/cosmos/auth/v1beta1/query.proto b/third_party/proto/cosmos/auth/v1beta1/query.proto index 4d9759ca..1775f128 100644 --- a/third_party/proto/cosmos/auth/v1beta1/query.proto +++ b/third_party/proto/cosmos/auth/v1beta1/query.proto @@ -24,10 +24,50 @@ service Query { option (google.api.http).get = "/cosmos/auth/v1beta1/accounts/{address}"; } + // AccountAddressByID returns account address based on account number. + // + // Since: cosmos-sdk 0.46.2 + rpc AccountAddressByID(QueryAccountAddressByIDRequest) returns (QueryAccountAddressByIDResponse) { + option (google.api.http).get = "/cosmos/auth/v1beta1/address_by_id/{id}"; + } + // Params queries all parameters. rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/cosmos/auth/v1beta1/params"; } + + // ModuleAccounts returns all the existing module accounts. + // + // Since: cosmos-sdk 0.46 + rpc ModuleAccounts(QueryModuleAccountsRequest) returns (QueryModuleAccountsResponse) { + option (google.api.http).get = "/cosmos/auth/v1beta1/module_accounts"; + } + + // ModuleAccountByName returns the module account info by module name + rpc ModuleAccountByName(QueryModuleAccountByNameRequest) returns (QueryModuleAccountByNameResponse) { + option (google.api.http).get = "/cosmos/auth/v1beta1/module_accounts/{name}"; + } + + // Bech32Prefix queries bech32Prefix + // + // Since: cosmos-sdk 0.46 + rpc Bech32Prefix(Bech32PrefixRequest) returns (Bech32PrefixResponse) { + option (google.api.http).get = "/cosmos/auth/v1beta1/bech32"; + } + + // AddressBytesToString converts Account Address bytes to string + // + // Since: cosmos-sdk 0.46 + rpc AddressBytesToString(AddressBytesToStringRequest) returns (AddressBytesToStringResponse) { + option (google.api.http).get = "/cosmos/auth/v1beta1/bech32/{address_bytes}"; + } + + // AddressStringToBytes converts Address string to bytes + // + // Since: cosmos-sdk 0.46 + rpc AddressStringToBytes(AddressStringToBytesRequest) returns (AddressStringToBytesResponse) { + option (google.api.http).get = "/cosmos/auth/v1beta1/bech32/{address_string}"; + } } // QueryAccountsRequest is the request type for the Query/Accounts RPC method. @@ -55,7 +95,7 @@ message QueryAccountRequest { option (gogoproto.goproto_getters) = false; // address defines the address to query for. - string address = 1; + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // QueryAccountResponse is the response type for the Query/Account RPC method. @@ -72,3 +112,82 @@ message QueryParamsResponse { // params defines the parameters of the module. Params params = 1 [(gogoproto.nullable) = false]; } + +// QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method. +// +// Since: cosmos-sdk 0.46 +message QueryModuleAccountsRequest {} + +// QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method. +// +// Since: cosmos-sdk 0.46 +message QueryModuleAccountsResponse { + repeated google.protobuf.Any accounts = 1 [(cosmos_proto.accepts_interface) = "ModuleAccountI"]; +} + +// QueryModuleAccountByNameRequest is the request type for the Query/ModuleAccountByName RPC method. +message QueryModuleAccountByNameRequest { + string name = 1; +} + +// QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method. +message QueryModuleAccountByNameResponse { + google.protobuf.Any account = 1 [(cosmos_proto.accepts_interface) = "ModuleAccountI"]; +} + +// Bech32PrefixRequest is the request type for Bech32Prefix rpc method. +// +// Since: cosmos-sdk 0.46 +message Bech32PrefixRequest {} + +// Bech32PrefixResponse is the response type for Bech32Prefix rpc method. +// +// Since: cosmos-sdk 0.46 +message Bech32PrefixResponse { + string bech32_prefix = 1; +} + +// AddressBytesToStringRequest is the request type for AddressString rpc method. +// +// Since: cosmos-sdk 0.46 +message AddressBytesToStringRequest { + bytes address_bytes = 1; +} + +// AddressBytesToStringResponse is the response type for AddressString rpc method. +// +// Since: cosmos-sdk 0.46 +message AddressBytesToStringResponse { + string address_string = 1; +} + +// AddressStringToBytesRequest is the request type for AccountBytes rpc method. +// +// Since: cosmos-sdk 0.46 +message AddressStringToBytesRequest { + string address_string = 1; +} + +// AddressStringToBytesResponse is the response type for AddressBytes rpc method. +// +// Since: cosmos-sdk 0.46 +message AddressStringToBytesResponse { + bytes address_bytes = 1; +} + +// QueryAccountAddressByIDRequest is the request type for AccountAddressByID rpc method +// +// Since: cosmos-sdk 0.46.2 +message QueryAccountAddressByIDRequest { + // id is the account number of the address to be queried. This field + // should have been an uint64 (like all account numbers), and will be + // updated to uint64 in a future version of the auth query. + int64 id = 1; +} + +// QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method +// +// Since: cosmos-sdk 0.46.2 +message QueryAccountAddressByIDResponse { + string account_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} diff --git a/third_party/proto/cosmos/authz/v1beta1/authz.proto b/third_party/proto/cosmos/authz/v1beta1/authz.proto index 05b1feef..06ce288a 100644 --- a/third_party/proto/cosmos/authz/v1beta1/authz.proto +++ b/third_party/proto/cosmos/authz/v1beta1/authz.proto @@ -22,18 +22,25 @@ message GenericAuthorization { // 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]; + google.protobuf.Any authorization = 1 [(cosmos_proto.accepts_interface) = "Authorization"]; + // time when the grant will expire and will be pruned. If null, then the grant + // doesn't have a time expiration (other conditions in `authorization` + // may apply to invalidate the grant) + google.protobuf.Timestamp expiration = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = true]; } // GrantAuthorization extends a grant with both the addresses of the grantee and granter. // It is used in genesis.proto and query.proto -// -// Since: cosmos-sdk 0.45.2 message GrantAuthorization { - string granter = 1; - string grantee = 2; + string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; google.protobuf.Any authorization = 3 [(cosmos_proto.accepts_interface) = "Authorization"]; - google.protobuf.Timestamp expiration = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + google.protobuf.Timestamp expiration = 4 [(gogoproto.stdtime) = true]; +} + +// GrantQueueItem contains the list of TypeURL of a sdk.Msg. +message GrantQueueItem { + // msg_type_urls contains the list of TypeURL of a sdk.Msg. + repeated string msg_type_urls = 1; } diff --git a/third_party/proto/cosmos/authz/v1beta1/event.proto b/third_party/proto/cosmos/authz/v1beta1/event.proto index 7a3cf7c8..0476649a 100644 --- a/third_party/proto/cosmos/authz/v1beta1/event.proto +++ b/third_party/proto/cosmos/authz/v1beta1/event.proto @@ -2,6 +2,8 @@ syntax = "proto3"; package cosmos.authz.v1beta1; +import "cosmos_proto/cosmos.proto"; + option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; // EventGrant is emitted on Msg/Grant @@ -9,9 +11,9 @@ message EventGrant { // Msg type URL for which an autorization is granted string msg_type_url = 2; // Granter account address - string granter = 3; + string granter = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // Grantee account address - string grantee = 4; + string grantee = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // EventRevoke is emitted on Msg/Revoke @@ -19,7 +21,7 @@ message EventRevoke { // Msg type URL for which an autorization is revoked string msg_type_url = 2; // Granter account address - string granter = 3; + string granter = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // Grantee account address - string grantee = 4; + string grantee = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } diff --git a/third_party/proto/cosmos/authz/v1beta1/query.proto b/third_party/proto/cosmos/authz/v1beta1/query.proto index f668309b..62154ac1 100644 --- a/third_party/proto/cosmos/authz/v1beta1/query.proto +++ b/third_party/proto/cosmos/authz/v1beta1/query.proto @@ -5,6 +5,7 @@ package cosmos.authz.v1beta1; import "google/api/annotations.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; import "cosmos/authz/v1beta1/authz.proto"; +import "cosmos_proto/cosmos.proto"; option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; @@ -17,14 +18,14 @@ service Query { // GranterGrants returns list of `GrantAuthorization`, granted by granter. // - // Since: cosmos-sdk 0.45.2 + // Since: cosmos-sdk 0.46 rpc GranterGrants(QueryGranterGrantsRequest) returns (QueryGranterGrantsResponse) { option (google.api.http).get = "/cosmos/authz/v1beta1/grants/granter/{granter}"; } // GranteeGrants returns a list of `GrantAuthorization` by grantee. // - // Since: cosmos-sdk 0.45.2 + // Since: cosmos-sdk 0.46 rpc GranteeGrants(QueryGranteeGrantsRequest) returns (QueryGranteeGrantsResponse) { option (google.api.http).get = "/cosmos/authz/v1beta1/grants/grantee/{grantee}"; } @@ -32,8 +33,8 @@ service Query { // QueryGrantsRequest is the request type for the Query/Grants RPC method. message QueryGrantsRequest { - string granter = 1; - string grantee = 2; + string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // 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. @@ -50,7 +51,7 @@ message QueryGrantsResponse { // QueryGranterGrantsRequest is the request type for the Query/GranterGrants RPC method. message QueryGranterGrantsRequest { - string granter = 1; + string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // pagination defines an pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; @@ -66,7 +67,7 @@ message QueryGranterGrantsResponse { // QueryGranteeGrantsRequest is the request type for the Query/IssuedGrants RPC method. message QueryGranteeGrantsRequest { - string grantee = 1; + string grantee = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // pagination defines an pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; diff --git a/third_party/proto/cosmos/authz/v1beta1/tx.proto b/third_party/proto/cosmos/authz/v1beta1/tx.proto index 457f0d66..068218ff 100644 --- a/third_party/proto/cosmos/authz/v1beta1/tx.proto +++ b/third_party/proto/cosmos/authz/v1beta1/tx.proto @@ -4,10 +4,9 @@ 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"; +import "cosmos/msg/v1/msg.proto"; option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; option (gogoproto.goproto_getters_all) = false; @@ -33,8 +32,10 @@ service Msg { // MsgGrant is a request type for Grant method. It declares authorization to the grantee // on behalf of the granter with the provided expiration time. message MsgGrant { - string granter = 1; - string grantee = 2; + option (cosmos.msg.v1.signer) = "granter"; + + string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; cosmos.authz.v1beta1.Grant grant = 3 [(gogoproto.nullable) = false]; } @@ -48,7 +49,9 @@ message MsgExecResponse { // authorizations granted to the grantee. Each message should have only // one signer corresponding to the granter of the authorization. message MsgExec { - string grantee = 1; + option (cosmos.msg.v1.signer) = "grantee"; + + string grantee = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // 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. @@ -61,8 +64,10 @@ 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; + option (cosmos.msg.v1.signer) = "granter"; + + string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; string msg_type_url = 3; } diff --git a/third_party/proto/cosmos/bank/v1beta1/bank.proto b/third_party/proto/cosmos/bank/v1beta1/bank.proto index df91008d..7bc9819d 100644 --- a/third_party/proto/cosmos/bank/v1beta1/bank.proto +++ b/third_party/proto/cosmos/bank/v1beta1/bank.proto @@ -4,14 +4,15 @@ package cosmos.bank.v1beta1; import "gogoproto/gogo.proto"; import "cosmos_proto/cosmos.proto"; import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/msg/v1/msg.proto"; option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; // Params defines the parameters for the bank module. message Params { option (gogoproto.goproto_stringer) = false; - repeated SendEnabled send_enabled = 1 [(gogoproto.moretags) = "yaml:\"send_enabled,omitempty\""]; - bool default_send_enabled = 2 [(gogoproto.moretags) = "yaml:\"default_send_enabled,omitempty\""]; + repeated SendEnabled send_enabled = 1; + bool default_send_enabled = 2; } // SendEnabled maps coin denom to a send_enabled status (whether a denom is @@ -25,10 +26,12 @@ message SendEnabled { // Input models transaction input. message Input { + option (cosmos.msg.v1.signer) = "address"; + option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; - string address = 1; + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; repeated cosmos.base.v1beta1.Coin coins = 2 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; } @@ -38,7 +41,7 @@ message Output { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; - string address = 1; + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; repeated cosmos.base.v1beta1.Coin coins = 2 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; } @@ -52,7 +55,7 @@ message Supply { option (gogoproto.equal) = true; option (gogoproto.goproto_getters) = false; - option (cosmos_proto.implements_interface) = "*github.com/cosmos/cosmos-sdk/x/bank/legacy/v040.SupplyI"; + option (cosmos_proto.implements_interface) = "*github.com/cosmos/cosmos-sdk/x/bank/migrations/v040.SupplyI"; repeated cosmos.base.v1beta1.Coin total = 1 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; @@ -65,7 +68,7 @@ message DenomUnit { string denom = 1; // 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 + // 1 denom = 10^exponent base_denom // (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with // exponent = 6, thus: 1 atom = 10^6 uatom). uint32 exponent = 2; @@ -93,4 +96,13 @@ message Metadata { // // Since: cosmos-sdk 0.43 string symbol = 6; + // URI to a document (on or off-chain) that contains additional information. Optional. + // + // Since: cosmos-sdk 0.46 + string uri = 7 [(gogoproto.customname) = "URI"]; + // URIHash is a sha256 hash of a document pointed by URI. It's used to verify that + // the document didn't change. Optional. + // + // Since: cosmos-sdk 0.46 + string uri_hash = 8 [(gogoproto.customname) = "URIHash"]; } diff --git a/third_party/proto/cosmos/bank/v1beta1/genesis.proto b/third_party/proto/cosmos/bank/v1beta1/genesis.proto index 8fd7329a..aa35790b 100644 --- a/third_party/proto/cosmos/bank/v1beta1/genesis.proto +++ b/third_party/proto/cosmos/bank/v1beta1/genesis.proto @@ -4,6 +4,7 @@ package cosmos.bank.v1beta1; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; import "cosmos/bank/v1beta1/bank.proto"; +import "cosmos_proto/cosmos.proto"; option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; @@ -21,7 +22,7 @@ message GenesisState { [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false]; // denom_metadata defines the metadata of the differents coins. - repeated Metadata denom_metadata = 4 [(gogoproto.moretags) = "yaml:\"denom_metadata\"", (gogoproto.nullable) = false]; + repeated Metadata denom_metadata = 4 [(gogoproto.nullable) = false]; } // Balance defines an account address and balance pair used in the bank module's @@ -31,7 +32,7 @@ message Balance { option (gogoproto.goproto_getters) = false; // address is the address of the balance holder. - string address = 1; + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // coins defines the different coins this balance holds. repeated cosmos.base.v1beta1.Coin coins = 2 diff --git a/third_party/proto/cosmos/bank/v1beta1/query.proto b/third_party/proto/cosmos/bank/v1beta1/query.proto index a567e073..635471c4 100644 --- a/third_party/proto/cosmos/bank/v1beta1/query.proto +++ b/third_party/proto/cosmos/bank/v1beta1/query.proto @@ -6,6 +6,7 @@ import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "cosmos/base/v1beta1/coin.proto"; import "cosmos/bank/v1beta1/bank.proto"; +import "cosmos_proto/cosmos.proto"; option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; @@ -23,6 +24,8 @@ service Query { // SpendableBalances queries the spenable balance of all coins for a single // account. + // + // Since: cosmos-sdk 0.46 rpc SpendableBalances(QuerySpendableBalancesRequest) returns (QuerySpendableBalancesResponse) { option (google.api.http).get = "/cosmos/bank/v1beta1/spendable_balances/{address}"; } @@ -34,7 +37,7 @@ service Query { // SupplyOf queries the supply of a single coin. rpc SupplyOf(QuerySupplyOfRequest) returns (QuerySupplyOfResponse) { - option (google.api.http).get = "/cosmos/bank/v1beta1/supply/{denom}"; + option (google.api.http).get = "/cosmos/bank/v1beta1/supply/by_denom"; } // Params queries the parameters of x/bank module. @@ -47,10 +50,19 @@ service Query { option (google.api.http).get = "/cosmos/bank/v1beta1/denoms_metadata/{denom}"; } - // DenomsMetadata queries the client metadata for all registered coin denominations. + // DenomsMetadata queries the client metadata for all registered coin + // denominations. rpc DenomsMetadata(QueryDenomsMetadataRequest) returns (QueryDenomsMetadataResponse) { option (google.api.http).get = "/cosmos/bank/v1beta1/denoms_metadata"; } + + // DenomOwners queries for all account addresses that own a particular token + // denomination. + // + // Since: cosmos-sdk 0.46 + rpc DenomOwners(QueryDenomOwnersRequest) returns (QueryDenomOwnersResponse) { + option (google.api.http).get = "/cosmos/bank/v1beta1/denom_owners/{denom}"; + } } // QueryBalanceRequest is the request type for the Query/Balance RPC method. @@ -59,7 +71,7 @@ message QueryBalanceRequest { option (gogoproto.goproto_getters) = false; // address is the address to query balances for. - string address = 1; + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // denom is the coin denom to query balances for. string denom = 2; @@ -77,7 +89,7 @@ message QueryAllBalancesRequest { option (gogoproto.goproto_getters) = false; // address is the address to query balances for. - string address = 1; + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; @@ -96,12 +108,14 @@ message QueryAllBalancesResponse { // QuerySpendableBalancesRequest defines the gRPC request structure for querying // an account's spendable balances. +// +// Since: cosmos-sdk 0.46 message QuerySpendableBalancesRequest { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; // address is the address to query spendable balances for. - string address = 1; + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; @@ -109,6 +123,8 @@ message QuerySpendableBalancesRequest { // QuerySpendableBalancesResponse defines the gRPC response structure for querying // an account's spendable balances. +// +// Since: cosmos-sdk 0.46 message QuerySpendableBalancesResponse { // balances is the spendable balances of all the coins. repeated cosmos.base.v1beta1.Coin balances = 1 @@ -191,3 +207,37 @@ message QueryDenomMetadataResponse { // metadata describes and provides all the client information for the requested token. Metadata metadata = 1 [(gogoproto.nullable) = false]; } + +// QueryDenomOwnersRequest defines the request type for the DenomOwners RPC query, +// which queries for a paginated set of all account holders of a particular +// denomination. +message QueryDenomOwnersRequest { + // denom defines the coin denomination to query all account holders for. + string denom = 1; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// DenomOwner defines structure representing an account that owns or holds a +// particular denominated token. It contains the account address and account +// balance of the denominated token. +// +// Since: cosmos-sdk 0.46 +message DenomOwner { + // address defines the address that owns a particular denomination. + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // balance is the balance of the denominated coin for an account. + cosmos.base.v1beta1.Coin balance = 2 [(gogoproto.nullable) = false]; +} + +// QueryDenomOwnersResponse defines the RPC response of a DenomOwners RPC query. +// +// Since: cosmos-sdk 0.46 +message QueryDenomOwnersResponse { + repeated DenomOwner denom_owners = 1; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} diff --git a/third_party/proto/cosmos/bank/v1beta1/tx.proto b/third_party/proto/cosmos/bank/v1beta1/tx.proto index 26b2ab41..22e62cbf 100644 --- a/third_party/proto/cosmos/bank/v1beta1/tx.proto +++ b/third_party/proto/cosmos/bank/v1beta1/tx.proto @@ -4,6 +4,8 @@ package cosmos.bank.v1beta1; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; import "cosmos/bank/v1beta1/bank.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/msg/v1/msg.proto"; option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; @@ -18,11 +20,13 @@ service Msg { // MsgSend represents a message to send coins from one account to another. message MsgSend { + option (cosmos.msg.v1.signer) = "from_address"; + option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; - string from_address = 1 [(gogoproto.moretags) = "yaml:\"from_address\""]; - string to_address = 2 [(gogoproto.moretags) = "yaml:\"to_address\""]; + string from_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string to_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; repeated cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; } @@ -32,6 +36,8 @@ message MsgSendResponse {} // MsgMultiSend represents an arbitrary multi-in, multi-out send message. message MsgMultiSend { + option (cosmos.msg.v1.signer) = "inputs"; + option (gogoproto.equal) = false; repeated Input inputs = 1 [(gogoproto.nullable) = false]; diff --git a/third_party/proto/cosmos/base/abci/v1beta1/abci.proto b/third_party/proto/cosmos/base/abci/v1beta1/abci.proto index e24ae7bd..ddaa6356 100644 --- a/third_party/proto/cosmos/base/abci/v1beta1/abci.proto +++ b/third_party/proto/cosmos/base/abci/v1beta1/abci.proto @@ -41,7 +41,7 @@ message TxResponse { string timestamp = 12; // Events defines all the events emitted by processing a transaction. Note, // these events include those emitted by processing all the messages and those - // emitted from the ante handler. Whereas Logs contains the events, with + // emitted from the ante. Whereas Logs contains the events, with // additional metadata, emitted only by processing the messages. // // Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 @@ -52,7 +52,7 @@ message TxResponse { message ABCIMessageLog { option (gogoproto.stringer) = true; - uint32 msg_index = 1; + uint32 msg_index = 1 [(gogoproto.jsontag) = "msg_index"]; string log = 2; // Events contains a slice of Event objects that were emitted during some @@ -79,10 +79,10 @@ message Attribute { // GasInfo defines tx execution gas context. message GasInfo { // GasWanted is the maximum units of work we allow this tx to perform. - uint64 gas_wanted = 1 [(gogoproto.moretags) = "yaml:\"gas_wanted\""]; + uint64 gas_wanted = 1; // GasUsed is the amount of gas actually consumed. - uint64 gas_used = 2 [(gogoproto.moretags) = "yaml:\"gas_used\""]; + uint64 gas_used = 2; } // Result is the union of ResponseFormat and ResponseCheckTx. @@ -91,7 +91,9 @@ message Result { // Data is any data returned from message or handler execution. It MUST be // length prefixed in order to separate data from multiple message executions. - bytes data = 1; + // Deprecated. This field is still populated, but prefer msg_response instead + // because it also contains the Msg response typeURL. + bytes data = 1 [deprecated = true]; // Log contains the log information from message or handler execution. string log = 2; @@ -99,6 +101,11 @@ message Result { // Events contains a slice of Event objects that were emitted during message // or handler execution. repeated tendermint.abci.Event events = 3 [(gogoproto.nullable) = false]; + + // msg_responses contains the Msg handler responses type packed in Anys. + // + // Since: cosmos-sdk 0.46 + repeated google.protobuf.Any msg_responses = 4; } // SimulationResponse defines the response generated when a transaction is @@ -111,6 +118,7 @@ message SimulationResponse { // MsgData defines the data returned in a Result object during message // execution. message MsgData { + option deprecated = true; option (gogoproto.stringer) = true; string msg_type = 1; @@ -122,7 +130,13 @@ message MsgData { message TxMsgData { option (gogoproto.stringer) = true; - repeated MsgData data = 1; + // data field is deprecated and not populated. + repeated MsgData data = 1 [deprecated = true]; + + // msg_responses contains the Msg handler responses packed into Anys. + // + // Since: cosmos-sdk 0.46 + repeated google.protobuf.Any msg_responses = 2; } // SearchTxsResult defines a structure for querying txs pageable @@ -130,13 +144,13 @@ message SearchTxsResult { option (gogoproto.stringer) = true; // Count of all txs - uint64 total_count = 1 [(gogoproto.moretags) = "yaml:\"total_count\"", (gogoproto.jsontag) = "total_count"]; + uint64 total_count = 1; // Count of txs in current page uint64 count = 2; // Index of current page, start from 1 - uint64 page_number = 3 [(gogoproto.moretags) = "yaml:\"page_number\"", (gogoproto.jsontag) = "page_number"]; + uint64 page_number = 3; // Count of total pages - uint64 page_total = 4 [(gogoproto.moretags) = "yaml:\"page_total\"", (gogoproto.jsontag) = "page_total"]; + uint64 page_total = 4; // Max count txs per page uint64 limit = 5; // List of txs in current page diff --git a/third_party/proto/cosmos/base/node/v1beta1/query.proto b/third_party/proto/cosmos/base/node/v1beta1/query.proto new file mode 100644 index 00000000..8070f7b9 --- /dev/null +++ b/third_party/proto/cosmos/base/node/v1beta1/query.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; +package cosmos.base.node.v1beta1; + +import "google/api/annotations.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/node"; + +// Service defines the gRPC querier service for node related queries. +service Service { + // Config queries for the operator configuration. + rpc Config(ConfigRequest) returns (ConfigResponse) { + option (google.api.http).get = "/cosmos/base/node/v1beta1/config"; + } +} + +// ConfigRequest defines the request structure for the Config gRPC query. +message ConfigRequest {} + +// ConfigResponse defines the response structure for the Config gRPC query. +message ConfigResponse { + string minimum_gas_price = 1; +} diff --git a/third_party/proto/cosmos/base/query/v1beta1/pagination.proto b/third_party/proto/cosmos/base/query/v1beta1/pagination.proto index cd5eb066..0a368144 100644 --- a/third_party/proto/cosmos/base/query/v1beta1/pagination.proto +++ b/third_party/proto/cosmos/base/query/v1beta1/pagination.proto @@ -46,7 +46,8 @@ message PageRequest { // } message PageResponse { // next_key is the key to be passed to PageRequest.key to - // query the next page most efficiently + // query the next page most efficiently. It will be empty if + // there are no more results. bytes next_key = 1; // total is total number of results available if PageRequest.count_total diff --git a/third_party/proto/cosmos/base/snapshots/v1beta1/snapshot.proto b/third_party/proto/cosmos/base/snapshots/v1beta1/snapshot.proto index 6dcc4a93..5dba369f 100644 --- a/third_party/proto/cosmos/base/snapshots/v1beta1/snapshot.proto +++ b/third_party/proto/cosmos/base/snapshots/v1beta1/snapshot.proto @@ -20,6 +20,8 @@ message Metadata { } // SnapshotItem is an item contained in a rootmulti.Store snapshot. +// +// Since: cosmos-sdk 0.46 message SnapshotItem { // item is the specific type of snapshot item. oneof item { @@ -27,15 +29,21 @@ message SnapshotItem { SnapshotIAVLItem iavl = 2 [(gogoproto.customname) = "IAVL"]; SnapshotExtensionMeta extension = 3; SnapshotExtensionPayload extension_payload = 4; + SnapshotKVItem kv = 5 [(gogoproto.customname) = "KV"]; + SnapshotSchema schema = 6; } } // SnapshotStoreItem contains metadata about a snapshotted store. +// +// Since: cosmos-sdk 0.46 message SnapshotStoreItem { string name = 1; } // SnapshotIAVLItem is an exported IAVL node. +// +// Since: cosmos-sdk 0.46 message SnapshotIAVLItem { bytes key = 1; bytes value = 2; @@ -46,12 +54,31 @@ message SnapshotIAVLItem { } // SnapshotExtensionMeta contains metadata about an external snapshotter. +// +// Since: cosmos-sdk 0.46 message SnapshotExtensionMeta { string name = 1; uint32 format = 2; } // SnapshotExtensionPayload contains payloads of an external snapshotter. +// +// Since: cosmos-sdk 0.46 message SnapshotExtensionPayload { bytes payload = 1; } + +// SnapshotKVItem is an exported Key/Value Pair +// +// Since: cosmos-sdk 0.46 +message SnapshotKVItem { + bytes key = 1; + bytes value = 2; +} + +// SnapshotSchema is an exported schema of smt store +// +// Since: cosmos-sdk 0.46 +message SnapshotSchema { + repeated bytes keys = 1; +} diff --git a/third_party/proto/cosmos/base/store/v1beta1/listening.proto b/third_party/proto/cosmos/base/store/v1beta1/listening.proto index 35999710..753f7c16 100644 --- a/third_party/proto/cosmos/base/store/v1beta1/listening.proto +++ b/third_party/proto/cosmos/base/store/v1beta1/listening.proto @@ -1,6 +1,8 @@ syntax = "proto3"; package cosmos.base.store.v1beta1; +import "tendermint/abci/types.proto"; + option go_package = "github.com/cosmos/cosmos-sdk/store/types"; // StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and Deletes) @@ -14,3 +16,19 @@ message StoreKVPair { bytes key = 3; bytes value = 4; } + +// BlockMetadata contains all the abci event data of a block +// the file streamer dump them into files together with the state changes. +message BlockMetadata { + // DeliverTx encapulate deliver tx request and response. + message DeliverTx { + tendermint.abci.RequestDeliverTx request = 1; + tendermint.abci.ResponseDeliverTx response = 2; + } + tendermint.abci.RequestBeginBlock request_begin_block = 1; + tendermint.abci.ResponseBeginBlock response_begin_block = 2; + repeated DeliverTx deliver_txs = 3; + tendermint.abci.RequestEndBlock request_end_block = 4; + tendermint.abci.ResponseEndBlock response_end_block = 5; + tendermint.abci.ResponseCommit response_commit = 6; +} diff --git a/third_party/proto/cosmos/base/tendermint/v1beta1/query.proto b/third_party/proto/cosmos/base/tendermint/v1beta1/query.proto index 98542d23..2d516901 100644 --- a/third_party/proto/cosmos/base/tendermint/v1beta1/query.proto +++ b/third_party/proto/cosmos/base/tendermint/v1beta1/query.proto @@ -5,9 +5,11 @@ import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; import "google/api/annotations.proto"; import "tendermint/p2p/types.proto"; -import "tendermint/types/block.proto"; import "tendermint/types/types.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; +import "cosmos/base/tendermint/v1beta1/types.proto"; +import "cosmos_proto/cosmos.proto"; +import "tendermint/types/block.proto"; option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/tmservice"; @@ -17,14 +19,17 @@ service Service { rpc GetNodeInfo(GetNodeInfoRequest) returns (GetNodeInfoResponse) { option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/node_info"; } + // GetSyncing queries node syncing. rpc GetSyncing(GetSyncingRequest) returns (GetSyncingResponse) { option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/syncing"; } + // GetLatestBlock returns the latest block. rpc GetLatestBlock(GetLatestBlockRequest) returns (GetLatestBlockResponse) { option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/blocks/latest"; } + // GetBlockByHeight queries block for given height. rpc GetBlockByHeight(GetBlockByHeightRequest) returns (GetBlockByHeightResponse) { option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/blocks/{height}"; @@ -34,20 +39,32 @@ service Service { rpc GetLatestValidatorSet(GetLatestValidatorSetRequest) returns (GetLatestValidatorSetResponse) { option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/validatorsets/latest"; } + // GetValidatorSetByHeight queries validator-set at a given height. rpc GetValidatorSetByHeight(GetValidatorSetByHeightRequest) returns (GetValidatorSetByHeightResponse) { option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/validatorsets/{height}"; } + + // ABCIQuery defines a query handler that supports ABCI queries directly to + // the application, bypassing Tendermint completely. The ABCI query must + // contain a valid and supported path, including app, custom, p2p, and store. + // + // Since: cosmos-sdk 0.46 + rpc ABCIQuery(ABCIQueryRequest) returns (ABCIQueryResponse) { + option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/abci_query"; + } } -// GetValidatorSetByHeightRequest is the request type for the Query/GetValidatorSetByHeight RPC method. +// GetValidatorSetByHeightRequest is the request type for the +// Query/GetValidatorSetByHeight RPC method. message GetValidatorSetByHeightRequest { int64 height = 1; // pagination defines an pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; } -// GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. +// GetValidatorSetByHeightResponse is the response type for the +// Query/GetValidatorSetByHeight RPC method. message GetValidatorSetByHeightResponse { int64 block_height = 1; repeated Validator validators = 2; @@ -55,13 +72,15 @@ message GetValidatorSetByHeightResponse { cosmos.base.query.v1beta1.PageResponse pagination = 3; } -// GetLatestValidatorSetRequest is the request type for the Query/GetValidatorSetByHeight RPC method. +// GetLatestValidatorSetRequest is the request type for the +// Query/GetValidatorSetByHeight RPC method. message GetLatestValidatorSetRequest { // pagination defines an pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 1; } -// GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. +// GetLatestValidatorSetResponse is the response type for the +// Query/GetValidatorSetByHeight RPC method. message GetLatestValidatorSetResponse { int64 block_height = 1; repeated Validator validators = 2; @@ -71,30 +90,44 @@ message GetLatestValidatorSetResponse { // Validator is the type for the validator-set. message Validator { - string address = 1; + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; google.protobuf.Any pub_key = 2; int64 voting_power = 3; int64 proposer_priority = 4; } -// GetBlockByHeightRequest is the request type for the Query/GetBlockByHeight RPC method. +// GetBlockByHeightRequest is the request type for the Query/GetBlockByHeight +// RPC method. message GetBlockByHeightRequest { int64 height = 1; } -// GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. +// GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight +// RPC method. message GetBlockByHeightResponse { .tendermint.types.BlockID block_id = 1; - .tendermint.types.Block block = 2; + + // Deprecated: please use `sdk_block` instead + .tendermint.types.Block block = 2; + + // Since: cosmos-sdk 0.47 + Block sdk_block = 3; } -// GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC method. +// GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC +// method. message GetLatestBlockRequest {} -// GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. +// GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC +// method. message GetLatestBlockResponse { .tendermint.types.BlockID block_id = 1; - .tendermint.types.Block block = 2; + + // Deprecated: please use `sdk_block` instead + .tendermint.types.Block block = 2; + + // Since: cosmos-sdk 0.47 + Block sdk_block = 3; } // GetSyncingRequest is the request type for the Query/GetSyncing RPC method. @@ -108,7 +141,8 @@ message GetSyncingResponse { // GetNodeInfoRequest is the request type for the Query/GetNodeInfo RPC method. message GetNodeInfoRequest {} -// GetNodeInfoResponse is the request type for the Query/GetNodeInfo RPC method. +// GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC +// method. message GetNodeInfoResponse { .tendermint.p2p.DefaultNodeInfo default_node_info = 1; VersionInfo application_version = 2; @@ -136,3 +170,50 @@ message Module { // checksum string sum = 3; } + +// ABCIQueryRequest defines the request structure for the ABCIQuery gRPC query. +message ABCIQueryRequest { + bytes data = 1; + string path = 2; + int64 height = 3; + bool prove = 4; +} + +// ABCIQueryResponse defines the response structure for the ABCIQuery gRPC +// query. +// +// Note: This type is a duplicate of the ResponseQuery proto type defined in +// Tendermint. +message ABCIQueryResponse { + uint32 code = 1; + // DEPRECATED: use "value" instead + reserved 2; + string log = 3; // nondeterministic + string info = 4; // nondeterministic + int64 index = 5; + bytes key = 6; + bytes value = 7; + ProofOps proof_ops = 8; + int64 height = 9; + string codespace = 10; +} + +// ProofOp defines an operation used for calculating Merkle root. The data could +// be arbitrary format, providing nessecary data for example neighbouring node +// hash. +// +// Note: This type is a duplicate of the ProofOp proto type defined in +// Tendermint. +message ProofOp { + string type = 1; + bytes key = 2; + bytes data = 3; +} + +// ProofOps is Merkle proof defined by the list of ProofOps. +// +// Note: This type is a duplicate of the ProofOps proto type defined in +// Tendermint. +message ProofOps { + repeated ProofOp ops = 1 [(gogoproto.nullable) = false]; +} diff --git a/third_party/proto/cosmos/base/tendermint/v1beta1/types.proto b/third_party/proto/cosmos/base/tendermint/v1beta1/types.proto new file mode 100644 index 00000000..3d6c04c2 --- /dev/null +++ b/third_party/proto/cosmos/base/tendermint/v1beta1/types.proto @@ -0,0 +1,50 @@ +syntax = "proto3"; +package cosmos.base.tendermint.v1beta1; + +import "gogoproto/gogo.proto"; +import "tendermint/types/types.proto"; +import "tendermint/types/evidence.proto"; +import "tendermint/version/types.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/tmservice"; + +// Block is tendermint type Block, with the Header proposer address +// field converted to bech32 string. +message Block { + Header header = 1 [(gogoproto.nullable) = false]; + .tendermint.types.Data data = 2 [(gogoproto.nullable) = false]; + .tendermint.types.EvidenceList evidence = 3 [(gogoproto.nullable) = false]; + .tendermint.types.Commit last_commit = 4; +} + +// Header defines the structure of a Tendermint block header. +message Header { + // basic block info + .tendermint.version.Consensus version = 1 [(gogoproto.nullable) = false]; + string chain_id = 2 [(gogoproto.customname) = "ChainID"]; + int64 height = 3; + google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + + // prev block info + .tendermint.types.BlockID last_block_id = 5 [(gogoproto.nullable) = false]; + + // hashes of block data + bytes last_commit_hash = 6; // commit from validators from the last block + bytes data_hash = 7; // transactions + + // hashes from the app output from the prev block + bytes validators_hash = 8; // validators for the current block + bytes next_validators_hash = 9; // validators for the next block + bytes consensus_hash = 10; // consensus params for current block + bytes app_hash = 11; // state after txs from the previous block + bytes last_results_hash = 12; // root hash of all results from the txs from the previous block + + // consensus info + bytes evidence_hash = 13; // evidence included in the block + + // proposer_address is the original block proposer address, formatted as a Bech32 string. + // In Tendermint, this type is `bytes`, but in the SDK, we convert it to a Bech32 string + // for better UX. + string proposer_address = 14; // original proposer of the block +} diff --git a/third_party/proto/cosmos/base/v1beta1/coin.proto b/third_party/proto/cosmos/base/v1beta1/coin.proto index fab75284..69e67e09 100644 --- a/third_party/proto/cosmos/base/v1beta1/coin.proto +++ b/third_party/proto/cosmos/base/v1beta1/coin.proto @@ -2,6 +2,7 @@ syntax = "proto3"; package cosmos.base.v1beta1; import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; option go_package = "github.com/cosmos/cosmos-sdk/types"; option (gogoproto.goproto_stringer_all) = false; @@ -15,7 +16,8 @@ message Coin { option (gogoproto.equal) = true; string denom = 1; - string amount = 2 [(gogoproto.customtype) = "Int", (gogoproto.nullable) = false]; + string amount = 2 + [(cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "Int", (gogoproto.nullable) = false]; } // DecCoin defines a token with a denomination and a decimal amount. @@ -26,15 +28,16 @@ message DecCoin { option (gogoproto.equal) = true; string denom = 1; - string amount = 2 [(gogoproto.customtype) = "Dec", (gogoproto.nullable) = false]; + string amount = 2 + [(cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "Dec", (gogoproto.nullable) = false]; } // IntProto defines a Protobuf wrapper around an Int object. message IntProto { - string int = 1 [(gogoproto.customtype) = "Int", (gogoproto.nullable) = false]; + string int = 1 [(cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "Int", (gogoproto.nullable) = false]; } // DecProto defines a Protobuf wrapper around a Dec object. message DecProto { - string dec = 1 [(gogoproto.customtype) = "Dec", (gogoproto.nullable) = false]; + string dec = 1 [(cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "Dec", (gogoproto.nullable) = false]; } diff --git a/third_party/proto/cosmos/capability/v1beta1/capability.proto b/third_party/proto/cosmos/capability/v1beta1/capability.proto index 1c8332f3..c433566d 100644 --- a/third_party/proto/cosmos/capability/v1beta1/capability.proto +++ b/third_party/proto/cosmos/capability/v1beta1/capability.proto @@ -10,7 +10,7 @@ import "gogoproto/gogo.proto"; message Capability { option (gogoproto.goproto_stringer) = false; - uint64 index = 1 [(gogoproto.moretags) = "yaml:\"index\""]; + uint64 index = 1; } // Owner defines a single capability owner. An owner is defined by the name of @@ -19,8 +19,8 @@ message Owner { option (gogoproto.goproto_stringer) = false; option (gogoproto.goproto_getters) = false; - string module = 1 [(gogoproto.moretags) = "yaml:\"module\""]; - string name = 2 [(gogoproto.moretags) = "yaml:\"name\""]; + string module = 1; + string name = 2; } // CapabilityOwners defines a set of owners of a single Capability. The set of diff --git a/third_party/proto/cosmos/capability/v1beta1/genesis.proto b/third_party/proto/cosmos/capability/v1beta1/genesis.proto index 05bb0afc..b5482439 100644 --- a/third_party/proto/cosmos/capability/v1beta1/genesis.proto +++ b/third_party/proto/cosmos/capability/v1beta1/genesis.proto @@ -12,7 +12,7 @@ message GenesisOwners { uint64 index = 1; // index_owners are the owners at the given index. - CapabilityOwners index_owners = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"index_owners\""]; + CapabilityOwners index_owners = 2 [(gogoproto.nullable) = false]; } // GenesisState defines the capability module's genesis state. diff --git a/third_party/proto/cosmos/crisis/v1beta1/genesis.proto b/third_party/proto/cosmos/crisis/v1beta1/genesis.proto index 5b0ff7ec..5c291604 100644 --- a/third_party/proto/cosmos/crisis/v1beta1/genesis.proto +++ b/third_party/proto/cosmos/crisis/v1beta1/genesis.proto @@ -10,6 +10,5 @@ import "cosmos/base/v1beta1/coin.proto"; message GenesisState { // constant_fee is the fee used to verify the invariant in the crisis // module. - cosmos.base.v1beta1.Coin constant_fee = 3 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"constant_fee\""]; + cosmos.base.v1beta1.Coin constant_fee = 3 [(gogoproto.nullable) = false]; } diff --git a/third_party/proto/cosmos/crisis/v1beta1/tx.proto b/third_party/proto/cosmos/crisis/v1beta1/tx.proto index 26457ad6..fea9059f 100644 --- a/third_party/proto/cosmos/crisis/v1beta1/tx.proto +++ b/third_party/proto/cosmos/crisis/v1beta1/tx.proto @@ -4,6 +4,8 @@ package cosmos.crisis.v1beta1; option go_package = "github.com/cosmos/cosmos-sdk/x/crisis/types"; import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/msg/v1/msg.proto"; // Msg defines the bank Msg service. service Msg { @@ -13,12 +15,14 @@ service Msg { // MsgVerifyInvariant represents a message to verify a particular invariance. message MsgVerifyInvariant { + option (cosmos.msg.v1.signer) = "sender"; + option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; - string sender = 1; - string invariant_module_name = 2 [(gogoproto.moretags) = "yaml:\"invariant_module_name\""]; - string invariant_route = 3 [(gogoproto.moretags) = "yaml:\"invariant_route\""]; + string sender = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string invariant_module_name = 2; + string invariant_route = 3; } // MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. diff --git a/third_party/proto/cosmos/crypto/hd/v1/hd.proto b/third_party/proto/cosmos/crypto/hd/v1/hd.proto new file mode 100644 index 00000000..bb079ce6 --- /dev/null +++ b/third_party/proto/cosmos/crypto/hd/v1/hd.proto @@ -0,0 +1,24 @@ +// Since: cosmos-sdk 0.46 +syntax = "proto3"; +package cosmos.crypto.hd.v1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/crypto/hd"; +option (gogoproto.goproto_getters_all) = false; + +// BIP44Params is used as path field in ledger item in Record. +message BIP44Params { + option (gogoproto.goproto_stringer) = false; + // purpose is a constant set to 44' (or 0x8000002C) following the BIP43 recommendation + uint32 purpose = 1; + // coin_type is a constant that improves privacy + uint32 coin_type = 2; + // account splits the key space into independent user identities + uint32 account = 3; + // change is a constant used for public derivation. Constant 0 is used for external chain and constant 1 for internal + // chain. + bool change = 4; + // address_index is used as child index in BIP32 derivation + uint32 address_index = 5; +} diff --git a/third_party/proto/cosmos/crypto/keyring/v1/record.proto b/third_party/proto/cosmos/crypto/keyring/v1/record.proto new file mode 100644 index 00000000..14c6da63 --- /dev/null +++ b/third_party/proto/cosmos/crypto/keyring/v1/record.proto @@ -0,0 +1,47 @@ +// Since: cosmos-sdk 0.46 +syntax = "proto3"; +package cosmos.crypto.keyring.v1; + +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; +import "cosmos/crypto/hd/v1/hd.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/crypto/keyring"; +option (gogoproto.goproto_getters_all) = false; + +// Record is used for representing a key in the keyring. +message Record { + // name represents a name of Record + string name = 1; + // pub_key represents a public key in any format + google.protobuf.Any pub_key = 2; + + // Record contains one of the following items + oneof item { + // local stores the private key locally. + Local local = 3; + // ledger stores the information about a Ledger key. + Ledger ledger = 4; + // Multi does not store any other information. + Multi multi = 5; + // Offline does not store any other information. + Offline offline = 6; + } + + // Item is a keyring item stored in a keyring backend. + // Local item + message Local { + google.protobuf.Any priv_key = 1; + } + + // Ledger item + message Ledger { + hd.v1.BIP44Params path = 1; + } + + // Multi item + message Multi {} + + // Offline item + message Offline {} +} diff --git a/third_party/proto/cosmos/crypto/multisig/keys.proto b/third_party/proto/cosmos/crypto/multisig/keys.proto index f8398e80..7a11fe33 100644 --- a/third_party/proto/cosmos/crypto/multisig/keys.proto +++ b/third_party/proto/cosmos/crypto/multisig/keys.proto @@ -12,7 +12,6 @@ option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/multisig"; message LegacyAminoPubKey { option (gogoproto.goproto_getters) = false; - uint32 threshold = 1 [(gogoproto.moretags) = "yaml:\"threshold\""]; - repeated google.protobuf.Any public_keys = 2 - [(gogoproto.customname) = "PubKeys", (gogoproto.moretags) = "yaml:\"pubkeys\""]; + uint32 threshold = 1; + repeated google.protobuf.Any public_keys = 2 [(gogoproto.customname) = "PubKeys"]; } diff --git a/third_party/proto/cosmos/distribution/v1beta1/distribution.proto b/third_party/proto/cosmos/distribution/v1beta1/distribution.proto index ae98ec0b..73174303 100644 --- a/third_party/proto/cosmos/distribution/v1beta1/distribution.proto +++ b/third_party/proto/cosmos/distribution/v1beta1/distribution.proto @@ -6,26 +6,27 @@ option (gogoproto.equal_all) = true; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; +import "cosmos_proto/cosmos.proto"; // Params defines the set of params for the distribution module. message Params { option (gogoproto.goproto_stringer) = false; string community_tax = 1 [ - (gogoproto.moretags) = "yaml:\"community_tax\"", + (cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false ]; string base_proposer_reward = 2 [ - (gogoproto.moretags) = "yaml:\"base_proposer_reward\"", + (cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false ]; string bonus_proposer_reward = 3 [ - (gogoproto.moretags) = "yaml:\"bonus_proposer_reward\"", + (cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false ]; - bool withdraw_addr_enabled = 4 [(gogoproto.moretags) = "yaml:\"withdraw_addr_enabled\""]; + bool withdraw_addr_enabled = 4; } // ValidatorHistoricalRewards represents historical rewards for a validator. @@ -41,12 +42,9 @@ message Params { // read that record) // + one per validator for the zeroeth period, set on initialization message ValidatorHistoricalRewards { - repeated cosmos.base.v1beta1.DecCoin cumulative_reward_ratio = 1 [ - (gogoproto.moretags) = "yaml:\"cumulative_reward_ratio\"", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", - (gogoproto.nullable) = false - ]; - uint32 reference_count = 2 [(gogoproto.moretags) = "yaml:\"reference_count\""]; + repeated cosmos.base.v1beta1.DecCoin cumulative_reward_ratio = 1 + [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; + uint32 reference_count = 2; } // ValidatorCurrentRewards represents current rewards and current @@ -68,11 +66,8 @@ message ValidatorAccumulatedCommission { // ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards // for a validator inexpensive to track, allows simple sanity checks. message ValidatorOutstandingRewards { - repeated cosmos.base.v1beta1.DecCoin rewards = 1 [ - (gogoproto.moretags) = "yaml:\"rewards\"", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", - (gogoproto.nullable) = false - ]; + repeated cosmos.base.v1beta1.DecCoin rewards = 1 + [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; } // ValidatorSlashEvent represents a validator slash event. @@ -80,33 +75,34 @@ message ValidatorOutstandingRewards { // This is needed to calculate appropriate amount of staking tokens // for delegations which are withdrawn after a slash has occurred. message ValidatorSlashEvent { - uint64 validator_period = 1 [(gogoproto.moretags) = "yaml:\"validator_period\""]; - string fraction = 2 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + uint64 validator_period = 1; + string fraction = 2 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; } // ValidatorSlashEvents is a collection of ValidatorSlashEvent messages. message ValidatorSlashEvents { option (gogoproto.goproto_stringer) = false; - repeated ValidatorSlashEvent validator_slash_events = 1 - [(gogoproto.moretags) = "yaml:\"validator_slash_events\"", (gogoproto.nullable) = false]; + repeated ValidatorSlashEvent validator_slash_events = 1 [(gogoproto.nullable) = false]; } // FeePool is the global fee pool for distribution. message FeePool { - repeated cosmos.base.v1beta1.DecCoin community_pool = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", - (gogoproto.moretags) = "yaml:\"community_pool\"" - ]; + repeated cosmos.base.v1beta1.DecCoin community_pool = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"]; } // CommunityPoolSpendProposal details a proposal for use of community funds, // together with how many coins are proposed to be spent, and to which // recipient account. message CommunityPoolSpendProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; string title = 1; string description = 2; @@ -122,13 +118,13 @@ message CommunityPoolSpendProposal { // the delegators within the validator may be left with less than a full token, // thus sdk.Dec is used. message DelegatorStartingInfo { - uint64 previous_period = 1 [(gogoproto.moretags) = "yaml:\"previous_period\""]; + uint64 previous_period = 1; string stake = 2 [ - (gogoproto.moretags) = "yaml:\"stake\"", + (cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false ]; - uint64 height = 3 [(gogoproto.moretags) = "yaml:\"creation_height\"", (gogoproto.jsontag) = "creation_height"]; + uint64 height = 3 [(gogoproto.jsontag) = "creation_height"]; } // DelegationDelegatorReward represents the properties @@ -137,7 +133,7 @@ message DelegationDelegatorReward { option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_stringer) = true; - string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; repeated cosmos.base.v1beta1.DecCoin reward = 2 [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; @@ -146,12 +142,13 @@ message DelegationDelegatorReward { // CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal // with a deposit message CommunityPoolSpendProposalWithDeposit { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = true; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = true; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - string title = 1 [(gogoproto.moretags) = "yaml:\"title\""]; - string description = 2 [(gogoproto.moretags) = "yaml:\"description\""]; - string recipient = 3 [(gogoproto.moretags) = "yaml:\"recipient\""]; - string amount = 4 [(gogoproto.moretags) = "yaml:\"amount\""]; - string deposit = 5 [(gogoproto.moretags) = "yaml:\"deposit\""]; + string title = 1; + string description = 2; + string recipient = 3; + string amount = 4; + string deposit = 5; } diff --git a/third_party/proto/cosmos/distribution/v1beta1/genesis.proto b/third_party/proto/cosmos/distribution/v1beta1/genesis.proto index c0b17cdf..4662e8df 100644 --- a/third_party/proto/cosmos/distribution/v1beta1/genesis.proto +++ b/third_party/proto/cosmos/distribution/v1beta1/genesis.proto @@ -7,6 +7,7 @@ option (gogoproto.equal_all) = true; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; import "cosmos/distribution/v1beta1/distribution.proto"; +import "cosmos_proto/cosmos.proto"; // DelegatorWithdrawInfo is the address for where distributions rewards are // withdrawn to by default this struct is only used at genesis to feed in @@ -16,10 +17,10 @@ message DelegatorWithdrawInfo { option (gogoproto.goproto_getters) = false; // delegator_address is the address of the delegator. - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // withdraw_address is the address to withdraw the delegation rewards to. - string withdraw_address = 2 [(gogoproto.moretags) = "yaml:\"withdraw_address\""]; + string withdraw_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // ValidatorOutstandingRewardsRecord is used for import/export via genesis json. @@ -28,14 +29,11 @@ message ValidatorOutstandingRewardsRecord { option (gogoproto.goproto_getters) = false; // validator_address is the address of the validator. - string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // outstanding_rewards represents the oustanding rewards of a validator. - repeated cosmos.base.v1beta1.DecCoin outstanding_rewards = 2 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"outstanding_rewards\"" - ]; + repeated cosmos.base.v1beta1.DecCoin outstanding_rewards = 2 + [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; } // ValidatorAccumulatedCommissionRecord is used for import / export via genesis @@ -45,11 +43,10 @@ message ValidatorAccumulatedCommissionRecord { option (gogoproto.goproto_getters) = false; // validator_address is the address of the validator. - string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // accumulated is the accumulated commission of a validator. - ValidatorAccumulatedCommission accumulated = 2 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"accumulated\""]; + ValidatorAccumulatedCommission accumulated = 2 [(gogoproto.nullable) = false]; } // ValidatorHistoricalRewardsRecord is used for import / export via genesis @@ -59,13 +56,13 @@ message ValidatorHistoricalRewardsRecord { option (gogoproto.goproto_getters) = false; // validator_address is the address of the validator. - string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // period defines the period the historical rewards apply to. uint64 period = 2; // rewards defines the historical rewards of a validator. - ValidatorHistoricalRewards rewards = 3 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"rewards\""]; + ValidatorHistoricalRewards rewards = 3 [(gogoproto.nullable) = false]; } // ValidatorCurrentRewardsRecord is used for import / export via genesis json. @@ -74,10 +71,10 @@ message ValidatorCurrentRewardsRecord { option (gogoproto.goproto_getters) = false; // validator_address is the address of the validator. - string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // rewards defines the current rewards of a validator. - ValidatorCurrentRewards rewards = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"rewards\""]; + ValidatorCurrentRewards rewards = 2 [(gogoproto.nullable) = false]; } // DelegatorStartingInfoRecord used for import / export via genesis json. @@ -86,14 +83,13 @@ message DelegatorStartingInfoRecord { option (gogoproto.goproto_getters) = false; // delegator_address is the address of the delegator. - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // validator_address is the address of the validator. - string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // starting_info defines the starting info of a delegator. - DelegatorStartingInfo starting_info = 3 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"starting_info\""]; + DelegatorStartingInfo starting_info = 3 [(gogoproto.nullable) = false]; } // ValidatorSlashEventRecord is used for import / export via genesis json. @@ -102,13 +98,13 @@ message ValidatorSlashEventRecord { option (gogoproto.goproto_getters) = false; // validator_address is the address of the validator. - string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // height defines the block height at which the slash event occured. uint64 height = 2; // period is the period of the slash event. uint64 period = 3; // validator_slash_event describes the slash event. - ValidatorSlashEvent validator_slash_event = 4 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"event\""]; + ValidatorSlashEvent validator_slash_event = 4 [(gogoproto.nullable) = false]; } // GenesisState defines the distribution module's genesis state. @@ -117,39 +113,32 @@ message GenesisState { option (gogoproto.goproto_getters) = false; // params defines all the paramaters of the module. - Params params = 1 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"params\""]; + Params params = 1 [(gogoproto.nullable) = false]; // fee_pool defines the fee pool at genesis. - FeePool fee_pool = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"fee_pool\""]; + FeePool fee_pool = 2 [(gogoproto.nullable) = false]; // fee_pool defines the delegator withdraw infos at genesis. - repeated DelegatorWithdrawInfo delegator_withdraw_infos = 3 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"delegator_withdraw_infos\""]; + repeated DelegatorWithdrawInfo delegator_withdraw_infos = 3 [(gogoproto.nullable) = false]; // fee_pool defines the previous proposer at genesis. - string previous_proposer = 4 [(gogoproto.moretags) = "yaml:\"previous_proposer\""]; + string previous_proposer = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // fee_pool defines the outstanding rewards of all validators at genesis. - repeated ValidatorOutstandingRewardsRecord outstanding_rewards = 5 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"outstanding_rewards\""]; + repeated ValidatorOutstandingRewardsRecord outstanding_rewards = 5 [(gogoproto.nullable) = false]; // fee_pool defines the accumulated commisions of all validators at genesis. - repeated ValidatorAccumulatedCommissionRecord validator_accumulated_commissions = 6 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_accumulated_commissions\""]; + repeated ValidatorAccumulatedCommissionRecord validator_accumulated_commissions = 6 [(gogoproto.nullable) = false]; // fee_pool defines the historical rewards of all validators at genesis. - repeated ValidatorHistoricalRewardsRecord validator_historical_rewards = 7 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_historical_rewards\""]; + repeated ValidatorHistoricalRewardsRecord validator_historical_rewards = 7 [(gogoproto.nullable) = false]; // fee_pool defines the current rewards of all validators at genesis. - repeated ValidatorCurrentRewardsRecord validator_current_rewards = 8 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_current_rewards\""]; + repeated ValidatorCurrentRewardsRecord validator_current_rewards = 8 [(gogoproto.nullable) = false]; // fee_pool defines the delegator starting infos at genesis. - repeated DelegatorStartingInfoRecord delegator_starting_infos = 9 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"delegator_starting_infos\""]; + repeated DelegatorStartingInfoRecord delegator_starting_infos = 9 [(gogoproto.nullable) = false]; // fee_pool defines the validator slash events at genesis. - repeated ValidatorSlashEventRecord validator_slash_events = 10 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_slash_events\""]; + repeated ValidatorSlashEventRecord validator_slash_events = 10 [(gogoproto.nullable) = false]; } diff --git a/third_party/proto/cosmos/distribution/v1beta1/query.proto b/third_party/proto/cosmos/distribution/v1beta1/query.proto index 2991218d..a09413fc 100644 --- a/third_party/proto/cosmos/distribution/v1beta1/query.proto +++ b/third_party/proto/cosmos/distribution/v1beta1/query.proto @@ -6,6 +6,7 @@ import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "cosmos/base/v1beta1/coin.proto"; import "cosmos/distribution/v1beta1/distribution.proto"; +import "cosmos_proto/cosmos.proto"; option go_package = "github.com/cosmos/cosmos-sdk/x/distribution/types"; @@ -77,7 +78,7 @@ message QueryParamsResponse { // Query/ValidatorOutstandingRewards RPC method. message QueryValidatorOutstandingRewardsRequest { // validator_address defines the validator address to query for. - string validator_address = 1; + string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // QueryValidatorOutstandingRewardsResponse is the response type for the @@ -90,7 +91,7 @@ message QueryValidatorOutstandingRewardsResponse { // Query/ValidatorCommission RPC method message QueryValidatorCommissionRequest { // validator_address defines the validator address to query for. - string validator_address = 1; + string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // QueryValidatorCommissionResponse is the response type for the @@ -107,7 +108,7 @@ message QueryValidatorSlashesRequest { option (gogoproto.goproto_stringer) = true; // validator_address defines the validator address to query for. - string validator_address = 1; + string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // starting_height defines the optional starting height to query the slashes. uint64 starting_height = 2; // starting_height defines the optional ending height to query the slashes. @@ -133,9 +134,9 @@ message QueryDelegationRewardsRequest { option (gogoproto.goproto_getters) = false; // delegator_address defines the delegator address to query for. - string delegator_address = 1; + string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // validator_address defines the validator address to query for. - string validator_address = 2; + string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // QueryDelegationRewardsResponse is the response type for the @@ -152,7 +153,7 @@ message QueryDelegationTotalRewardsRequest { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; // delegator_address defines the delegator address to query for. - string delegator_address = 1; + string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // QueryDelegationTotalRewardsResponse is the response type for the @@ -172,7 +173,7 @@ message QueryDelegatorValidatorsRequest { option (gogoproto.goproto_getters) = false; // delegator_address defines the delegator address to query for. - string delegator_address = 1; + string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // QueryDelegatorValidatorsResponse is the response type for the @@ -192,7 +193,7 @@ message QueryDelegatorWithdrawAddressRequest { option (gogoproto.goproto_getters) = false; // delegator_address defines the delegator address to query for. - string delegator_address = 1; + string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // QueryDelegatorWithdrawAddressResponse is the response type for the @@ -202,7 +203,7 @@ message QueryDelegatorWithdrawAddressResponse { option (gogoproto.goproto_getters) = false; // withdraw_address defines the delegator address to query for. - string withdraw_address = 1; + string withdraw_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // QueryCommunityPoolRequest is the request type for the Query/CommunityPool RPC diff --git a/third_party/proto/cosmos/distribution/v1beta1/tx.proto b/third_party/proto/cosmos/distribution/v1beta1/tx.proto index e6ce478b..68fea0c2 100644 --- a/third_party/proto/cosmos/distribution/v1beta1/tx.proto +++ b/third_party/proto/cosmos/distribution/v1beta1/tx.proto @@ -6,6 +6,8 @@ option (gogoproto.equal_all) = true; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/msg/v1/msg.proto"; // Msg defines the distribution Msg service. service Msg { @@ -29,11 +31,13 @@ service Msg { // MsgSetWithdrawAddress sets the withdraw address for // a delegator (or validator self-delegation). message MsgSetWithdrawAddress { + option (cosmos.msg.v1.signer) = "delegator_address"; + option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - string withdraw_address = 2 [(gogoproto.moretags) = "yaml:\"withdraw_address\""]; + string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string withdraw_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type. @@ -42,37 +46,51 @@ message MsgSetWithdrawAddressResponse {} // MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator // from a single validator. message MsgWithdrawDelegatorReward { + option (cosmos.msg.v1.signer) = "delegator_address"; + option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward response type. -message MsgWithdrawDelegatorRewardResponse {} +message MsgWithdrawDelegatorRewardResponse { + // Since: cosmos-sdk 0.46 + repeated cosmos.base.v1beta1.Coin amount = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; +} // MsgWithdrawValidatorCommission withdraws the full commission to the validator // address. message MsgWithdrawValidatorCommission { + option (cosmos.msg.v1.signer) = "validator_address"; + option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; - string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // MsgWithdrawValidatorCommissionResponse defines the Msg/WithdrawValidatorCommission response type. -message MsgWithdrawValidatorCommissionResponse {} +message MsgWithdrawValidatorCommissionResponse { + // Since: cosmos-sdk 0.46 + repeated cosmos.base.v1beta1.Coin amount = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; +} // MsgFundCommunityPool allows an account to directly // fund the community pool. message MsgFundCommunityPool { + option (cosmos.msg.v1.signer) = "depositor"; + option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; repeated cosmos.base.v1beta1.Coin amount = 1 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - string depositor = 2; + string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. diff --git a/third_party/proto/cosmos/evidence/v1beta1/evidence.proto b/third_party/proto/cosmos/evidence/v1beta1/evidence.proto index 14612c31..83f9ec3d 100644 --- a/third_party/proto/cosmos/evidence/v1beta1/evidence.proto +++ b/third_party/proto/cosmos/evidence/v1beta1/evidence.proto @@ -6,6 +6,7 @@ option (gogoproto.equal_all) = true; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; +import "cosmos_proto/cosmos.proto"; // Equivocation implements the Evidence interface and defines evidence of double // signing misbehavior. @@ -17,5 +18,5 @@ message Equivocation { int64 height = 1; google.protobuf.Timestamp time = 2 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; int64 power = 3; - string consensus_address = 4 [(gogoproto.moretags) = "yaml:\"consensus_address\""]; + string consensus_address = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } \ No newline at end of file diff --git a/third_party/proto/cosmos/evidence/v1beta1/tx.proto b/third_party/proto/cosmos/evidence/v1beta1/tx.proto index 38795f25..223f7e11 100644 --- a/third_party/proto/cosmos/evidence/v1beta1/tx.proto +++ b/third_party/proto/cosmos/evidence/v1beta1/tx.proto @@ -7,6 +7,7 @@ option (gogoproto.equal_all) = true; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; import "cosmos_proto/cosmos.proto"; +import "cosmos/msg/v1/msg.proto"; // Msg defines the evidence Msg service. service Msg { @@ -18,10 +19,12 @@ service Msg { // MsgSubmitEvidence represents a message that supports submitting arbitrary // Evidence of misbehavior such as equivocation or counterfactual signing. message MsgSubmitEvidence { + option (cosmos.msg.v1.signer) = "submitter"; + option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; - string submitter = 1; + string submitter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; google.protobuf.Any evidence = 2 [(cosmos_proto.accepts_interface) = "Evidence"]; } diff --git a/third_party/proto/cosmos/feegrant/v1beta1/feegrant.proto b/third_party/proto/cosmos/feegrant/v1beta1/feegrant.proto index a86691f9..ec4e7a1e 100644 --- a/third_party/proto/cosmos/feegrant/v1beta1/feegrant.proto +++ b/third_party/proto/cosmos/feegrant/v1beta1/feegrant.proto @@ -11,13 +11,13 @@ 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 +// BasicAllowance implements Allowance with a one-time grant of coins // 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 + // spend_limit specifies the maximum amount of coins that can be spent + // by this allowance and will be updated as coins are spent. If it is // empty, there is no spend limit and any amount of coins can be spent. repeated cosmos.base.v1beta1.Coin spend_limit = 1 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; @@ -58,7 +58,7 @@ message AllowedMsgAllowance { option (gogoproto.goproto_getters) = false; option (cosmos_proto.implements_interface) = "FeeAllowanceI"; - // allowance can be any of basic and filtered fee allowance. + // allowance can be any of basic and periodic fee allowance. google.protobuf.Any allowance = 1 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"]; // allowed_messages are the messages for which the grantee has the access. @@ -68,11 +68,11 @@ message AllowedMsgAllowance { // 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; + string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // grantee is the address of the user being granted an allowance of another user's funds. - string grantee = 2; + string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // allowance can be any of basic and filtered fee allowance. + // allowance can be any of basic, periodic, allowed fee allowance. google.protobuf.Any allowance = 3 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"]; } diff --git a/third_party/proto/cosmos/feegrant/v1beta1/query.proto b/third_party/proto/cosmos/feegrant/v1beta1/query.proto index 42d7a842..baef7770 100644 --- a/third_party/proto/cosmos/feegrant/v1beta1/query.proto +++ b/third_party/proto/cosmos/feegrant/v1beta1/query.proto @@ -5,6 +5,7 @@ package cosmos.feegrant.v1beta1; import "cosmos/feegrant/v1beta1/feegrant.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; import "google/api/annotations.proto"; +import "cosmos_proto/cosmos.proto"; option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant"; @@ -22,7 +23,8 @@ service Query { } // AllowancesByGranter returns all the grants given by an address - // Since v0.46 + // + // Since: cosmos-sdk 0.46 rpc AllowancesByGranter(QueryAllowancesByGranterRequest) returns (QueryAllowancesByGranterResponse) { option (google.api.http).get = "/cosmos/feegrant/v1beta1/issued/{granter}"; } @@ -31,10 +33,10 @@ service Query { // 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; + string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // grantee is the address of the user being granted an allowance of another user's funds. - string grantee = 2; + string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // QueryAllowanceResponse is the response type for the Query/Allowance RPC method. @@ -45,7 +47,7 @@ message QueryAllowanceResponse { // QueryAllowancesRequest is the request type for the Query/Allowances RPC method. message QueryAllowancesRequest { - string grantee = 1; + string grantee = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // pagination defines an pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; @@ -61,14 +63,18 @@ message QueryAllowancesResponse { } // QueryAllowancesByGranterRequest is the request type for the Query/AllowancesByGranter RPC method. +// +// Since: cosmos-sdk 0.46 message QueryAllowancesByGranterRequest { - string granter = 1; + string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // pagination defines an pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; } // QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC method. +// +// Since: cosmos-sdk 0.46 message QueryAllowancesByGranterResponse { // allowances that have been issued by the granter. repeated cosmos.feegrant.v1beta1.Grant allowances = 1; diff --git a/third_party/proto/cosmos/feegrant/v1beta1/tx.proto b/third_party/proto/cosmos/feegrant/v1beta1/tx.proto index 2d875e92..a12d9aaa 100644 --- a/third_party/proto/cosmos/feegrant/v1beta1/tx.proto +++ b/third_party/proto/cosmos/feegrant/v1beta1/tx.proto @@ -2,9 +2,9 @@ syntax = "proto3"; package cosmos.feegrant.v1beta1; -import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; import "cosmos_proto/cosmos.proto"; +import "cosmos/msg/v1/msg.proto"; option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant"; @@ -23,13 +23,15 @@ service Msg { // MsgGrantAllowance adds permission for Grantee to spend up to Allowance // of fees from the account of Granter. message MsgGrantAllowance { + option (cosmos.msg.v1.signer) = "granter"; + // granter is the address of the user granting an allowance of their funds. - string granter = 1; + string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // grantee is the address of the user being granted an allowance of another user's funds. - string grantee = 2; + string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // allowance can be any of basic and filtered fee allowance. + // allowance can be any of basic, periodic, allowed fee allowance. google.protobuf.Any allowance = 3 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"]; } @@ -38,11 +40,13 @@ message MsgGrantAllowanceResponse {} // MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. message MsgRevokeAllowance { + option (cosmos.msg.v1.signer) = "granter"; + // granter is the address of the user granting an allowance of their funds. - string granter = 1; + string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // grantee is the address of the user being granted an allowance of another user's funds. - string grantee = 2; + string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. diff --git a/third_party/proto/cosmos/genutil/v1beta1/genesis.proto b/third_party/proto/cosmos/genutil/v1beta1/genesis.proto index a0207793..958d15fe 100644 --- a/third_party/proto/cosmos/genutil/v1beta1/genesis.proto +++ b/third_party/proto/cosmos/genutil/v1beta1/genesis.proto @@ -8,9 +8,5 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/genutil/types"; // GenesisState defines the raw genesis transaction in JSON. message GenesisState { // gen_txs defines the genesis transactions. - repeated bytes gen_txs = 1 [ - (gogoproto.casttype) = "encoding/json.RawMessage", - (gogoproto.jsontag) = "gentxs", - (gogoproto.moretags) = "yaml:\"gentxs\"" - ]; + repeated bytes gen_txs = 1 [(gogoproto.casttype) = "encoding/json.RawMessage", (gogoproto.jsontag) = "gentxs"]; } diff --git a/third_party/proto/cosmos/gov/v1/genesis.proto b/third_party/proto/cosmos/gov/v1/genesis.proto new file mode 100644 index 00000000..cb44a7f3 --- /dev/null +++ b/third_party/proto/cosmos/gov/v1/genesis.proto @@ -0,0 +1,26 @@ +// Since: cosmos-sdk 0.46 +syntax = "proto3"; + +package cosmos.gov.v1; + +import "cosmos/gov/v1/gov.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types/v1"; + +// GenesisState defines the gov module's genesis state. +message GenesisState { + // starting_proposal_id is the ID of the starting proposal. + uint64 starting_proposal_id = 1; + // deposits defines all the deposits present at genesis. + repeated Deposit deposits = 2; + // votes defines all the votes present at genesis. + repeated Vote votes = 3; + // proposals defines all the proposals present at genesis. + repeated Proposal proposals = 4; + // params defines all the paramaters of related to deposit. + DepositParams deposit_params = 5; + // params defines all the paramaters of related to voting. + VotingParams voting_params = 6; + // params defines all the paramaters of related to tally. + TallyParams tally_params = 7; +} diff --git a/third_party/proto/cosmos/gov/v1/gov.proto b/third_party/proto/cosmos/gov/v1/gov.proto new file mode 100644 index 00000000..8a857233 --- /dev/null +++ b/third_party/proto/cosmos/gov/v1/gov.proto @@ -0,0 +1,132 @@ +// Since: cosmos-sdk 0.46 +syntax = "proto3"; +package cosmos.gov.v1; + +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/any.proto"; +import "google/protobuf/duration.proto"; +import "cosmos_proto/cosmos.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types/v1"; + +// VoteOption enumerates the valid vote options for a given governance proposal. +enum VoteOption { + // VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + VOTE_OPTION_UNSPECIFIED = 0; + // VOTE_OPTION_YES defines a yes vote option. + VOTE_OPTION_YES = 1; + // VOTE_OPTION_ABSTAIN defines an abstain vote option. + VOTE_OPTION_ABSTAIN = 2; + // VOTE_OPTION_NO defines a no vote option. + VOTE_OPTION_NO = 3; + // VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + VOTE_OPTION_NO_WITH_VETO = 4; +} + +// WeightedVoteOption defines a unit of vote for vote split. +message WeightedVoteOption { + VoteOption option = 1; + string weight = 2 [(cosmos_proto.scalar) = "cosmos.Dec"]; +} + +// Deposit defines an amount deposited by an account address to an active +// proposal. +message Deposit { + uint64 proposal_id = 1; + string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + repeated cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false]; +} + +// Proposal defines the core field members of a governance proposal. +message Proposal { + uint64 id = 1; + repeated google.protobuf.Any messages = 2; + ProposalStatus status = 3; + // final_tally_result is the final tally result of the proposal. When + // querying a proposal via gRPC, this field is not populated until the + // proposal's voting period has ended. + TallyResult final_tally_result = 4; + google.protobuf.Timestamp submit_time = 5 [(gogoproto.stdtime) = true]; + google.protobuf.Timestamp deposit_end_time = 6 [(gogoproto.stdtime) = true]; + repeated cosmos.base.v1beta1.Coin total_deposit = 7 [(gogoproto.nullable) = false]; + google.protobuf.Timestamp voting_start_time = 8 [(gogoproto.stdtime) = true]; + google.protobuf.Timestamp voting_end_time = 9 [(gogoproto.stdtime) = true]; + + // metadata is any arbitrary metadata attached to the proposal. + string metadata = 10; +} + +// ProposalStatus enumerates the valid statuses of a proposal. +enum ProposalStatus { + // PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. + PROPOSAL_STATUS_UNSPECIFIED = 0; + // PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit + // period. + PROPOSAL_STATUS_DEPOSIT_PERIOD = 1; + // PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting + // period. + PROPOSAL_STATUS_VOTING_PERIOD = 2; + // PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has + // passed. + PROPOSAL_STATUS_PASSED = 3; + // PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has + // been rejected. + PROPOSAL_STATUS_REJECTED = 4; + // PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has + // failed. + PROPOSAL_STATUS_FAILED = 5; +} + +// TallyResult defines a standard tally for a governance proposal. +message TallyResult { + string yes_count = 1 [(cosmos_proto.scalar) = "cosmos.Int"]; + string abstain_count = 2 [(cosmos_proto.scalar) = "cosmos.Int"]; + string no_count = 3 [(cosmos_proto.scalar) = "cosmos.Int"]; + string no_with_veto_count = 4 [(cosmos_proto.scalar) = "cosmos.Int"]; +} + +// Vote defines a vote on a governance proposal. +// A Vote consists of a proposal ID, the voter, and the vote option. +message Vote { + uint64 proposal_id = 1; + string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + reserved 3; + repeated WeightedVoteOption options = 4; + + // metadata is any arbitrary metadata to attached to the vote. + string metadata = 5; +} + +// DepositParams defines the params for deposits on governance proposals. +message DepositParams { + // Minimum deposit for a proposal to enter voting period. + repeated cosmos.base.v1beta1.Coin min_deposit = 1 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "min_deposit,omitempty"]; + + // Maximum period for Atom holders to deposit on a proposal. Initial value: 2 + // months. + google.protobuf.Duration max_deposit_period = 2 + [(gogoproto.stdduration) = true, (gogoproto.jsontag) = "max_deposit_period,omitempty"]; +} + +// VotingParams defines the params for voting on governance proposals. +message VotingParams { + // Length of the voting period. + google.protobuf.Duration voting_period = 1 [(gogoproto.stdduration) = true]; +} + +// TallyParams defines the params for tallying votes on governance proposals. +message TallyParams { + // Minimum percentage of total stake needed to vote for a result to be + // considered valid. + string quorum = 1 [(cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.jsontag) = "quorum,omitempty"]; + + // Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. + string threshold = 2 [(cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.jsontag) = "threshold,omitempty"]; + + // Minimum value of Veto votes to Total votes ratio for proposal to be + // vetoed. Default value: 1/3. + string veto_threshold = 3 [(cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.jsontag) = "veto_threshold,omitempty"]; +} diff --git a/third_party/proto/cosmos/gov/v1/query.proto b/third_party/proto/cosmos/gov/v1/query.proto new file mode 100644 index 00000000..b9d59145 --- /dev/null +++ b/third_party/proto/cosmos/gov/v1/query.proto @@ -0,0 +1,183 @@ + +// Since: cosmos-sdk 0.46 +syntax = "proto3"; +package cosmos.gov.v1; + +import "cosmos/base/query/v1beta1/pagination.proto"; +import "google/api/annotations.proto"; +import "cosmos/gov/v1/gov.proto"; +import "cosmos_proto/cosmos.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types/v1"; + +// Query defines the gRPC querier service for gov module +service Query { + // Proposal queries proposal details based on ProposalID. + rpc Proposal(QueryProposalRequest) returns (QueryProposalResponse) { + option (google.api.http).get = "/cosmos/gov/v1/proposals/{proposal_id}"; + } + + // Proposals queries all proposals based on given status. + rpc Proposals(QueryProposalsRequest) returns (QueryProposalsResponse) { + option (google.api.http).get = "/cosmos/gov/v1/proposals"; + } + + // Vote queries voted information based on proposalID, voterAddr. + rpc Vote(QueryVoteRequest) returns (QueryVoteResponse) { + option (google.api.http).get = "/cosmos/gov/v1/proposals/{proposal_id}/votes/{voter}"; + } + + // Votes queries votes of a given proposal. + rpc Votes(QueryVotesRequest) returns (QueryVotesResponse) { + option (google.api.http).get = "/cosmos/gov/v1/proposals/{proposal_id}/votes"; + } + + // Params queries all parameters of the gov module. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/cosmos/gov/v1/params/{params_type}"; + } + + // Deposit queries single deposit information based proposalID, depositAddr. + rpc Deposit(QueryDepositRequest) returns (QueryDepositResponse) { + option (google.api.http).get = "/cosmos/gov/v1/proposals/{proposal_id}/deposits/{depositor}"; + } + + // Deposits queries all deposits of a single proposal. + rpc Deposits(QueryDepositsRequest) returns (QueryDepositsResponse) { + option (google.api.http).get = "/cosmos/gov/v1/proposals/{proposal_id}/deposits"; + } + + // TallyResult queries the tally of a proposal vote. + rpc TallyResult(QueryTallyResultRequest) returns (QueryTallyResultResponse) { + option (google.api.http).get = "/cosmos/gov/v1/proposals/{proposal_id}/tally"; + } +} + +// QueryProposalRequest is the request type for the Query/Proposal RPC method. +message QueryProposalRequest { + // proposal_id defines the unique id of the proposal. + uint64 proposal_id = 1; +} + +// QueryProposalResponse is the response type for the Query/Proposal RPC method. +message QueryProposalResponse { + Proposal proposal = 1; +} + +// QueryProposalsRequest is the request type for the Query/Proposals RPC method. +message QueryProposalsRequest { + // proposal_status defines the status of the proposals. + ProposalStatus proposal_status = 1; + + // voter defines the voter address for the proposals. + string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // depositor defines the deposit addresses from the proposals. + string depositor = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 4; +} + +// QueryProposalsResponse is the response type for the Query/Proposals RPC +// method. +message QueryProposalsResponse { + repeated Proposal proposals = 1; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryVoteRequest is the request type for the Query/Vote RPC method. +message QueryVoteRequest { + // proposal_id defines the unique id of the proposal. + uint64 proposal_id = 1; + + // voter defines the voter address for the proposals. + string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// QueryVoteResponse is the response type for the Query/Vote RPC method. +message QueryVoteResponse { + // vote defined the queried vote. + Vote vote = 1; +} + +// QueryVotesRequest is the request type for the Query/Votes RPC method. +message QueryVotesRequest { + // proposal_id defines the unique id of the proposal. + uint64 proposal_id = 1; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryVotesResponse is the response type for the Query/Votes RPC method. +message QueryVotesResponse { + // votes defined the queried votes. + repeated Vote votes = 1; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryParamsRequest is the request type for the Query/Params RPC method. +message QueryParamsRequest { + // params_type defines which parameters to query for, can be one of "voting", + // "tallying" or "deposit". + string params_type = 1; +} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +message QueryParamsResponse { + // voting_params defines the parameters related to voting. + VotingParams voting_params = 1; + // deposit_params defines the parameters related to deposit. + DepositParams deposit_params = 2; + // tally_params defines the parameters related to tally. + TallyParams tally_params = 3; +} + +// QueryDepositRequest is the request type for the Query/Deposit RPC method. +message QueryDepositRequest { + // proposal_id defines the unique id of the proposal. + uint64 proposal_id = 1; + + // depositor defines the deposit addresses from the proposals. + string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// QueryDepositResponse is the response type for the Query/Deposit RPC method. +message QueryDepositResponse { + // deposit defines the requested deposit. + Deposit deposit = 1; +} + +// QueryDepositsRequest is the request type for the Query/Deposits RPC method. +message QueryDepositsRequest { + // proposal_id defines the unique id of the proposal. + uint64 proposal_id = 1; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryDepositsResponse is the response type for the Query/Deposits RPC method. +message QueryDepositsResponse { + repeated Deposit deposits = 1; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryTallyResultRequest is the request type for the Query/Tally RPC method. +message QueryTallyResultRequest { + // proposal_id defines the unique id of the proposal. + uint64 proposal_id = 1; +} + +// QueryTallyResultResponse is the response type for the Query/Tally RPC method. +message QueryTallyResultResponse { + // tally defines the requested tally. + TallyResult tally = 1; +} diff --git a/third_party/proto/cosmos/gov/v1/tx.proto b/third_party/proto/cosmos/gov/v1/tx.proto new file mode 100644 index 00000000..9306c51e --- /dev/null +++ b/third_party/proto/cosmos/gov/v1/tx.proto @@ -0,0 +1,100 @@ +// Since: cosmos-sdk 0.46 +syntax = "proto3"; +package cosmos.gov.v1; + +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/gov/v1/gov.proto"; +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "google/protobuf/any.proto"; +import "cosmos/msg/v1/msg.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types/v1"; + +// Msg defines the gov Msg service. +service Msg { + // SubmitProposal defines a method to create new proposal given a content. + rpc SubmitProposal(MsgSubmitProposal) returns (MsgSubmitProposalResponse); + + // ExecLegacyContent defines a Msg to be in included in a MsgSubmitProposal + // to execute a legacy content-based proposal. + rpc ExecLegacyContent(MsgExecLegacyContent) returns (MsgExecLegacyContentResponse); + + // 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); +} + +// MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary +// proposal Content. +message MsgSubmitProposal { + option (cosmos.msg.v1.signer) = "proposer"; + + repeated google.protobuf.Any messages = 1; + repeated cosmos.base.v1beta1.Coin initial_deposit = 2 [(gogoproto.nullable) = false]; + string proposer = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // metadata is any arbitrary metadata attached to the proposal. + string metadata = 4; +} + +// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. +message MsgSubmitProposalResponse { + uint64 proposal_id = 1; +} + +// MsgExecLegacyContent is used to wrap the legacy content field into a message. +// This ensures backwards compatibility with v1beta1.MsgSubmitProposal. +message MsgExecLegacyContent { + option (cosmos.msg.v1.signer) = "authority"; + + // content is the proposal's content. + google.protobuf.Any content = 1 [(cosmos_proto.accepts_interface) = "Content"]; + // authority must be the gov module address. + string authority = 2; +} + +// MsgExecLegacyContentResponse defines the Msg/ExecLegacyContent response type. +message MsgExecLegacyContentResponse {} + +// MsgVote defines a message to cast a vote. +message MsgVote { + option (cosmos.msg.v1.signer) = "voter"; + + uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id"]; + string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + VoteOption option = 3; + string metadata = 4; +} + +// MsgVoteResponse defines the Msg/Vote response type. +message MsgVoteResponse {} + +// MsgVoteWeighted defines a message to cast a vote. +message MsgVoteWeighted { + option (cosmos.msg.v1.signer) = "voter"; + + uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id"]; + string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + repeated WeightedVoteOption options = 3; + string metadata = 4; +} + +// MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. +message MsgVoteWeightedResponse {} + +// MsgDeposit defines a message to submit a deposit to an existing proposal. +message MsgDeposit { + option (cosmos.msg.v1.signer) = "depositor"; + + uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id"]; + string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + repeated cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false]; +} + +// MsgDepositResponse defines the Msg/Deposit response type. +message MsgDepositResponse {} diff --git a/third_party/proto/cosmos/gov/v1beta1/genesis.proto b/third_party/proto/cosmos/gov/v1beta1/genesis.proto index a9995004..be9b07e4 100644 --- a/third_party/proto/cosmos/gov/v1beta1/genesis.proto +++ b/third_party/proto/cosmos/gov/v1beta1/genesis.proto @@ -5,12 +5,12 @@ package cosmos.gov.v1beta1; import "gogoproto/gogo.proto"; import "cosmos/gov/v1beta1/gov.proto"; -option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types"; +option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"; // GenesisState defines the gov module's genesis state. message GenesisState { // starting_proposal_id is the ID of the starting proposal. - uint64 starting_proposal_id = 1 [(gogoproto.moretags) = "yaml:\"starting_proposal_id\""]; + uint64 starting_proposal_id = 1; // deposits defines all the deposits present at genesis. repeated Deposit deposits = 2 [(gogoproto.castrepeated) = "Deposits", (gogoproto.nullable) = false]; // votes defines all the votes present at genesis. @@ -18,9 +18,9 @@ message GenesisState { // proposals defines all the proposals present at genesis. repeated Proposal proposals = 4 [(gogoproto.castrepeated) = "Proposals", (gogoproto.nullable) = false]; // params defines all the paramaters of related to deposit. - DepositParams deposit_params = 5 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"deposit_params\""]; + DepositParams deposit_params = 5 [(gogoproto.nullable) = false]; // params defines all the paramaters of related to voting. - VotingParams voting_params = 6 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"voting_params\""]; + VotingParams voting_params = 6 [(gogoproto.nullable) = false]; // params defines all the paramaters of related to tally. - TallyParams tally_params = 7 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"tally_params\""]; + TallyParams tally_params = 7 [(gogoproto.nullable) = false]; } diff --git a/third_party/proto/cosmos/gov/v1beta1/gov.proto b/third_party/proto/cosmos/gov/v1beta1/gov.proto index 01aebf95..0e65d65b 100644 --- a/third_party/proto/cosmos/gov/v1beta1/gov.proto +++ b/third_party/proto/cosmos/gov/v1beta1/gov.proto @@ -3,12 +3,13 @@ package cosmos.gov.v1beta1; import "cosmos/base/v1beta1/coin.proto"; import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/any.proto"; import "google/protobuf/duration.proto"; +import "cosmos_proto/cosmos.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"; -option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types"; option (gogoproto.goproto_stringer_all) = false; option (gogoproto.stringer_all) = false; option (gogoproto.goproto_getters_all) = false; @@ -35,9 +36,9 @@ enum VoteOption { message WeightedVoteOption { VoteOption option = 1; string weight = 2 [ + (cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"weight\"" + (gogoproto.nullable) = false ]; } @@ -58,8 +59,8 @@ message Deposit { option (gogoproto.goproto_getters) = false; option (gogoproto.equal) = false; - uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""]; - string depositor = 2; + uint64 proposal_id = 1; + string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; repeated cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; } @@ -68,31 +69,26 @@ message Deposit { message Proposal { option (gogoproto.equal) = true; - uint64 proposal_id = 1 [(gogoproto.jsontag) = "id", (gogoproto.moretags) = "yaml:\"id\""]; - google.protobuf.Any content = 2 [(cosmos_proto.accepts_interface) = "Content"]; - ProposalStatus status = 3 [(gogoproto.moretags) = "yaml:\"proposal_status\""]; - TallyResult final_tally_result = 4 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"final_tally_result\""]; - google.protobuf.Timestamp submit_time = 5 - [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"submit_time\""]; - google.protobuf.Timestamp deposit_end_time = 6 - [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"deposit_end_time\""]; - repeated cosmos.base.v1beta1.Coin total_deposit = 7 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.moretags) = "yaml:\"total_deposit\"" - ]; - google.protobuf.Timestamp voting_start_time = 8 - [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"voting_start_time\""]; - google.protobuf.Timestamp voting_end_time = 9 - [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"voting_end_time\""]; + uint64 proposal_id = 1; + google.protobuf.Any content = 2 [(cosmos_proto.accepts_interface) = "Content"]; + ProposalStatus status = 3; + // final_tally_result is the final tally result of the proposal. When + // querying a proposal via gRPC, this field is not populated until the + // proposal's voting period has ended. + TallyResult final_tally_result = 4 [(gogoproto.nullable) = false]; + google.protobuf.Timestamp submit_time = 5 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + google.protobuf.Timestamp deposit_end_time = 6 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + repeated cosmos.base.v1beta1.Coin total_deposit = 7 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + google.protobuf.Timestamp voting_start_time = 8 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + google.protobuf.Timestamp voting_end_time = 9 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; } // ProposalStatus enumerates the valid statuses of a proposal. enum ProposalStatus { option (gogoproto.goproto_enum_prefix) = false; - // PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + // PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. PROPOSAL_STATUS_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "StatusNil"]; // PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit // period. @@ -115,13 +111,25 @@ enum ProposalStatus { message TallyResult { option (gogoproto.equal) = true; - string yes = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; - string abstain = 2 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; - string no = 3 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; - string no_with_veto = 4 [ + string yes = 1 [ + (cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"no_with_veto\"" + (gogoproto.nullable) = false + ]; + string abstain = 2 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; + string no = 3 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; + string no_with_veto = 4 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false ]; } @@ -131,8 +139,8 @@ message Vote { option (gogoproto.goproto_stringer) = false; option (gogoproto.equal) = false; - uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""]; - string voter = 2; + uint64 proposal_id = 1 [(gogoproto.jsontag) = "id"]; + string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // Deprecated: Prefer to use `options` instead. This field is set in queries // if and only if `len(options) == 1` and that option has weight 1. In all // other cases, this field will default to VOTE_OPTION_UNSPECIFIED. @@ -147,7 +155,6 @@ message DepositParams { repeated cosmos.base.v1beta1.Coin min_deposit = 1 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.moretags) = "yaml:\"min_deposit\"", (gogoproto.jsontag) = "min_deposit,omitempty" ]; @@ -156,20 +163,15 @@ message DepositParams { google.protobuf.Duration max_deposit_period = 2 [ (gogoproto.nullable) = false, (gogoproto.stdduration) = true, - (gogoproto.jsontag) = "max_deposit_period,omitempty", - (gogoproto.moretags) = "yaml:\"max_deposit_period\"" + (gogoproto.jsontag) = "max_deposit_period,omitempty" ]; } // VotingParams defines the params for voting on governance proposals. message VotingParams { // Length of the voting period. - google.protobuf.Duration voting_period = 1 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.jsontag) = "voting_period,omitempty", - (gogoproto.moretags) = "yaml:\"voting_period\"" - ]; + google.protobuf.Duration voting_period = 1 + [(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.jsontag) = "voting_period,omitempty"]; } // TallyParams defines the params for tallying votes on governance proposals. @@ -194,7 +196,6 @@ message TallyParams { bytes veto_threshold = 3 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false, - (gogoproto.jsontag) = "veto_threshold,omitempty", - (gogoproto.moretags) = "yaml:\"veto_threshold\"" + (gogoproto.jsontag) = "veto_threshold,omitempty" ]; } diff --git a/third_party/proto/cosmos/gov/v1beta1/query.proto b/third_party/proto/cosmos/gov/v1beta1/query.proto index da62bdba..168e1f5e 100644 --- a/third_party/proto/cosmos/gov/v1beta1/query.proto +++ b/third_party/proto/cosmos/gov/v1beta1/query.proto @@ -5,8 +5,9 @@ import "cosmos/base/query/v1beta1/pagination.proto"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "cosmos/gov/v1beta1/gov.proto"; +import "cosmos_proto/cosmos.proto"; -option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types"; +option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"; // Query defines the gRPC querier service for gov module service Query { @@ -71,10 +72,10 @@ message QueryProposalsRequest { ProposalStatus proposal_status = 1; // voter defines the voter address for the proposals. - string voter = 2; + string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // depositor defines the deposit addresses from the proposals. - string depositor = 3; + string depositor = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 4; @@ -97,8 +98,8 @@ message QueryVoteRequest { // proposal_id defines the unique id of the proposal. uint64 proposal_id = 1; - // voter defines the oter address for the proposals. - string voter = 2; + // voter defines the voter address for the proposals. + string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // QueryVoteResponse is the response type for the Query/Vote RPC method. @@ -151,7 +152,7 @@ message QueryDepositRequest { uint64 proposal_id = 1; // depositor defines the deposit addresses from the proposals. - string depositor = 2; + string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // QueryDepositResponse is the response type for the Query/Deposit RPC method. diff --git a/third_party/proto/cosmos/gov/v1beta1/tx.proto b/third_party/proto/cosmos/gov/v1beta1/tx.proto index 36c0a95d..00ce2253 100644 --- a/third_party/proto/cosmos/gov/v1beta1/tx.proto +++ b/third_party/proto/cosmos/gov/v1beta1/tx.proto @@ -7,7 +7,9 @@ import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; -option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types"; +import "cosmos/msg/v1/msg.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"; // Msg defines the bank Msg service. service Msg { @@ -29,34 +31,35 @@ service Msg { // MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary // proposal Content. message MsgSubmitProposal { + option (cosmos.msg.v1.signer) = "proposer"; + option (gogoproto.equal) = false; option (gogoproto.goproto_stringer) = false; option (gogoproto.stringer) = false; option (gogoproto.goproto_getters) = false; google.protobuf.Any content = 1 [(cosmos_proto.accepts_interface) = "Content"]; - repeated cosmos.base.v1beta1.Coin initial_deposit = 2 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.moretags) = "yaml:\"initial_deposit\"" - ]; - string proposer = 3; + repeated cosmos.base.v1beta1.Coin initial_deposit = 2 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + string proposer = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. message MsgSubmitProposalResponse { - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (gogoproto.moretags) = "yaml:\"proposal_id\""]; + uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id"]; } // MsgVote defines a message to cast a vote. message MsgVote { + option (cosmos.msg.v1.signer) = "voter"; + option (gogoproto.equal) = false; option (gogoproto.goproto_stringer) = false; option (gogoproto.stringer) = false; option (gogoproto.goproto_getters) = false; - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (gogoproto.moretags) = "yaml:\"proposal_id\""]; - string voter = 2; + uint64 proposal_id = 1; + string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; VoteOption option = 3; } @@ -67,13 +70,15 @@ message MsgVoteResponse {} // // Since: cosmos-sdk 0.43 message MsgVoteWeighted { + option (cosmos.msg.v1.signer) = "voter"; + 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; + uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id"]; + string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; repeated WeightedVoteOption options = 3 [(gogoproto.nullable) = false]; } @@ -84,13 +89,15 @@ message MsgVoteWeightedResponse {} // MsgDeposit defines a message to submit a deposit to an existing proposal. message MsgDeposit { + option (cosmos.msg.v1.signer) = "depositor"; + option (gogoproto.equal) = false; option (gogoproto.goproto_stringer) = false; option (gogoproto.stringer) = false; option (gogoproto.goproto_getters) = false; - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (gogoproto.moretags) = "yaml:\"proposal_id\""]; - string depositor = 2; + uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id"]; + string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; repeated cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; } diff --git a/third_party/proto/cosmos/group/v1/events.proto b/third_party/proto/cosmos/group/v1/events.proto new file mode 100644 index 00000000..c2cfe872 --- /dev/null +++ b/third_party/proto/cosmos/group/v1/events.proto @@ -0,0 +1,81 @@ +// Since: cosmos-sdk 0.46 +syntax = "proto3"; + +package cosmos.group.v1; + +import "cosmos_proto/cosmos.proto"; +import "cosmos/group/v1/types.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/group"; + +// EventCreateGroup is an event emitted when a group is created. +message EventCreateGroup { + + // group_id is the unique ID of the group. + uint64 group_id = 1; +} + +// EventUpdateGroup is an event emitted when a group is updated. +message EventUpdateGroup { + + // group_id is the unique ID of the group. + uint64 group_id = 1; +} + +// EventCreateGroupPolicy is an event emitted when a group policy is created. +message EventCreateGroupPolicy { + + // address is the account address of the group policy. + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// EventUpdateGroupPolicy is an event emitted when a group policy is updated. +message EventUpdateGroupPolicy { + + // address is the account address of the group policy. + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// EventSubmitProposal is an event emitted when a proposal is created. +message EventSubmitProposal { + + // proposal_id is the unique ID of the proposal. + uint64 proposal_id = 1; +} + +// EventWithdrawProposal is an event emitted when a proposal is withdrawn. +message EventWithdrawProposal { + + // proposal_id is the unique ID of the proposal. + uint64 proposal_id = 1; +} + +// EventVote is an event emitted when a voter votes on a proposal. +message EventVote { + + // proposal_id is the unique ID of the proposal. + uint64 proposal_id = 1; +} + +// EventExec is an event emitted when a proposal is executed. +message EventExec { + + // proposal_id is the unique ID of the proposal. + uint64 proposal_id = 1; + + // result is the proposal execution result. + ProposalExecutorResult result = 2; + + // logs contains error logs in case the execution result is FAILURE. + string logs = 3; +} + +// EventLeaveGroup is an event emitted when group member leaves the group. +message EventLeaveGroup { + + // group_id is the unique ID of the group. + uint64 group_id = 1; + + // address is the account address of the group member. + string address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} diff --git a/third_party/proto/cosmos/group/v1/genesis.proto b/third_party/proto/cosmos/group/v1/genesis.proto new file mode 100644 index 00000000..e4c895e9 --- /dev/null +++ b/third_party/proto/cosmos/group/v1/genesis.proto @@ -0,0 +1,39 @@ +// Since: cosmos-sdk 0.46 +syntax = "proto3"; + +package cosmos.group.v1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/group"; + +import "cosmos/group/v1/types.proto"; + +// GenesisState defines the group module's genesis state. +message GenesisState { + + // group_seq is the group table orm.Sequence, + // it is used to get the next group ID. + uint64 group_seq = 1; + + // groups is the list of groups info. + repeated GroupInfo groups = 2; + + // group_members is the list of groups members. + repeated GroupMember group_members = 3; + + // group_policy_seq is the group policy table orm.Sequence, + // it is used to generate the next group policy account address. + uint64 group_policy_seq = 4; + + // group_policies is the list of group policies info. + repeated GroupPolicyInfo group_policies = 5; + + // proposal_seq is the proposal table orm.Sequence, + // it is used to get the next proposal ID. + uint64 proposal_seq = 6; + + // proposals is the list of proposals. + repeated Proposal proposals = 7; + + // votes is the list of votes. + repeated Vote votes = 8; +} \ No newline at end of file diff --git a/third_party/proto/cosmos/group/v1/query.proto b/third_party/proto/cosmos/group/v1/query.proto new file mode 100644 index 00000000..51a011a9 --- /dev/null +++ b/third_party/proto/cosmos/group/v1/query.proto @@ -0,0 +1,313 @@ +// Since: cosmos-sdk 0.46 +syntax = "proto3"; + +package cosmos.group.v1; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/group/v1/types.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "cosmos_proto/cosmos.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/group"; + +// Query is the cosmos.group.v1 Query service. +service Query { + + // GroupInfo queries group info based on group id. + rpc GroupInfo(QueryGroupInfoRequest) returns (QueryGroupInfoResponse) { + option (google.api.http).get = "/cosmos/group/v1/group_info/{group_id}"; + }; + + // GroupPolicyInfo queries group policy info based on account address of group policy. + rpc GroupPolicyInfo(QueryGroupPolicyInfoRequest) returns (QueryGroupPolicyInfoResponse) { + option (google.api.http).get = "/cosmos/group/v1/group_policy_info/{address}"; + }; + + // GroupMembers queries members of a group + rpc GroupMembers(QueryGroupMembersRequest) returns (QueryGroupMembersResponse) { + option (google.api.http).get = "/cosmos/group/v1/group_members/{group_id}"; + }; + + // GroupsByAdmin queries groups by admin address. + rpc GroupsByAdmin(QueryGroupsByAdminRequest) returns (QueryGroupsByAdminResponse) { + option (google.api.http).get = "/cosmos/group/v1/groups_by_admin/{admin}"; + }; + + // GroupPoliciesByGroup queries group policies by group id. + rpc GroupPoliciesByGroup(QueryGroupPoliciesByGroupRequest) returns (QueryGroupPoliciesByGroupResponse) { + option (google.api.http).get = "/cosmos/group/v1/group_policies_by_group/{group_id}"; + }; + + // GroupsByAdmin queries group policies by admin address. + rpc GroupPoliciesByAdmin(QueryGroupPoliciesByAdminRequest) returns (QueryGroupPoliciesByAdminResponse) { + option (google.api.http).get = "/cosmos/group/v1/group_policies_by_admin/{admin}"; + }; + + // Proposal queries a proposal based on proposal id. + rpc Proposal(QueryProposalRequest) returns (QueryProposalResponse) { + option (google.api.http).get = "/cosmos/group/v1/proposal/{proposal_id}"; + }; + + // ProposalsByGroupPolicy queries proposals based on account address of group policy. + rpc ProposalsByGroupPolicy(QueryProposalsByGroupPolicyRequest) returns (QueryProposalsByGroupPolicyResponse) { + option (google.api.http).get = "/cosmos/group/v1/proposals_by_group_policy/{address}"; + }; + + // VoteByProposalVoter queries a vote by proposal id and voter. + rpc VoteByProposalVoter(QueryVoteByProposalVoterRequest) returns (QueryVoteByProposalVoterResponse) { + option (google.api.http).get = "/cosmos/group/v1/vote_by_proposal_voter/{proposal_id}/{voter}"; + }; + + // VotesByProposal queries a vote by proposal. + rpc VotesByProposal(QueryVotesByProposalRequest) returns (QueryVotesByProposalResponse) { + option (google.api.http).get = "/cosmos/group/v1/votes_by_proposal/{proposal_id}"; + }; + + // VotesByVoter queries a vote by voter. + rpc VotesByVoter(QueryVotesByVoterRequest) returns (QueryVotesByVoterResponse) { + option (google.api.http).get = "/cosmos/group/v1/votes_by_voter/{voter}"; + }; + + // GroupsByMember queries groups by member address. + rpc GroupsByMember(QueryGroupsByMemberRequest) returns (QueryGroupsByMemberResponse) { + option (google.api.http).get = "/cosmos/group/v1/groups_by_member/{address}"; + }; + + // TallyResult returns the tally result of a proposal. If the proposal is + // still in voting period, then this query computes the current tally state, + // which might not be final. On the other hand, if the proposal is final, + // then it simply returns the `final_tally_result` state stored in the + // proposal itself. + rpc TallyResult(QueryTallyResultRequest) returns (QueryTallyResultResponse) { + option (google.api.http).get = "/cosmos/group/v1/proposals/{proposal_id}/tally"; + }; +} + +// QueryGroupInfoRequest is the Query/GroupInfo request type. +message QueryGroupInfoRequest { + + // group_id is the unique ID of the group. + uint64 group_id = 1; +} + +// QueryGroupInfoResponse is the Query/GroupInfo response type. +message QueryGroupInfoResponse { + + // info is the GroupInfo for the group. + GroupInfo info = 1; +} + +// QueryGroupPolicyInfoRequest is the Query/GroupPolicyInfo request type. +message QueryGroupPolicyInfoRequest { + + // address is the account address of the group policy. + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// QueryGroupPolicyInfoResponse is the Query/GroupPolicyInfo response type. +message QueryGroupPolicyInfoResponse { + + // info is the GroupPolicyInfo for the group policy. + GroupPolicyInfo info = 1; +} + +// QueryGroupMembersRequest is the Query/GroupMembers request type. +message QueryGroupMembersRequest { + + // group_id is the unique ID of the group. + uint64 group_id = 1; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryGroupMembersResponse is the Query/GroupMembersResponse response type. +message QueryGroupMembersResponse { + + // members are the members of the group with given group_id. + repeated GroupMember members = 1; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryGroupsByAdminRequest is the Query/GroupsByAdmin request type. +message QueryGroupsByAdminRequest { + + // admin is the account address of a group's admin. + string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryGroupsByAdminResponse is the Query/GroupsByAdminResponse response type. +message QueryGroupsByAdminResponse { + + // groups are the groups info with the provided admin. + repeated GroupInfo groups = 1; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryGroupPoliciesByGroupRequest is the Query/GroupPoliciesByGroup request type. +message QueryGroupPoliciesByGroupRequest { + + // group_id is the unique ID of the group policy's group. + uint64 group_id = 1; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryGroupPoliciesByGroupResponse is the Query/GroupPoliciesByGroup response type. +message QueryGroupPoliciesByGroupResponse { + + // group_policies are the group policies info associated with the provided group. + repeated GroupPolicyInfo group_policies = 1; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryGroupPoliciesByAdminRequest is the Query/GroupPoliciesByAdmin request type. +message QueryGroupPoliciesByAdminRequest { + + // admin is the admin address of the group policy. + string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryGroupPoliciesByAdminResponse is the Query/GroupPoliciesByAdmin response type. +message QueryGroupPoliciesByAdminResponse { + + // group_policies are the group policies info with provided admin. + repeated GroupPolicyInfo group_policies = 1; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryProposalRequest is the Query/Proposal request type. +message QueryProposalRequest { + + // proposal_id is the unique ID of a proposal. + uint64 proposal_id = 1; +} + +// QueryProposalResponse is the Query/Proposal response type. +message QueryProposalResponse { + + // proposal is the proposal info. + Proposal proposal = 1; +} + +// QueryProposalsByGroupPolicyRequest is the Query/ProposalByGroupPolicy request type. +message QueryProposalsByGroupPolicyRequest { + + // address is the account address of the group policy related to proposals. + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryProposalsByGroupPolicyResponse is the Query/ProposalByGroupPolicy response type. +message QueryProposalsByGroupPolicyResponse { + + // proposals are the proposals with given group policy. + repeated Proposal proposals = 1; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryVoteByProposalVoterRequest is the Query/VoteByProposalVoter request type. +message QueryVoteByProposalVoterRequest { + + // proposal_id is the unique ID of a proposal. + uint64 proposal_id = 1; + + // voter is a proposal voter account address. + string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter response type. +message QueryVoteByProposalVoterResponse { + + // vote is the vote with given proposal_id and voter. + Vote vote = 1; +} + +// QueryVotesByProposalRequest is the Query/VotesByProposal request type. +message QueryVotesByProposalRequest { + + // proposal_id is the unique ID of a proposal. + uint64 proposal_id = 1; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryVotesByProposalResponse is the Query/VotesByProposal response type. +message QueryVotesByProposalResponse { + + // votes are the list of votes for given proposal_id. + repeated Vote votes = 1; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryVotesByVoterRequest is the Query/VotesByVoter request type. +message QueryVotesByVoterRequest { + // voter is a proposal voter account address. + string voter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryVotesByVoterResponse is the Query/VotesByVoter response type. +message QueryVotesByVoterResponse { + + // votes are the list of votes by given voter. + repeated Vote votes = 1; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryGroupsByMemberRequest is the Query/GroupsByMember request type. +message QueryGroupsByMemberRequest { + // address is the group member address. + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryGroupsByMemberResponse is the Query/GroupsByMember response type. +message QueryGroupsByMemberResponse { + // groups are the groups info with the provided group member. + repeated GroupInfo groups = 1; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryTallyResultRequest is the Query/TallyResult request type. +message QueryTallyResultRequest { + // proposal_id is the unique id of a proposal. + uint64 proposal_id = 1; +} + +// QueryTallyResultResponse is the Query/TallyResult response type. +message QueryTallyResultResponse { + // tally defines the requested tally. + TallyResult tally = 1 [(gogoproto.nullable) = false]; +} diff --git a/third_party/proto/cosmos/group/v1/tx.proto b/third_party/proto/cosmos/group/v1/tx.proto new file mode 100644 index 00000000..1983d31b --- /dev/null +++ b/third_party/proto/cosmos/group/v1/tx.proto @@ -0,0 +1,373 @@ +// Since: cosmos-sdk 0.46 +syntax = "proto3"; + +package cosmos.group.v1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/group"; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "google/protobuf/any.proto"; +import "cosmos/group/v1/types.proto"; + +import "cosmos/msg/v1/msg.proto"; + +// Msg is the cosmos.group.v1 Msg service. +service Msg { + + // CreateGroup creates a new group with an admin account address, a list of members and some optional metadata. + rpc CreateGroup(MsgCreateGroup) returns (MsgCreateGroupResponse); + + // UpdateGroupMembers updates the group members with given group id and admin address. + rpc UpdateGroupMembers(MsgUpdateGroupMembers) returns (MsgUpdateGroupMembersResponse); + + // UpdateGroupAdmin updates the group admin with given group id and previous admin address. + rpc UpdateGroupAdmin(MsgUpdateGroupAdmin) returns (MsgUpdateGroupAdminResponse); + + // UpdateGroupMetadata updates the group metadata with given group id and admin address. + rpc UpdateGroupMetadata(MsgUpdateGroupMetadata) returns (MsgUpdateGroupMetadataResponse); + + // CreateGroupPolicy creates a new group policy using given DecisionPolicy. + rpc CreateGroupPolicy(MsgCreateGroupPolicy) returns (MsgCreateGroupPolicyResponse); + + // CreateGroupWithPolicy creates a new group with policy. + rpc CreateGroupWithPolicy(MsgCreateGroupWithPolicy) returns (MsgCreateGroupWithPolicyResponse); + + // UpdateGroupPolicyAdmin updates a group policy admin. + rpc UpdateGroupPolicyAdmin(MsgUpdateGroupPolicyAdmin) returns (MsgUpdateGroupPolicyAdminResponse); + + // UpdateGroupPolicyDecisionPolicy allows a group policy's decision policy to be updated. + rpc UpdateGroupPolicyDecisionPolicy(MsgUpdateGroupPolicyDecisionPolicy) + returns (MsgUpdateGroupPolicyDecisionPolicyResponse); + + // UpdateGroupPolicyMetadata updates a group policy metadata. + rpc UpdateGroupPolicyMetadata(MsgUpdateGroupPolicyMetadata) returns (MsgUpdateGroupPolicyMetadataResponse); + + // SubmitProposal submits a new proposal. + rpc SubmitProposal(MsgSubmitProposal) returns (MsgSubmitProposalResponse); + + // WithdrawProposal withdraws a proposal. + rpc WithdrawProposal(MsgWithdrawProposal) returns (MsgWithdrawProposalResponse); + + // Vote allows a voter to vote on a proposal. + rpc Vote(MsgVote) returns (MsgVoteResponse); + + // Exec executes a proposal. + rpc Exec(MsgExec) returns (MsgExecResponse); + + // LeaveGroup allows a group member to leave the group. + rpc LeaveGroup(MsgLeaveGroup) returns (MsgLeaveGroupResponse); +} + +// +// Groups +// + +// MsgCreateGroup is the Msg/CreateGroup request type. +message MsgCreateGroup { + option (cosmos.msg.v1.signer) = "admin"; + + // admin is the account address of the group admin. + string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // members defines the group members. + repeated MemberRequest members = 2 [(gogoproto.nullable) = false]; + + // metadata is any arbitrary metadata to attached to the group. + string metadata = 3; +} + +// MsgCreateGroupResponse is the Msg/CreateGroup response type. +message MsgCreateGroupResponse { + + // group_id is the unique ID of the newly created group. + uint64 group_id = 1; +} + +// MsgUpdateGroupMembers is the Msg/UpdateGroupMembers request type. +message MsgUpdateGroupMembers { + option (cosmos.msg.v1.signer) = "admin"; + + // admin is the account address of the group admin. + string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // group_id is the unique ID of the group. + uint64 group_id = 2; + + // member_updates is the list of members to update, + // set weight to 0 to remove a member. + repeated MemberRequest member_updates = 3 [(gogoproto.nullable) = false]; +} + +// MsgUpdateGroupMembersResponse is the Msg/UpdateGroupMembers response type. +message MsgUpdateGroupMembersResponse {} + +// MsgUpdateGroupAdmin is the Msg/UpdateGroupAdmin request type. +message MsgUpdateGroupAdmin { + option (cosmos.msg.v1.signer) = "admin"; + + // admin is the current account address of the group admin. + string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // group_id is the unique ID of the group. + uint64 group_id = 2; + + // new_admin is the group new admin account address. + string new_admin = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// MsgUpdateGroupAdminResponse is the Msg/UpdateGroupAdmin response type. +message MsgUpdateGroupAdminResponse {} + +// MsgUpdateGroupMetadata is the Msg/UpdateGroupMetadata request type. +message MsgUpdateGroupMetadata { + option (cosmos.msg.v1.signer) = "admin"; + + // admin is the account address of the group admin. + string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // group_id is the unique ID of the group. + uint64 group_id = 2; + + // metadata is the updated group's metadata. + string metadata = 3; +} + +// MsgUpdateGroupMetadataResponse is the Msg/UpdateGroupMetadata response type. +message MsgUpdateGroupMetadataResponse {} + +// +// Group Policies +// + +// MsgCreateGroupPolicy is the Msg/CreateGroupPolicy request type. +message MsgCreateGroupPolicy { + option (cosmos.msg.v1.signer) = "admin"; + + option (gogoproto.goproto_getters) = false; + + // admin is the account address of the group admin. + string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // group_id is the unique ID of the group. + uint64 group_id = 2; + + // metadata is any arbitrary metadata attached to the group policy. + string metadata = 3; + + // decision_policy specifies the group policy's decision policy. + google.protobuf.Any decision_policy = 4 [(cosmos_proto.accepts_interface) = "cosmos.group.v1.DecisionPolicy"]; +} + +// MsgCreateGroupPolicyResponse is the Msg/CreateGroupPolicy response type. +message MsgCreateGroupPolicyResponse { + + // address is the account address of the newly created group policy. + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// MsgUpdateGroupPolicyAdmin is the Msg/UpdateGroupPolicyAdmin request type. +message MsgUpdateGroupPolicyAdmin { + option (cosmos.msg.v1.signer) = "admin"; + + // admin is the account address of the group admin. + string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // group_policy_address is the account address of the group policy. + string group_policy_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // new_admin is the new group policy admin. + string new_admin = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// MsgCreateGroupWithPolicy is the Msg/CreateGroupWithPolicy request type. +message MsgCreateGroupWithPolicy { + option (cosmos.msg.v1.signer) = "admin"; + option (gogoproto.goproto_getters) = false; + + // admin is the account address of the group and group policy admin. + string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // members defines the group members. + repeated MemberRequest members = 2 [(gogoproto.nullable) = false]; + + // group_metadata is any arbitrary metadata attached to the group. + string group_metadata = 3; + + // group_policy_metadata is any arbitrary metadata attached to the group policy. + string group_policy_metadata = 4; + + // group_policy_as_admin is a boolean field, if set to true, the group policy account address will be used as group + // and group policy admin. + bool group_policy_as_admin = 5; + + // decision_policy specifies the group policy's decision policy. + google.protobuf.Any decision_policy = 6 [(cosmos_proto.accepts_interface) = "cosmos.group.v1.DecisionPolicy"]; +} + +// MsgCreateGroupWithPolicyResponse is the Msg/CreateGroupWithPolicy response type. +message MsgCreateGroupWithPolicyResponse { + + // group_id is the unique ID of the newly created group with policy. + uint64 group_id = 1; + + // group_policy_address is the account address of the newly created group policy. + string group_policy_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// MsgUpdateGroupPolicyAdminResponse is the Msg/UpdateGroupPolicyAdmin response type. +message MsgUpdateGroupPolicyAdminResponse {} + +// MsgUpdateGroupPolicyDecisionPolicy is the Msg/UpdateGroupPolicyDecisionPolicy request type. +message MsgUpdateGroupPolicyDecisionPolicy { + option (cosmos.msg.v1.signer) = "admin"; + + option (gogoproto.goproto_getters) = false; + + // admin is the account address of the group admin. + string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // group_policy_address is the account address of group policy. + string group_policy_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // decision_policy is the updated group policy's decision policy. + google.protobuf.Any decision_policy = 3 [(cosmos_proto.accepts_interface) = "cosmos.group.v1.DecisionPolicy"]; +} + +// MsgUpdateGroupPolicyDecisionPolicyResponse is the Msg/UpdateGroupPolicyDecisionPolicy response type. +message MsgUpdateGroupPolicyDecisionPolicyResponse {} + +// MsgUpdateGroupPolicyMetadata is the Msg/UpdateGroupPolicyMetadata request type. +message MsgUpdateGroupPolicyMetadata { + option (cosmos.msg.v1.signer) = "admin"; + + // admin is the account address of the group admin. + string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // group_policy_address is the account address of group policy. + string group_policy_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // metadata is the updated group policy metadata. + string metadata = 3; +} + +// MsgUpdateGroupPolicyMetadataResponse is the Msg/UpdateGroupPolicyMetadata response type. +message MsgUpdateGroupPolicyMetadataResponse {} + +// +// Proposals and Voting +// + +// Exec defines modes of execution of a proposal on creation or on new vote. +enum Exec { + + // An empty value means that there should be a separate + // MsgExec request for the proposal to execute. + EXEC_UNSPECIFIED = 0; + + // Try to execute the proposal immediately. + // If the proposal is not allowed per the DecisionPolicy, + // the proposal will still be open and could + // be executed at a later point. + EXEC_TRY = 1; +} + +// MsgSubmitProposal is the Msg/SubmitProposal request type. +message MsgSubmitProposal { + option (cosmos.msg.v1.signer) = "proposers"; + + option (gogoproto.goproto_getters) = false; + + // group_policy_address is the account address of group policy. + string group_policy_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // proposers are the account addresses of the proposers. + // Proposers signatures will be counted as yes votes. + repeated string proposers = 2; + + // metadata is any arbitrary metadata to attached to the proposal. + string metadata = 3; + + // messages is a list of `sdk.Msg`s that will be executed if the proposal passes. + repeated google.protobuf.Any messages = 4; + + // exec defines the mode of execution of the proposal, + // whether it should be executed immediately on creation or not. + // If so, proposers signatures are considered as Yes votes. + Exec exec = 5; +} + +// MsgSubmitProposalResponse is the Msg/SubmitProposal response type. +message MsgSubmitProposalResponse { + + // proposal is the unique ID of the proposal. + uint64 proposal_id = 1; +} + +// MsgWithdrawProposal is the Msg/WithdrawProposal request type. +message MsgWithdrawProposal { + option (cosmos.msg.v1.signer) = "address"; + + // proposal is the unique ID of the proposal. + uint64 proposal_id = 1; + + // address is the admin of the group policy or one of the proposer of the proposal. + string address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// MsgWithdrawProposalResponse is the Msg/WithdrawProposal response type. +message MsgWithdrawProposalResponse {} + +// MsgVote is the Msg/Vote request type. +message MsgVote { + option (cosmos.msg.v1.signer) = "voter"; + + // proposal is the unique ID of the proposal. + uint64 proposal_id = 1; + // voter is the voter account address. + string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // option is the voter's choice on the proposal. + VoteOption option = 3; + + // metadata is any arbitrary metadata to attached to the vote. + string metadata = 4; + + // exec defines whether the proposal should be executed + // immediately after voting or not. + Exec exec = 5; +} + +// MsgVoteResponse is the Msg/Vote response type. +message MsgVoteResponse {} + +// MsgExec is the Msg/Exec request type. +message MsgExec { + option (cosmos.msg.v1.signer) = "signer"; + + // proposal is the unique ID of the proposal. + uint64 proposal_id = 1; + + // executor is the account address used to execute the proposal. + string executor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// MsgExecResponse is the Msg/Exec request type. +message MsgExecResponse { + // result is the final result of the proposal execution. + ProposalExecutorResult result = 2; +} + +// MsgLeaveGroup is the Msg/LeaveGroup request type. +message MsgLeaveGroup { + option (cosmos.msg.v1.signer) = "address"; + + // address is the account address of the group member. + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // group_id is the unique ID of the group. + uint64 group_id = 2; +} + +// MsgLeaveGroupResponse is the Msg/LeaveGroup response type. +message MsgLeaveGroupResponse {} diff --git a/third_party/proto/cosmos/group/v1/types.proto b/third_party/proto/cosmos/group/v1/types.proto new file mode 100644 index 00000000..83727154 --- /dev/null +++ b/third_party/proto/cosmos/group/v1/types.proto @@ -0,0 +1,317 @@ +// Since: cosmos-sdk 0.46 +syntax = "proto3"; + +package cosmos.group.v1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/group"; + +import "gogoproto/gogo.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "cosmos_proto/cosmos.proto"; +import "google/protobuf/any.proto"; + +// Member represents a group member with an account address, +// non-zero weight, metadata and added_at timestamp. +message Member { + + // address is the member's account address. + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // weight is the member's voting weight that should be greater than 0. + string weight = 2; + + // metadata is any arbitrary metadata attached to the member. + string metadata = 3; + + // added_at is a timestamp specifying when a member was added. + google.protobuf.Timestamp added_at = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; +} + +// MemberRequest represents a group member to be used in Msg server requests. +// Contrary to `Member`, it doesn't have any `added_at` field +// since this field cannot be set as part of requests. +message MemberRequest { + + // address is the member's account address. + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // weight is the member's voting weight that should be greater than 0. + string weight = 2; + + // metadata is any arbitrary metadata attached to the member. + string metadata = 3; +} + +// ThresholdDecisionPolicy is a decision policy where a proposal passes when it +// satisfies the two following conditions: +// 1. The sum of all `YES` voters' weights is greater or equal than the defined +// `threshold`. +// 2. The voting and execution periods of the proposal respect the parameters +// given by `windows`. +message ThresholdDecisionPolicy { + option (cosmos_proto.implements_interface) = "DecisionPolicy"; + + // threshold is the minimum weighted sum of `YES` votes that must be met or + // exceeded for a proposal to succeed. + string threshold = 1; + + // windows defines the different windows for voting and execution. + DecisionPolicyWindows windows = 2; +} + +// PercentageDecisionPolicy is a decision policy where a proposal passes when +// it satisfies the two following conditions: +// 1. The percentage of all `YES` voters' weights out of the total group weight +// is greater or equal than the given `percentage`. +// 2. The voting and execution periods of the proposal respect the parameters +// given by `windows`. +message PercentageDecisionPolicy { + option (cosmos_proto.implements_interface) = "DecisionPolicy"; + + // percentage is the minimum percentage the weighted sum of `YES` votes must + // meet for a proposal to succeed. + string percentage = 1; + + // windows defines the different windows for voting and execution. + DecisionPolicyWindows windows = 2; +} + +// DecisionPolicyWindows defines the different windows for voting and execution. +message DecisionPolicyWindows { + // voting_period is the duration from submission of a proposal to the end of voting period + // Within this times votes can be submitted with MsgVote. + google.protobuf.Duration voting_period = 1 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; + + // min_execution_period is the minimum duration after the proposal submission + // where members can start sending MsgExec. This means that the window for + // sending a MsgExec transaction is: + // `[ submission + min_execution_period ; submission + voting_period + max_execution_period]` + // where max_execution_period is a app-specific config, defined in the keeper. + // If not set, min_execution_period will default to 0. + // + // Please make sure to set a `min_execution_period` that is smaller than + // `voting_period + max_execution_period`, or else the above execution window + // is empty, meaning that all proposals created with this decision policy + // won't be able to be executed. + google.protobuf.Duration min_execution_period = 2 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; +} + +// VoteOption enumerates the valid vote options for a given proposal. +enum VoteOption { + option (gogoproto.goproto_enum_prefix) = false; + + // VOTE_OPTION_UNSPECIFIED defines an unspecified vote option which will + // return an error. + VOTE_OPTION_UNSPECIFIED = 0; + // VOTE_OPTION_YES defines a yes vote option. + VOTE_OPTION_YES = 1; + // VOTE_OPTION_ABSTAIN defines an abstain vote option. + VOTE_OPTION_ABSTAIN = 2; + // VOTE_OPTION_NO defines a no vote option. + VOTE_OPTION_NO = 3; + // VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + VOTE_OPTION_NO_WITH_VETO = 4; +} + +// +// State +// + +// GroupInfo represents the high-level on-chain information for a group. +message GroupInfo { + + // id is the unique ID of the group. + uint64 id = 1; + + // admin is the account address of the group's admin. + string admin = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // metadata is any arbitrary metadata to attached to the group. + string metadata = 3; + + // version is used to track changes to a group's membership structure that + // would break existing proposals. Whenever any members weight is changed, + // or any member is added or removed this version is incremented and will + // cause proposals based on older versions of this group to fail + uint64 version = 4; + + // total_weight is the sum of the group members' weights. + string total_weight = 5; + + // created_at is a timestamp specifying when a group was created. + google.protobuf.Timestamp created_at = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; +} + +// GroupMember represents the relationship between a group and a member. +message GroupMember { + + // group_id is the unique ID of the group. + uint64 group_id = 1; + + // member is the member data. + Member member = 2; +} + +// GroupPolicyInfo represents the high-level on-chain information for a group policy. +message GroupPolicyInfo { + option (gogoproto.equal) = true; + option (gogoproto.goproto_getters) = false; + + // address is the account address of group policy. + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // group_id is the unique ID of the group. + uint64 group_id = 2; + + // admin is the account address of the group admin. + string admin = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // metadata is any arbitrary metadata to attached to the group policy. + string metadata = 4; + + // version is used to track changes to a group's GroupPolicyInfo structure that + // would create a different result on a running proposal. + uint64 version = 5; + + // decision_policy specifies the group policy's decision policy. + google.protobuf.Any decision_policy = 6 [(cosmos_proto.accepts_interface) = "cosmos.group.v1.DecisionPolicy"]; + + // created_at is a timestamp specifying when a group policy was created. + google.protobuf.Timestamp created_at = 7 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; +} + +// Proposal defines a group proposal. Any member of a group can submit a proposal +// for a group policy to decide upon. +// A proposal consists of a set of `sdk.Msg`s that will be executed if the proposal +// passes as well as some optional metadata associated with the proposal. +message Proposal { + option (gogoproto.goproto_getters) = false; + + // id is the unique id of the proposal. + uint64 id = 1; + + // group_policy_address is the account address of group policy. + string group_policy_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // metadata is any arbitrary metadata to attached to the proposal. + string metadata = 3; + + // proposers are the account addresses of the proposers. + repeated string proposers = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // submit_time is a timestamp specifying when a proposal was submitted. + google.protobuf.Timestamp submit_time = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + + // group_version tracks the version of the group at proposal submission. + // This field is here for informational purposes only. + uint64 group_version = 6; + + // group_policy_version tracks the version of the group policy at proposal submission. + // When a decision policy is changed, existing proposals from previous policy + // versions will become invalid with the `ABORTED` status. + // This field is here for informational purposes only. + uint64 group_policy_version = 7; + + // status represents the high level position in the life cycle of the proposal. Initial value is Submitted. + ProposalStatus status = 8; + + // final_tally_result contains the sums of all weighted votes for this + // proposal for each vote option. It is empty at submission, and only + // populated after tallying, at voting period end or at proposal execution, + // whichever happens first. + TallyResult final_tally_result = 9 [(gogoproto.nullable) = false]; + + // voting_period_end is the timestamp before which voting must be done. + // Unless a successfull MsgExec is called before (to execute a proposal whose + // tally is successful before the voting period ends), tallying will be done + // at this point, and the `final_tally_result`and `status` fields will be + // accordingly updated. + google.protobuf.Timestamp voting_period_end = 10 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + + // executor_result is the final result of the proposal execution. Initial value is NotRun. + ProposalExecutorResult executor_result = 11; + + // messages is a list of `sdk.Msg`s that will be executed if the proposal passes. + repeated google.protobuf.Any messages = 12; +} + +// ProposalStatus defines proposal statuses. +enum ProposalStatus { + option (gogoproto.goproto_enum_prefix) = false; + + // An empty value is invalid and not allowed. + PROPOSAL_STATUS_UNSPECIFIED = 0; + + // Initial status of a proposal when submitted. + PROPOSAL_STATUS_SUBMITTED = 1; + + // Final status of a proposal when the final tally is done and the outcome + // passes the group policy's decision policy. + PROPOSAL_STATUS_ACCEPTED = 2; + + // Final status of a proposal when the final tally is done and the outcome + // is rejected by the group policy's decision policy. + PROPOSAL_STATUS_REJECTED = 3; + + // Final status of a proposal when the group policy is modified before the + // final tally. + PROPOSAL_STATUS_ABORTED = 4; + + // A proposal can be withdrawn before the voting start time by the owner. + // When this happens the final status is Withdrawn. + PROPOSAL_STATUS_WITHDRAWN = 5; +} + +// ProposalExecutorResult defines types of proposal executor results. +enum ProposalExecutorResult { + option (gogoproto.goproto_enum_prefix) = false; + + // An empty value is not allowed. + PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED = 0; + + // We have not yet run the executor. + PROPOSAL_EXECUTOR_RESULT_NOT_RUN = 1; + + // The executor was successful and proposed action updated state. + PROPOSAL_EXECUTOR_RESULT_SUCCESS = 2; + + // The executor returned an error and proposed action didn't update state. + PROPOSAL_EXECUTOR_RESULT_FAILURE = 3; +} + +// TallyResult represents the sum of weighted votes for each vote option. +message TallyResult { + option (gogoproto.goproto_getters) = false; + + // yes_count is the weighted sum of yes votes. + string yes_count = 1; + + // abstain_count is the weighted sum of abstainers. + string abstain_count = 2; + + // no_count is the weighted sum of no votes. + string no_count = 3; + + // no_with_veto_count is the weighted sum of veto. + string no_with_veto_count = 4; +} + +// Vote represents a vote for a proposal. +message Vote { + + // proposal is the unique ID of the proposal. + uint64 proposal_id = 1; + + // voter is the account address of the voter. + string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // option is the voter's choice on the proposal. + VoteOption option = 3; + + // metadata is any arbitrary metadata to attached to the vote. + string metadata = 4; + + // submit_time is the timestamp when the vote was submitted. + google.protobuf.Timestamp submit_time = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; +} diff --git a/third_party/proto/cosmos/mint/v1beta1/mint.proto b/third_party/proto/cosmos/mint/v1beta1/mint.proto index f94d4ae2..9cfe2b76 100644 --- a/third_party/proto/cosmos/mint/v1beta1/mint.proto +++ b/third_party/proto/cosmos/mint/v1beta1/mint.proto @@ -4,15 +4,19 @@ package cosmos.mint.v1beta1; option go_package = "github.com/cosmos/cosmos-sdk/x/mint/types"; import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; // Minter represents the minting state. message Minter { // current annual inflation rate - string inflation = 1 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + string inflation = 1 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; // current annual expected provisions string annual_provisions = 2 [ - (gogoproto.moretags) = "yaml:\"annual_provisions\"", + (cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false ]; @@ -26,28 +30,28 @@ message Params { string mint_denom = 1; // maximum annual change in inflation rate string inflation_rate_change = 2 [ - (gogoproto.moretags) = "yaml:\"inflation_rate_change\"", + (cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false ]; // maximum inflation rate string inflation_max = 3 [ - (gogoproto.moretags) = "yaml:\"inflation_max\"", + (cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false ]; // minimum inflation rate string inflation_min = 4 [ - (gogoproto.moretags) = "yaml:\"inflation_min\"", + (cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false ]; // goal of percent bonded atoms string goal_bonded = 5 [ - (gogoproto.moretags) = "yaml:\"goal_bonded\"", + (cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false ]; // expected blocks per year - uint64 blocks_per_year = 6 [(gogoproto.moretags) = "yaml:\"blocks_per_year\""]; + uint64 blocks_per_year = 6; } diff --git a/third_party/proto/cosmos/msg/v1/msg.proto b/third_party/proto/cosmos/msg/v1/msg.proto new file mode 100644 index 00000000..89bdf312 --- /dev/null +++ b/third_party/proto/cosmos/msg/v1/msg.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; + +package cosmos.msg.v1; + +import "google/protobuf/descriptor.proto"; + +// TODO(fdymylja): once we fully migrate to protov2 the go_package needs to be updated. +// We need this right now because gogoproto codegen needs to import the extension. +option go_package = "github.com/cosmos/cosmos-sdk/types/msgservice"; + +extend google.protobuf.MessageOptions { + // signer must be used in cosmos messages in order + // to signal to external clients which fields in a + // given cosmos message must be filled with signer + // information (address). + // The field must be the protobuf name of the message + // field extended with this MessageOption. + // The field must either be of string kind, or of message + // kind in case the signer information is contained within + // a message inside the cosmos message. + repeated string signer = 11110000; +} \ No newline at end of file diff --git a/third_party/proto/cosmos/nft/v1beta1/event.proto b/third_party/proto/cosmos/nft/v1beta1/event.proto new file mode 100644 index 00000000..96964f08 --- /dev/null +++ b/third_party/proto/cosmos/nft/v1beta1/event.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; +package cosmos.nft.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/nft"; + +// EventSend is emitted on Msg/Send +message EventSend { + string class_id = 1; + string id = 2; + string sender = 3; + string receiver = 4; +} + +// EventMint is emitted on Mint +message EventMint { + string class_id = 1; + string id = 2; + string owner = 3; +} + +// EventBurn is emitted on Burn +message EventBurn { + string class_id = 1; + string id = 2; + string owner = 3; +} diff --git a/third_party/proto/cosmos/nft/v1beta1/genesis.proto b/third_party/proto/cosmos/nft/v1beta1/genesis.proto new file mode 100644 index 00000000..6f36ed34 --- /dev/null +++ b/third_party/proto/cosmos/nft/v1beta1/genesis.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; +package cosmos.nft.v1beta1; + +import "cosmos/nft/v1beta1/nft.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/nft"; + +// GenesisState defines the nft module's genesis state. +message GenesisState { + // class defines the class of the nft type. + repeated cosmos.nft.v1beta1.Class classes = 1; + repeated Entry entries = 2; +} + +// Entry Defines all nft owned by a person +message Entry { + // owner is the owner address of the following nft + string owner = 1; + + // nfts is a group of nfts of the same owner + repeated cosmos.nft.v1beta1.NFT nfts = 2; +} diff --git a/third_party/proto/cosmos/nft/v1beta1/nft.proto b/third_party/proto/cosmos/nft/v1beta1/nft.proto new file mode 100644 index 00000000..b1241260 --- /dev/null +++ b/third_party/proto/cosmos/nft/v1beta1/nft.proto @@ -0,0 +1,48 @@ +syntax = "proto3"; +package cosmos.nft.v1beta1; + +import "google/protobuf/any.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/nft"; + +// Class defines the class of the nft type. +message Class { + // id defines the unique identifier of the NFT classification, similar to the contract address of ERC721 + string id = 1; + + // name defines the human-readable name of the NFT classification. Optional + string name = 2; + + // symbol is an abbreviated name for nft classification. Optional + string symbol = 3; + + // description is a brief description of nft classification. Optional + string description = 4; + + // uri for the class metadata stored off chain. It can define schema for Class and NFT `Data` attributes. Optional + string uri = 5; + + // uri_hash is a hash of the document pointed by uri. Optional + string uri_hash = 6; + + // data is the app specific metadata of the NFT class. Optional + google.protobuf.Any data = 7; +} + +// NFT defines the NFT. +message NFT { + // class_id associated with the NFT, similar to the contract address of ERC721 + string class_id = 1; + + // id is a unique identifier of the NFT + string id = 2; + + // uri for the NFT metadata stored off chain + string uri = 3; + + // uri_hash is a hash of the document pointed by uri + string uri_hash = 4; + + // data is an app specific data of the NFT. Optional + google.protobuf.Any data = 10; +} diff --git a/third_party/proto/cosmos/nft/v1beta1/query.proto b/third_party/proto/cosmos/nft/v1beta1/query.proto new file mode 100644 index 00000000..c1d8070f --- /dev/null +++ b/third_party/proto/cosmos/nft/v1beta1/query.proto @@ -0,0 +1,125 @@ +syntax = "proto3"; +package cosmos.nft.v1beta1; + +import "cosmos/base/query/v1beta1/pagination.proto"; +import "google/api/annotations.proto"; +import "cosmos/nft/v1beta1/nft.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/nft"; + +// Query defines the gRPC querier service. +service Query { + // Balance queries the number of NFTs of a given class owned by the owner, same as balanceOf in ERC721 + rpc Balance(QueryBalanceRequest) returns (QueryBalanceResponse) { + option (google.api.http).get = "/cosmos/nft/v1beta1/balance/{owner}/{class_id}"; + } + + // Owner queries the owner of the NFT based on its class and id, same as ownerOf in ERC721 + rpc Owner(QueryOwnerRequest) returns (QueryOwnerResponse) { + option (google.api.http).get = "/cosmos/nft/v1beta1/owner/{class_id}/{id}"; + } + + // Supply queries the number of NFTs from the given class, same as totalSupply of ERC721. + rpc Supply(QuerySupplyRequest) returns (QuerySupplyResponse) { + option (google.api.http).get = "/cosmos/nft/v1beta1/supply/{class_id}"; + } + + // NFTs queries all NFTs of a given class or owner,choose at least one of the two, similar to tokenByIndex in + // ERC721Enumerable + rpc NFTs(QueryNFTsRequest) returns (QueryNFTsResponse) { + option (google.api.http).get = "/cosmos/nft/v1beta1/nfts"; + } + + // NFT queries an NFT based on its class and id. + rpc NFT(QueryNFTRequest) returns (QueryNFTResponse) { + option (google.api.http).get = "/cosmos/nft/v1beta1/nfts/{class_id}/{id}"; + } + + // Class queries an NFT class based on its id + rpc Class(QueryClassRequest) returns (QueryClassResponse) { + option (google.api.http).get = "/cosmos/nft/v1beta1/classes/{class_id}"; + } + + // Classes queries all NFT classes + rpc Classes(QueryClassesRequest) returns (QueryClassesResponse) { + option (google.api.http).get = "/cosmos/nft/v1beta1/classes"; + } +} + +// QueryBalanceRequest is the request type for the Query/Balance RPC method +message QueryBalanceRequest { + string class_id = 1; + string owner = 2; +} + +// QueryBalanceResponse is the response type for the Query/Balance RPC method +message QueryBalanceResponse { + uint64 amount = 1; +} + +// QueryOwnerRequest is the request type for the Query/Owner RPC method +message QueryOwnerRequest { + string class_id = 1; + string id = 2; +} + +// QueryOwnerResponse is the response type for the Query/Owner RPC method +message QueryOwnerResponse { + string owner = 1; +} + +// QuerySupplyRequest is the request type for the Query/Supply RPC method +message QuerySupplyRequest { + string class_id = 1; +} + +// QuerySupplyResponse is the response type for the Query/Supply RPC method +message QuerySupplyResponse { + uint64 amount = 1; +} + +// QueryNFTstRequest is the request type for the Query/NFTs RPC method +message QueryNFTsRequest { + string class_id = 1; + string owner = 2; + cosmos.base.query.v1beta1.PageRequest pagination = 3; +} + +// QueryNFTsResponse is the response type for the Query/NFTs RPC methods +message QueryNFTsResponse { + repeated cosmos.nft.v1beta1.NFT nfts = 1; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryNFTRequest is the request type for the Query/NFT RPC method +message QueryNFTRequest { + string class_id = 1; + string id = 2; +} + +// QueryNFTResponse is the response type for the Query/NFT RPC method +message QueryNFTResponse { + cosmos.nft.v1beta1.NFT nft = 1; +} + +// QueryClassRequest is the request type for the Query/Class RPC method +message QueryClassRequest { + string class_id = 1; +} + +// QueryClassResponse is the response type for the Query/Class RPC method +message QueryClassResponse { + cosmos.nft.v1beta1.Class class = 1; +} + +// QueryClassesRequest is the request type for the Query/Classes RPC method +message QueryClassesRequest { + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +// QueryClassesResponse is the response type for the Query/Classes RPC method +message QueryClassesResponse { + repeated cosmos.nft.v1beta1.Class classes = 1; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} diff --git a/third_party/proto/cosmos/nft/v1beta1/tx.proto b/third_party/proto/cosmos/nft/v1beta1/tx.proto new file mode 100644 index 00000000..95b402ce --- /dev/null +++ b/third_party/proto/cosmos/nft/v1beta1/tx.proto @@ -0,0 +1,30 @@ +syntax = "proto3"; +package cosmos.nft.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/nft"; + +import "cosmos/msg/v1/msg.proto"; + +// Msg defines the nft Msg service. +service Msg { + // Send defines a method to send a nft from one account to another account. + rpc Send(MsgSend) returns (MsgSendResponse); +} +// MsgSend represents a message to send a nft from one account to another account. +message MsgSend { + option (cosmos.msg.v1.signer) = "sender"; + + // class_id defines the unique identifier of the nft classification, similar to the contract address of ERC721 + string class_id = 1; + + // id defines the unique identification of nft + string id = 2; + + // sender is the address of the owner of nft + string sender = 3; + + // receiver is the receiver address of nft + string receiver = 4; +} +// MsgSendResponse defines the Msg/Send response type. +message MsgSendResponse {} \ No newline at end of file diff --git a/third_party/proto/cosmos/orm/module/v1alpha1/module.proto b/third_party/proto/cosmos/orm/module/v1alpha1/module.proto new file mode 100644 index 00000000..cb7bbbee --- /dev/null +++ b/third_party/proto/cosmos/orm/module/v1alpha1/module.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; + +package cosmos.orm.module.v1alpha1; + +import "cosmos/app/v1alpha1/module.proto"; + +// Module defines the ORM module which adds providers to the app container for +// module-scoped DB's. In the future it may provide gRPC services for interacting +// with ORM data. +message Module { + option (cosmos.app.v1alpha1.module) = { + go_import: "github.com/cosmos/cosmos-sdk/orm" + }; +} diff --git a/third_party/proto/cosmos/orm/v1/orm.proto b/third_party/proto/cosmos/orm/v1/orm.proto new file mode 100644 index 00000000..389babd1 --- /dev/null +++ b/third_party/proto/cosmos/orm/v1/orm.proto @@ -0,0 +1,104 @@ +syntax = "proto3"; + +package cosmos.orm.v1; + +import "google/protobuf/descriptor.proto"; + +extend google.protobuf.MessageOptions { + + // table specifies that this message will be used as an ORM table. It cannot + // be used together with the singleton option. + TableDescriptor table = 104503790; + + // singleton specifies that this message will be used as an ORM singleton. It cannot + // be used together with the table option. + SingletonDescriptor singleton = 104503791; +} + +// TableDescriptor describes an ORM table. +message TableDescriptor { + + // primary_key defines the primary key for the table. + PrimaryKeyDescriptor primary_key = 1; + + // index defines one or more secondary indexes. + repeated SecondaryIndexDescriptor index = 2; + + // id is a non-zero integer ID that must be unique within the + // tables and singletons in this file. It may be deprecated in the future when this + // can be auto-generated. + uint32 id = 3; +} + +// PrimaryKeyDescriptor describes a table primary key. +message PrimaryKeyDescriptor { + + // fields is a comma-separated list of fields in the primary key. Spaces are + // not allowed. Supported field types, their encodings, and any applicable constraints + // are described below. + // - uint32 are encoded as 2,3,4 or 5 bytes using a compact encoding that + // is suitable for sorted iteration (not varint encoding). This type is + // well-suited for small integers. + // - uint64 are encoded as 2,4,6 or 9 bytes using a compact encoding that + // is suitable for sorted iteration (not varint encoding). This type is + // well-suited for small integers such as auto-incrementing sequences. + // - fixed32, fixed64 are encoded as big-endian fixed width bytes and support + // sorted iteration. These types are well-suited for encoding fixed with + // decimals as integers. + // - string's are encoded as raw bytes in terminal key segments and null-terminated + // in non-terminal segments. Null characters are thus forbidden in strings. + // string fields support sorted iteration. + // - bytes are encoded as raw bytes in terminal segments and length-prefixed + // with a 32-bit unsigned varint in non-terminal segments. + // - int32, sint32, int64, sint64, sfixed32, sfixed64 are encoded as fixed width bytes with + // an encoding that enables sorted iteration. + // - google.protobuf.Timestamp and google.protobuf.Duration are encoded + // as 12 bytes using an encoding that enables sorted iteration. + // - enum fields are encoded using varint encoding and do not support sorted + // iteration. + // - bool fields are encoded as a single byte 0 or 1. + // + // All other fields types are unsupported in keys including repeated and + // oneof fields. + // + // Primary keys are prefixed by the varint encoded table id and the byte 0x0 + // plus any additional prefix specified by the schema. + string fields = 1; + + // auto_increment specifies that the primary key is generated by an + // auto-incrementing integer. If this is set to true fields must only + // contain one field of that is of type uint64. + bool auto_increment = 2; +} + +// PrimaryKeyDescriptor describes a table secondary index. +message SecondaryIndexDescriptor { + + // fields is a comma-separated list of fields in the index. The supported + // field types are the same as those for PrimaryKeyDescriptor.fields. + // Index keys are prefixed by the varint encoded table id and the varint + // encoded index id plus any additional prefix specified by the schema. + // + // In addition the field segments, non-unique index keys are suffixed with + // any additional primary key fields not present in the index fields so that the + // primary key can be reconstructed. Unique indexes instead of being suffixed + // store the remaining primary key fields in the value.. + string fields = 1; + + // id is a non-zero integer ID that must be unique within the indexes for this + // table and less than 32768. It may be deprecated in the future when this can + // be auto-generated. + uint32 id = 2; + + // unique specifies that this an unique index. + bool unique = 3; +} + +// TableDescriptor describes an ORM singleton table which has at most one instance. +message SingletonDescriptor { + + // id is a non-zero integer ID that must be unique within the + // tables and singletons in this file. It may be deprecated in the future when this + // can be auto-generated. + uint32 id = 1; +} \ No newline at end of file diff --git a/third_party/proto/cosmos/orm/v1alpha1/schema.proto b/third_party/proto/cosmos/orm/v1alpha1/schema.proto new file mode 100644 index 00000000..ab713340 --- /dev/null +++ b/third_party/proto/cosmos/orm/v1alpha1/schema.proto @@ -0,0 +1,76 @@ +syntax = "proto3"; + +package cosmos.orm.v1alpha1; + +import "google/protobuf/descriptor.proto"; + +extend google.protobuf.MessageOptions { + // module_schema is used to define the ORM schema for an app module. + // All module config messages that use module_schema must also declare + // themselves as app module config messages using the cosmos.app.v1.is_module + // option. + ModuleSchemaDescriptor module_schema = 104503792; +} + +// ModuleSchemaDescriptor describe's a module's ORM schema. +message ModuleSchemaDescriptor { + repeated FileEntry schema_file = 1; + + // FileEntry describes an ORM file used in a module. + message FileEntry { + // id is a prefix that will be varint encoded and prepended to all the + // table keys specified in the file's tables. + uint32 id = 1; + + // proto_file_name is the name of a file .proto in that contains + // table definitions. The .proto file must be in a package that the + // module has referenced using cosmos.app.v1.ModuleDescriptor.use_package. + string proto_file_name = 2; + + // storage_type optionally indicates the type of storage this file's + // tables should used. If it is left unspecified, the default KV-storage + // of the app will be used. + StorageType storage_type = 3; + } + + // prefix is an optional prefix that precedes all keys in this module's + // store. + bytes prefix = 2; +} + +// StorageType +enum StorageType { + // STORAGE_TYPE_DEFAULT_UNSPECIFIED indicates the persistent + // KV-storage where primary key entries are stored in merkle-tree + // backed commitment storage and indexes and seqs are stored in + // fast index storage. Note that the Cosmos SDK before store/v2alpha1 + // does not support this. + STORAGE_TYPE_DEFAULT_UNSPECIFIED = 0; + + // STORAGE_TYPE_MEMORY indicates in-memory storage that will be + // reloaded every time an app restarts. Tables with this type of storage + // will by default be ignored when importing and exporting a module's + // state from JSON. + STORAGE_TYPE_MEMORY = 1; + + // STORAGE_TYPE_TRANSIENT indicates transient storage that is reset + // at the end of every block. Tables with this type of storage + // will by default be ignored when importing and exporting a module's + // state from JSON. + STORAGE_TYPE_TRANSIENT = 2; + + // STORAGE_TYPE_INDEX indicates persistent storage which is not backed + // by a merkle-tree and won't affect the app hash. Note that the Cosmos SDK + // before store/v2alpha1 does not support this. + STORAGE_TYPE_INDEX = 3; + + // STORAGE_TYPE_INDEX indicates persistent storage which is backed by + // a merkle-tree. With this type of storage, both primary and index keys + // will affect the app hash and this is generally less efficient + // than using STORAGE_TYPE_DEFAULT_UNSPECIFIED which separates index + // keys into index storage. Note that modules built with the + // Cosmos SDK before store/v2alpha1 must specify STORAGE_TYPE_COMMITMENT + // instead of STORAGE_TYPE_DEFAULT_UNSPECIFIED or STORAGE_TYPE_INDEX + // because this is the only type of persistent storage available. + STORAGE_TYPE_COMMITMENT = 4; +} diff --git a/third_party/proto/cosmos/params/v1beta1/params.proto b/third_party/proto/cosmos/params/v1beta1/params.proto index 5382fd79..da23e1a9 100644 --- a/third_party/proto/cosmos/params/v1beta1/params.proto +++ b/third_party/proto/cosmos/params/v1beta1/params.proto @@ -5,11 +5,13 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/params/types/prop option (gogoproto.equal_all) = true; import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; // ParameterChangeProposal defines a proposal to change one or more parameters. message ParameterChangeProposal { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; string title = 1; string description = 2; diff --git a/third_party/proto/cosmos/params/v1beta1/query.proto b/third_party/proto/cosmos/params/v1beta1/query.proto index 1078e02a..97d0a71d 100644 --- a/third_party/proto/cosmos/params/v1beta1/query.proto +++ b/third_party/proto/cosmos/params/v1beta1/query.proto @@ -14,6 +14,13 @@ service Query { rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/cosmos/params/v1beta1/params"; } + + // Subspaces queries for all registered subspaces and all keys for a subspace. + // + // Since: cosmos-sdk 0.46 + rpc Subspaces(QuerySubspacesRequest) returns (QuerySubspacesResponse) { + option (google.api.http).get = "/cosmos/params/v1beta1/subspaces"; + } } // QueryParamsRequest is request type for the Query/Params RPC method. @@ -30,3 +37,26 @@ message QueryParamsResponse { // param defines the queried parameter. ParamChange param = 1 [(gogoproto.nullable) = false]; } + +// QuerySubspacesRequest defines a request type for querying for all registered +// subspaces and all keys for a subspace. +// +// Since: cosmos-sdk 0.46 +message QuerySubspacesRequest {} + +// QuerySubspacesResponse defines the response types for querying for all +// registered subspaces and all keys for a subspace. +// +// Since: cosmos-sdk 0.46 +message QuerySubspacesResponse { + repeated Subspace subspaces = 1; +} + +// Subspace defines a parameter subspace name and all the keys that exist for +// the subspace. +// +// Since: cosmos-sdk 0.46 +message Subspace { + string subspace = 1; + repeated string keys = 2; +} diff --git a/third_party/proto/cosmos/slashing/v1beta1/genesis.proto b/third_party/proto/cosmos/slashing/v1beta1/genesis.proto index a7aebcfb..312d56aa 100644 --- a/third_party/proto/cosmos/slashing/v1beta1/genesis.proto +++ b/third_party/proto/cosmos/slashing/v1beta1/genesis.proto @@ -5,6 +5,7 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/slashing/types"; import "gogoproto/gogo.proto"; import "cosmos/slashing/v1beta1/slashing.proto"; +import "cosmos_proto/cosmos.proto"; // GenesisState defines the slashing module's genesis state. message GenesisState { @@ -13,32 +14,28 @@ message GenesisState { // signing_infos represents a map between validator addresses and their // signing infos. - repeated SigningInfo signing_infos = 2 - [(gogoproto.moretags) = "yaml:\"signing_infos\"", (gogoproto.nullable) = false]; + repeated SigningInfo signing_infos = 2 [(gogoproto.nullable) = false]; // missed_blocks represents a map between validator addresses and their // missed blocks. - repeated ValidatorMissedBlocks missed_blocks = 3 - [(gogoproto.moretags) = "yaml:\"missed_blocks\"", (gogoproto.nullable) = false]; + repeated ValidatorMissedBlocks missed_blocks = 3 [(gogoproto.nullable) = false]; } // SigningInfo stores validator signing info of corresponding address. message SigningInfo { // address is the validator address. - string address = 1; + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // validator_signing_info represents the signing info of this validator. - ValidatorSigningInfo validator_signing_info = 2 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_signing_info\""]; + ValidatorSigningInfo validator_signing_info = 2 [(gogoproto.nullable) = false]; } // ValidatorMissedBlocks contains array of missed blocks of corresponding // address. message ValidatorMissedBlocks { // address is the validator address. - string address = 1; + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // missed_blocks is an array of missed blocks by the validator. - repeated MissedBlock missed_blocks = 2 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"missed_blocks\""]; + repeated MissedBlock missed_blocks = 2 [(gogoproto.nullable) = false]; } // MissedBlock contains height and missed status as boolean. diff --git a/third_party/proto/cosmos/slashing/v1beta1/query.proto b/third_party/proto/cosmos/slashing/v1beta1/query.proto index 869049a0..f742c1f8 100644 --- a/third_party/proto/cosmos/slashing/v1beta1/query.proto +++ b/third_party/proto/cosmos/slashing/v1beta1/query.proto @@ -5,6 +5,7 @@ import "cosmos/base/query/v1beta1/pagination.proto"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "cosmos/slashing/v1beta1/slashing.proto"; +import "cosmos_proto/cosmos.proto"; option go_package = "github.com/cosmos/cosmos-sdk/x/slashing/types"; @@ -38,7 +39,7 @@ message QueryParamsResponse { // method message QuerySigningInfoRequest { // cons_address is the address to query signing info of - string cons_address = 1; + string cons_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC diff --git a/third_party/proto/cosmos/slashing/v1beta1/slashing.proto b/third_party/proto/cosmos/slashing/v1beta1/slashing.proto index 882a0fb6..0aa9f61f 100644 --- a/third_party/proto/cosmos/slashing/v1beta1/slashing.proto +++ b/third_party/proto/cosmos/slashing/v1beta1/slashing.proto @@ -7,6 +7,7 @@ option (gogoproto.equal_all) = true; import "gogoproto/gogo.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; +import "cosmos_proto/cosmos.proto"; // ValidatorSigningInfo defines a validator's signing info for monitoring their // liveness activity. @@ -14,45 +15,31 @@ message ValidatorSigningInfo { option (gogoproto.equal) = true; option (gogoproto.goproto_stringer) = false; - string address = 1; + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // Height at which validator was first a candidate OR was unjailed - int64 start_height = 2 [(gogoproto.moretags) = "yaml:\"start_height\""]; + int64 start_height = 2; // 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\""]; + int64 index_offset = 3; // 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]; + google.protobuf.Timestamp jailed_until = 4 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; // 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; // 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\""]; + int64 missed_blocks_counter = 6; } // Params represents the parameters used for by the slashing module. message Params { - int64 signed_blocks_window = 1 [(gogoproto.moretags) = "yaml:\"signed_blocks_window\""]; - bytes min_signed_per_window = 2 [ - (gogoproto.moretags) = "yaml:\"min_signed_per_window\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - google.protobuf.Duration downtime_jail_duration = 3 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.moretags) = "yaml:\"downtime_jail_duration\"" - ]; - bytes slash_fraction_double_sign = 4 [ - (gogoproto.moretags) = "yaml:\"slash_fraction_double_sign\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - bytes slash_fraction_downtime = 5 [ - (gogoproto.moretags) = "yaml:\"slash_fraction_downtime\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; + int64 signed_blocks_window = 1; + bytes min_signed_per_window = 2 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + google.protobuf.Duration downtime_jail_duration = 3 [(gogoproto.nullable) = false, (gogoproto.stdduration) = true]; + bytes slash_fraction_double_sign = 4 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + bytes slash_fraction_downtime = 5 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; } diff --git a/third_party/proto/cosmos/slashing/v1beta1/tx.proto b/third_party/proto/cosmos/slashing/v1beta1/tx.proto index 4d63370e..7c90304b 100644 --- a/third_party/proto/cosmos/slashing/v1beta1/tx.proto +++ b/third_party/proto/cosmos/slashing/v1beta1/tx.proto @@ -5,6 +5,8 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/slashing/types"; option (gogoproto.equal_all) = true; import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/msg/v1/msg.proto"; // Msg defines the slashing Msg service. service Msg { @@ -16,11 +18,13 @@ service Msg { // MsgUnjail defines the Msg/Unjail request type message MsgUnjail { + option (cosmos.msg.v1.signer) = "validator_addr"; + option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_stringer) = true; - string validator_addr = 1 [(gogoproto.moretags) = "yaml:\"address\"", (gogoproto.jsontag) = "address"]; + string validator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString", (gogoproto.jsontag) = "address"]; } // MsgUnjailResponse defines the Msg/Unjail response type -message MsgUnjailResponse {} \ No newline at end of file +message MsgUnjailResponse {} diff --git a/third_party/proto/cosmos/staking/v1beta1/authz.proto b/third_party/proto/cosmos/staking/v1beta1/authz.proto index d50c329c..677edaad 100644 --- a/third_party/proto/cosmos/staking/v1beta1/authz.proto +++ b/third_party/proto/cosmos/staking/v1beta1/authz.proto @@ -26,7 +26,7 @@ message StakeAuthorization { } // Validators defines list of validator addresses. message Validators { - repeated string address = 1; + repeated string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // authorization_type defines one of AuthorizationType. AuthorizationType authorization_type = 4; diff --git a/third_party/proto/cosmos/staking/v1beta1/genesis.proto b/third_party/proto/cosmos/staking/v1beta1/genesis.proto index d1563dbc..bf3c298e 100644 --- a/third_party/proto/cosmos/staking/v1beta1/genesis.proto +++ b/third_party/proto/cosmos/staking/v1beta1/genesis.proto @@ -5,6 +5,7 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; import "gogoproto/gogo.proto"; import "cosmos/staking/v1beta1/staking.proto"; +import "cosmos_proto/cosmos.proto"; // GenesisState defines the staking module's genesis state. message GenesisState { @@ -13,16 +14,12 @@ message GenesisState { // last_total_power tracks the total amounts of bonded tokens recorded during // the previous end block. - bytes last_total_power = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"last_total_power\"", - (gogoproto.nullable) = false - ]; + bytes last_total_power = 2 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; // last_validator_powers is a special index that provides a historical list // of the last-block's bonded validators. - repeated LastValidatorPower last_validator_powers = 3 - [(gogoproto.moretags) = "yaml:\"last_validator_powers\"", (gogoproto.nullable) = false]; + repeated LastValidatorPower last_validator_powers = 3 [(gogoproto.nullable) = false]; // delegations defines the validator set at genesis. repeated Validator validators = 4 [(gogoproto.nullable) = false]; @@ -31,8 +28,7 @@ message GenesisState { repeated Delegation delegations = 5 [(gogoproto.nullable) = false]; // unbonding_delegations defines the unbonding delegations active at genesis. - repeated UnbondingDelegation unbonding_delegations = 6 - [(gogoproto.moretags) = "yaml:\"unbonding_delegations\"", (gogoproto.nullable) = false]; + repeated UnbondingDelegation unbonding_delegations = 6 [(gogoproto.nullable) = false]; // redelegations defines the redelegations active at genesis. repeated Redelegation redelegations = 7 [(gogoproto.nullable) = false]; @@ -46,7 +42,7 @@ message LastValidatorPower { option (gogoproto.goproto_getters) = false; // address is the address of the validator. - string address = 1; + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // power defines the power of the validator. int64 power = 2; diff --git a/third_party/proto/cosmos/staking/v1beta1/query.proto b/third_party/proto/cosmos/staking/v1beta1/query.proto index 4852c535..2cbb750b 100644 --- a/third_party/proto/cosmos/staking/v1beta1/query.proto +++ b/third_party/proto/cosmos/staking/v1beta1/query.proto @@ -5,6 +5,7 @@ import "cosmos/base/query/v1beta1/pagination.proto"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "cosmos/staking/v1beta1/staking.proto"; +import "cosmos_proto/cosmos.proto"; option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; @@ -113,12 +114,12 @@ message QueryValidatorsResponse { // QueryValidatorRequest is response type for the Query/Validator RPC method message QueryValidatorRequest { // validator_addr defines the validator address to query for. - string validator_addr = 1; + string validator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // QueryValidatorResponse is response type for the Query/Validator RPC method message QueryValidatorResponse { - // validator defines the the validator info. + // validator defines the validator info. Validator validator = 1 [(gogoproto.nullable) = false]; } @@ -126,7 +127,7 @@ message QueryValidatorResponse { // Query/ValidatorDelegations RPC method message QueryValidatorDelegationsRequest { // validator_addr defines the validator address to query for. - string validator_addr = 1; + string validator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; @@ -146,7 +147,7 @@ message QueryValidatorDelegationsResponse { // Query/ValidatorUnbondingDelegations RPC method message QueryValidatorUnbondingDelegationsRequest { // validator_addr defines the validator address to query for. - string validator_addr = 1; + string validator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; @@ -167,10 +168,10 @@ message QueryDelegationRequest { option (gogoproto.goproto_getters) = false; // delegator_addr defines the delegator address to query for. - string delegator_addr = 1; + string delegator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // validator_addr defines the validator address to query for. - string validator_addr = 2; + string validator_addr = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // QueryDelegationResponse is response type for the Query/Delegation RPC method. @@ -186,10 +187,10 @@ message QueryUnbondingDelegationRequest { option (gogoproto.goproto_getters) = false; // delegator_addr defines the delegator address to query for. - string delegator_addr = 1; + string delegator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // validator_addr defines the validator address to query for. - string validator_addr = 2; + string validator_addr = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // QueryDelegationResponse is response type for the Query/UnbondingDelegation @@ -206,7 +207,7 @@ message QueryDelegatorDelegationsRequest { option (gogoproto.goproto_getters) = false; // delegator_addr defines the delegator address to query for. - string delegator_addr = 1; + string delegator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; @@ -229,7 +230,7 @@ message QueryDelegatorUnbondingDelegationsRequest { option (gogoproto.goproto_getters) = false; // delegator_addr defines the delegator address to query for. - string delegator_addr = 1; + string delegator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; @@ -251,13 +252,13 @@ message QueryRedelegationsRequest { option (gogoproto.goproto_getters) = false; // delegator_addr defines the delegator address to query for. - string delegator_addr = 1; + string delegator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // src_validator_addr defines the validator address to redelegate from. - string src_validator_addr = 2; + string src_validator_addr = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // dst_validator_addr defines the validator address to redelegate to. - string dst_validator_addr = 3; + string dst_validator_addr = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 4; @@ -279,7 +280,7 @@ message QueryDelegatorValidatorsRequest { option (gogoproto.goproto_getters) = false; // delegator_addr defines the delegator address to query for. - string delegator_addr = 1; + string delegator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; @@ -288,7 +289,7 @@ message QueryDelegatorValidatorsRequest { // QueryDelegatorValidatorsResponse is response type for the // Query/DelegatorValidators RPC method. message QueryDelegatorValidatorsResponse { - // validators defines the the validators' info of a delegator. + // validators defines the validators' info of a delegator. repeated Validator validators = 1 [(gogoproto.nullable) = false]; // pagination defines the pagination in the response. @@ -302,16 +303,16 @@ message QueryDelegatorValidatorRequest { option (gogoproto.goproto_getters) = false; // delegator_addr defines the delegator address to query for. - string delegator_addr = 1; + string delegator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // validator_addr defines the validator address to query for. - string validator_addr = 2; + string validator_addr = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // QueryDelegatorValidatorResponse response type for the // Query/DelegatorValidator RPC method. message QueryDelegatorValidatorResponse { - // validator defines the the validator info. + // validator defines the validator info. Validator validator = 1 [(gogoproto.nullable) = false]; } diff --git a/third_party/proto/cosmos/staking/v1beta1/staking.proto b/third_party/proto/cosmos/staking/v1beta1/staking.proto index 76e9599e..6dc965fe 100644 --- a/third_party/proto/cosmos/staking/v1beta1/staking.proto +++ b/third_party/proto/cosmos/staking/v1beta1/staking.proto @@ -28,16 +28,20 @@ message CommissionRates { option (gogoproto.goproto_stringer) = false; // rate is the commission rate charged to delegators, as a fraction. - string rate = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + string rate = 1 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; // max_rate defines the maximum commission rate which validator can ever charge, as a fraction. string max_rate = 2 [ - (gogoproto.moretags) = "yaml:\"max_rate\"", + (cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false ]; // max_change_rate defines the maximum daily increase of the validator commission, as a fraction. string max_change_rate = 3 [ - (gogoproto.moretags) = "yaml:\"max_change_rate\"", + (cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false ]; @@ -51,8 +55,7 @@ message Commission { // commission_rates defines the initial commission rates to be used for creating a validator. CommissionRates commission_rates = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; // update_time is the last time the commission rate was changed. - google.protobuf.Timestamp update_time = 2 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"update_time\""]; + google.protobuf.Timestamp update_time = 2 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; } // Description defines a validator description. @@ -67,7 +70,7 @@ message Description { // website defines an optional website link. string website = 3; // security_contact defines an optional email for security contact. - string security_contact = 4 [(gogoproto.moretags) = "yaml:\"security_contact\""]; + string security_contact = 4; // details define other optional details. string details = 5; } @@ -86,34 +89,38 @@ message Validator { option (gogoproto.goproto_getters) = false; // operator_address defines the address of the validator's operator; bech encoded in JSON. - string operator_address = 1 [(gogoproto.moretags) = "yaml:\"operator_address\""]; + string operator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. - google.protobuf.Any consensus_pubkey = 2 - [(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey", (gogoproto.moretags) = "yaml:\"consensus_pubkey\""]; + google.protobuf.Any consensus_pubkey = 2 [(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey"]; // jailed defined whether the validator has been jailed from bonded status or not. bool jailed = 3; // status is the validator status (bonded/unbonding/unbonded). BondStatus status = 4; // tokens define the delegated tokens (incl. self-delegation). - string tokens = 5 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + string tokens = 5 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; // delegator_shares defines total shares issued to a validator's delegators. string delegator_shares = 6 [ - (gogoproto.moretags) = "yaml:\"delegator_shares\"", + (cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false ]; // description defines the description terms for the validator. Description description = 7 [(gogoproto.nullable) = false]; // unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. - int64 unbonding_height = 8 [(gogoproto.moretags) = "yaml:\"unbonding_height\""]; + int64 unbonding_height = 8; // unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. - google.protobuf.Timestamp unbonding_time = 9 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"unbonding_time\""]; + google.protobuf.Timestamp unbonding_time = 9 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; // commission defines the commission parameters. Commission commission = 10 [(gogoproto.nullable) = false]; // min_self_delegation is the validator's self declared minimum self delegation. + // + // Since: cosmos-sdk 0.46 string min_self_delegation = 11 [ - (gogoproto.moretags) = "yaml:\"min_self_delegation\"", + (cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false ]; @@ -138,7 +145,7 @@ message ValAddresses { option (gogoproto.goproto_stringer) = false; option (gogoproto.stringer) = true; - repeated string addresses = 1; + repeated string addresses = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // DVPair is struct that just has a delegator-validator pair with no other data. @@ -149,8 +156,8 @@ message DVPair { option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_stringer) = false; - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // DVPairs defines an array of DVPair objects. @@ -167,9 +174,9 @@ message DVVTriplet { option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_stringer) = false; - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - string validator_src_address = 2 [(gogoproto.moretags) = "yaml:\"validator_src_address\""]; - string validator_dst_address = 3 [(gogoproto.moretags) = "yaml:\"validator_dst_address\""]; + string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string validator_src_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string validator_dst_address = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // DVVTriplets defines an array of DVVTriplet objects. @@ -186,11 +193,15 @@ message Delegation { option (gogoproto.goproto_stringer) = false; // delegator_address is the bech32-encoded address of the delegator. - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // validator_address is the bech32-encoded address of the validator. - string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // shares define the delegation shares received. - string shares = 3 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + string shares = 3 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; } // UnbondingDelegation stores all of a single delegator's unbonding bonds @@ -201,9 +212,9 @@ message UnbondingDelegation { option (gogoproto.goproto_stringer) = false; // delegator_address is the bech32-encoded address of the delegator. - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // validator_address is the bech32-encoded address of the validator. - string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // entries are the unbonding delegation entries. repeated UnbondingDelegationEntry entries = 3 [(gogoproto.nullable) = false]; // unbonding delegation entries } @@ -214,18 +225,21 @@ message UnbondingDelegationEntry { option (gogoproto.goproto_stringer) = false; // creation_height is the height which the unbonding took place. - int64 creation_height = 1 [(gogoproto.moretags) = "yaml:\"creation_height\""]; + int64 creation_height = 1; // completion_time is the unix time for unbonding completion. - google.protobuf.Timestamp completion_time = 2 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"completion_time\""]; + google.protobuf.Timestamp completion_time = 2 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; // initial_balance defines the tokens initially scheduled to receive at completion. string initial_balance = 3 [ + (cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"initial_balance\"" + (gogoproto.nullable) = false ]; // balance defines the tokens to receive at completion. - string balance = 4 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + string balance = 4 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; } // RedelegationEntry defines a redelegation object with relevant metadata. @@ -234,19 +248,21 @@ message RedelegationEntry { option (gogoproto.goproto_stringer) = false; // creation_height defines the height which the redelegation took place. - int64 creation_height = 1 [(gogoproto.moretags) = "yaml:\"creation_height\""]; + int64 creation_height = 1; // completion_time defines the unix time for redelegation completion. - google.protobuf.Timestamp completion_time = 2 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"completion_time\""]; + google.protobuf.Timestamp completion_time = 2 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; // initial_balance defines the initial balance when redelegation started. string initial_balance = 3 [ + (cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"initial_balance\"" + (gogoproto.nullable) = false ]; // shares_dst is the amount of destination-validator shares created by redelegation. - string shares_dst = 4 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + string shares_dst = 4 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; } // Redelegation contains the list of a particular delegator's redelegating bonds @@ -257,11 +273,11 @@ message Redelegation { option (gogoproto.goproto_stringer) = false; // delegator_address is the bech32-encoded address of the delegator. - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // validator_src_address is the validator redelegation source operator address. - string validator_src_address = 2 [(gogoproto.moretags) = "yaml:\"validator_src_address\""]; + string validator_src_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // validator_dst_address is the validator redelegation destination operator address. - string validator_dst_address = 3 [(gogoproto.moretags) = "yaml:\"validator_dst_address\""]; + string validator_dst_address = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // entries are the redelegation entries. repeated RedelegationEntry entries = 4 [(gogoproto.nullable) = false]; // redelegation entries } @@ -272,16 +288,21 @@ message Params { option (gogoproto.goproto_stringer) = false; // unbonding_time is the time duration of unbonding. - google.protobuf.Duration unbonding_time = 1 - [(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"unbonding_time\""]; + google.protobuf.Duration unbonding_time = 1 [(gogoproto.nullable) = false, (gogoproto.stdduration) = true]; // max_validators is the maximum number of validators. - uint32 max_validators = 2 [(gogoproto.moretags) = "yaml:\"max_validators\""]; + uint32 max_validators = 2; // max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). - uint32 max_entries = 3 [(gogoproto.moretags) = "yaml:\"max_entries\""]; + uint32 max_entries = 3; // historical_entries is the number of historical entries to persist. - uint32 historical_entries = 4 [(gogoproto.moretags) = "yaml:\"historical_entries\""]; + uint32 historical_entries = 4; // bond_denom defines the bondable coin denomination. - string bond_denom = 5 [(gogoproto.moretags) = "yaml:\"bond_denom\""]; + string bond_denom = 5; + // min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators + string min_commission_rate = 6 [ + (gogoproto.moretags) = "yaml:\"min_commission_rate\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; } // DelegationResponse is equivalent to Delegation except that it contains a @@ -302,7 +323,11 @@ message RedelegationEntryResponse { option (gogoproto.equal) = true; RedelegationEntry redelegation_entry = 1 [(gogoproto.nullable) = false]; - string balance = 4 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + string balance = 4 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; } // RedelegationResponse is equivalent to a Redelegation except that its entries @@ -321,14 +346,15 @@ message Pool { option (gogoproto.description) = true; option (gogoproto.equal) = true; string not_bonded_tokens = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.jsontag) = "not_bonded_tokens", - (gogoproto.nullable) = false - ]; - string bonded_tokens = 2 [ - (gogoproto.jsontag) = "bonded_tokens", + (cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"bonded_tokens\"" + (gogoproto.jsontag) = "not_bonded_tokens" + ]; + string bonded_tokens = 2 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "bonded_tokens" ]; } diff --git a/third_party/proto/cosmos/staking/v1beta1/tx.proto b/third_party/proto/cosmos/staking/v1beta1/tx.proto index d074fe01..b4866d36 100644 --- a/third_party/proto/cosmos/staking/v1beta1/tx.proto +++ b/third_party/proto/cosmos/staking/v1beta1/tx.proto @@ -9,6 +9,8 @@ import "cosmos_proto/cosmos.proto"; import "cosmos/base/v1beta1/coin.proto"; import "cosmos/staking/v1beta1/staking.proto"; +import "cosmos/msg/v1/msg.proto"; + option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; // Msg defines the staking Msg service. @@ -30,22 +32,34 @@ service Msg { // Undelegate defines a method for performing an undelegation from a // delegate and a validator. rpc Undelegate(MsgUndelegate) returns (MsgUndelegateResponse); + + // CancelUnbondingDelegation defines a method for performing canceling the unbonding delegation + // and delegate back to previous validator. + // + // Since: cosmos-sdk 0.46 + rpc CancelUnbondingDelegation(MsgCancelUnbondingDelegation) returns (MsgCancelUnbondingDelegationResponse); } // MsgCreateValidator defines a SDK message for creating a new validator. message MsgCreateValidator { + // NOTE(fdymylja): this is a particular case in which + // if validator_address == delegator_address then only one + // is expected to sign, otherwise both are. + option (cosmos.msg.v1.signer) = "delegator_address"; + option (cosmos.msg.v1.signer) = "validator_address"; + option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; Description description = 1 [(gogoproto.nullable) = false]; CommissionRates commission = 2 [(gogoproto.nullable) = false]; string min_self_delegation = 3 [ + (cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"min_self_delegation\"", (gogoproto.nullable) = false ]; - string delegator_address = 4 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - string validator_address = 5 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + string delegator_address = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string validator_address = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"]; google.protobuf.Any pubkey = 6 [(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey"]; cosmos.base.v1beta1.Coin value = 7 [(gogoproto.nullable) = false]; } @@ -55,24 +69,22 @@ message MsgCreateValidatorResponse {} // MsgEditValidator defines a SDK message for editing an existing validator. message MsgEditValidator { + option (cosmos.msg.v1.signer) = "validator_address"; + option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; Description description = 1 [(gogoproto.nullable) = false]; - string validator_address = 2 [(gogoproto.moretags) = "yaml:\"address\""]; + string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // 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 - string commission_rate = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.moretags) = "yaml:\"commission_rate\"" - ]; - string min_self_delegation = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"min_self_delegation\"" - ]; + string commission_rate = 3 + [(cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec"]; + string min_self_delegation = 4 + [(cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"]; } // MsgEditValidatorResponse defines the Msg/EditValidator response type. @@ -81,10 +93,12 @@ message MsgEditValidatorResponse {} // MsgDelegate defines a SDK message for performing a delegation of coins // from a delegator to a validator. message MsgDelegate { + option (cosmos.msg.v1.signer) = "delegator_address"; + option (gogoproto.equal) = false; - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false]; } @@ -94,11 +108,13 @@ message MsgDelegateResponse {} // MsgBeginRedelegate defines a SDK message for performing a redelegation // of coins from a delegator and source validator to a destination validator. message MsgBeginRedelegate { + option (cosmos.msg.v1.signer) = "delegator_address"; + option (gogoproto.equal) = false; - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - string validator_src_address = 2 [(gogoproto.moretags) = "yaml:\"validator_src_address\""]; - string validator_dst_address = 3 [(gogoproto.moretags) = "yaml:\"validator_dst_address\""]; + string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string validator_src_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string validator_dst_address = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; cosmos.base.v1beta1.Coin amount = 4 [(gogoproto.nullable) = false]; } @@ -110,10 +126,12 @@ message MsgBeginRedelegateResponse { // MsgUndelegate defines a SDK message for performing an undelegation from a // delegate and a validator. message MsgUndelegate { + option (cosmos.msg.v1.signer) = "delegator_address"; + option (gogoproto.equal) = false; - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false]; } @@ -121,3 +139,23 @@ message MsgUndelegate { message MsgUndelegateResponse { google.protobuf.Timestamp completion_time = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; } + +// MsgCancelUnbondingDelegation defines the SDK message for performing a cancel unbonding delegation for delegator +// +// Since: cosmos-sdk 0.46 +message MsgCancelUnbondingDelegation { + option (cosmos.msg.v1.signer) = "delegator_address"; + option (gogoproto.equal) = false; + + string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // amount is always less than or equal to unbonding delegation entry balance + cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false]; + // creation_height is the height which the unbonding took place. + int64 creation_height = 4; +} + +// MsgCancelUnbondingDelegationResponse +// +// Since: cosmos-sdk 0.46 +message MsgCancelUnbondingDelegationResponse {} diff --git a/third_party/proto/cosmos/tx/signing/v1beta1/signing.proto b/third_party/proto/cosmos/tx/signing/v1beta1/signing.proto index 50de89c8..12d5868b 100644 --- a/third_party/proto/cosmos/tx/signing/v1beta1/signing.proto +++ b/third_party/proto/cosmos/tx/signing/v1beta1/signing.proto @@ -7,22 +7,37 @@ import "google/protobuf/any.proto"; option go_package = "github.com/cosmos/cosmos-sdk/types/tx/signing"; // SignMode represents a signing mode with its own security guarantees. +// +// This enum should be considered a registry of all known sign modes +// in the Cosmos ecosystem. Apps are not expected to support all known +// sign modes. Apps that would like to support custom sign modes are +// encouraged to open a small PR against this file to add a new case +// to this SignMode enum describing their sign mode so that different +// apps have a consistent version of this enum. enum SignMode { // SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be - // rejected + // rejected. SIGN_MODE_UNSPECIFIED = 0; // SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is - // verified with raw bytes from Tx + // verified with raw bytes from Tx. SIGN_MODE_DIRECT = 1; // SIGN_MODE_TEXTUAL is a future signing mode that will verify some // human-readable textual representation on top of the binary representation - // from SIGN_MODE_DIRECT + // from SIGN_MODE_DIRECT. It is currently not supported. SIGN_MODE_TEXTUAL = 2; + // SIGN_MODE_DIRECT_AUX specifies a signing mode which uses + // SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not + // require signers signing over other signers' `signer_info`. It also allows + // for adding Tips in transactions. + // + // Since: cosmos-sdk 0.46 + SIGN_MODE_DIRECT_AUX = 3; + // SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses - // Amino JSON and will be removed in the future + // Amino JSON and will be removed in the future. SIGN_MODE_LEGACY_AMINO_JSON = 127; // SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos diff --git a/third_party/proto/cosmos/tx/v1beta1/service.proto b/third_party/proto/cosmos/tx/v1beta1/service.proto index d9f828f7..4dd9b535 100644 --- a/third_party/proto/cosmos/tx/v1beta1/service.proto +++ b/third_party/proto/cosmos/tx/v1beta1/service.proto @@ -4,13 +4,11 @@ package cosmos.tx.v1beta1; import "google/api/annotations.proto"; import "cosmos/base/abci/v1beta1/abci.proto"; import "cosmos/tx/v1beta1/tx.proto"; -import "gogoproto/gogo.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; import "tendermint/types/block.proto"; import "tendermint/types/types.proto"; -option (gogoproto.goproto_registration) = true; -option go_package = "github.com/cosmos/cosmos-sdk/types/tx"; +option go_package = "github.com/cosmos/cosmos-sdk/types/tx"; // Service defines a gRPC service for interacting with transactions. service Service { @@ -50,8 +48,15 @@ message GetTxsEventRequest { // events is the list of transaction event type. repeated string events = 1; // pagination defines a pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; - OrderBy order_by = 3; + // Deprecated post v0.46.x: use page and limit instead. + cosmos.base.query.v1beta1.PageRequest pagination = 2 [deprecated = true]; + ; + OrderBy order_by = 3; + // page is the page number to query, starts at 1. If not provided, will default to first page. + uint64 page = 4; + // 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. + uint64 limit = 5; } // OrderBy defines the sorting order @@ -72,7 +77,10 @@ message GetTxsEventResponse { // tx_responses is the list of queried TxResponses. repeated cosmos.base.abci.v1beta1.TxResponse tx_responses = 2; // pagination defines a pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 3; + // Deprecated post v0.46.x: use total instead. + cosmos.base.query.v1beta1.PageResponse pagination = 3 [deprecated = true]; + // total is total number of results available + uint64 total = 4; } // BroadcastTxRequest is the request type for the Service.BroadcastTxRequest diff --git a/third_party/proto/cosmos/tx/v1beta1/tx.proto b/third_party/proto/cosmos/tx/v1beta1/tx.proto index 6d5caf12..a71a3e11 100644 --- a/third_party/proto/cosmos/tx/v1beta1/tx.proto +++ b/third_party/proto/cosmos/tx/v1beta1/tx.proto @@ -6,6 +6,7 @@ import "cosmos/crypto/multisig/v1beta1/multisig.proto"; import "cosmos/base/v1beta1/coin.proto"; import "cosmos/tx/signing/v1beta1/signing.proto"; import "google/protobuf/any.proto"; +import "cosmos_proto/cosmos.proto"; option go_package = "github.com/cosmos/cosmos-sdk/types/tx"; @@ -63,6 +64,38 @@ message SignDoc { uint64 account_number = 4; } +// SignDocDirectAux is the type used for generating sign bytes for +// SIGN_MODE_DIRECT_AUX. +// +// Since: cosmos-sdk 0.46 +message SignDocDirectAux { + // body_bytes is protobuf serialization of a TxBody that matches the + // representation in TxRaw. + bytes body_bytes = 1; + + // public_key is the public key of the signing account. + google.protobuf.Any public_key = 2; + + // chain_id is the identifier of the chain this transaction targets. + // It prevents signed transactions from being used on another chain by an + // attacker. + string chain_id = 3; + + // account_number is the account number of the account in state. + uint64 account_number = 4; + + // sequence is the sequence number of the signing account. + uint64 sequence = 5; + + // Tip is the optional tip used for transactions fees paid in another denom. + // It should be left empty if the signer is not the tipper for this + // transaction. + // + // This field is ignored if the chain didn't enable tips, i.e. didn't add the + // `TipDecorator` in its posthandler. + Tip tip = 6; +} + // TxBody is the body of a transaction that all signers sign over. message TxBody { // messages is a list of messages to be executed. The required signers of @@ -108,6 +141,14 @@ message AuthInfo { // based on the cost of evaluating the body and doing signature verification // of the signers. This can be estimated via simulation. Fee fee = 2; + + // Tip is the optional tip used for transactions fees paid in another denom. + // + // This field is ignored if the chain didn't enable tips, i.e. didn't add the + // `TipDecorator` in its posthandler. + // + // Since: cosmos-sdk 0.46 + Tip tip = 3; } // SignerInfo describes the public key and signing mode of a single top-level @@ -174,10 +215,42 @@ message Fee { // 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. - string payer = 3; + string payer = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // 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 - string granter = 4; + string granter = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// Tip is the tip used for meta-transactions. +// +// Since: cosmos-sdk 0.46 +message Tip { + // amount is the amount of the tip + repeated cosmos.base.v1beta1.Coin amount = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + // tipper is the address of the account paying for the tip + string tipper = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// AuxSignerData is the intermediary format that an auxiliary signer (e.g. a +// tipper) builds and sends to the fee payer (who will build and broadcast the +// actual tx). AuxSignerData is not a valid tx in itself, and will be rejected +// by the node if sent directly as-is. +// +// Since: cosmos-sdk 0.46 +message AuxSignerData { + // address is the bech32-encoded address of the auxiliary signer. If using + // AuxSignerData across different chains, the bech32 prefix of the target + // chain (where the final transaction is broadcasted) should be used. + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // sign_doc is the SIGN_MODE_DIRECT_AUX sign doc that the auxiliary signer + // signs. Note: we use the same sign doc even if we're signing with + // LEGACY_AMINO_JSON. + SignDocDirectAux sign_doc = 2; + // mode is the signing mode of the single signer. + cosmos.tx.signing.v1beta1.SignMode mode = 3; + // sig is the signature of the sign doc. + bytes sig = 4; } diff --git a/third_party/proto/cosmos/upgrade/v1beta1/query.proto b/third_party/proto/cosmos/upgrade/v1beta1/query.proto index dd14ba64..870cf9ee 100644 --- a/third_party/proto/cosmos/upgrade/v1beta1/query.proto +++ b/third_party/proto/cosmos/upgrade/v1beta1/query.proto @@ -1,7 +1,6 @@ syntax = "proto3"; package cosmos.upgrade.v1beta1; -import "google/protobuf/any.proto"; import "google/api/annotations.proto"; import "cosmos/upgrade/v1beta1/upgrade.proto"; @@ -36,6 +35,13 @@ service Query { rpc ModuleVersions(QueryModuleVersionsRequest) returns (QueryModuleVersionsResponse) { option (google.api.http).get = "/cosmos/upgrade/v1beta1/module_versions"; } + + // Returns the account with authority to conduct upgrades + // + // Since: cosmos-sdk 0.46 + rpc Authority(QueryAuthorityRequest) returns (QueryAuthorityResponse) { + option (google.api.http).get = "/cosmos/upgrade/v1beta1/authority"; + } } // QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC @@ -102,3 +108,15 @@ message QueryModuleVersionsResponse { // module_versions is a list of module names with their consensus versions. repeated ModuleVersion module_versions = 1; } + +// QueryAuthorityRequest is the request type for Query/Authority +// +// Since: cosmos-sdk 0.46 +message QueryAuthorityRequest {} + +// QueryAuthorityResponse is the response type for Query/Authority +// +// Since: cosmos-sdk 0.46 +message QueryAuthorityResponse { + string address = 1; +} \ No newline at end of file diff --git a/third_party/proto/cosmos/upgrade/v1beta1/tx.proto b/third_party/proto/cosmos/upgrade/v1beta1/tx.proto new file mode 100644 index 00000000..7a2931da --- /dev/null +++ b/third_party/proto/cosmos/upgrade/v1beta1/tx.proto @@ -0,0 +1,56 @@ +// Since: cosmos-sdk 0.46 +syntax = "proto3"; +package cosmos.upgrade.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/upgrade/v1beta1/upgrade.proto"; +import "cosmos/msg/v1/msg.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/upgrade/types"; + +// Msg defines the upgrade Msg service. +service Msg { + // SoftwareUpgrade is a governance operation for initiating a software upgrade. + // + // Since: cosmos-sdk 0.46 + rpc SoftwareUpgrade(MsgSoftwareUpgrade) returns (MsgSoftwareUpgradeResponse); + // CancelUpgrade is a governance operation for cancelling a previously + // approvid software upgrade. + // + // Since: cosmos-sdk 0.46 + rpc CancelUpgrade(MsgCancelUpgrade) returns (MsgCancelUpgradeResponse); +} + +// MsgSoftwareUpgrade is the Msg/SoftwareUpgrade request type. +// +// Since: cosmos-sdk 0.46 +message MsgSoftwareUpgrade { + option (cosmos.msg.v1.signer) = "authority"; + + // authority is the address of the governance account. + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // plan is the upgrade plan. + Plan plan = 2 [(gogoproto.nullable) = false]; +} + +// MsgSoftwareUpgradeResponse is the Msg/SoftwareUpgrade response type. +// +// Since: cosmos-sdk 0.46 +message MsgSoftwareUpgradeResponse {} + +// MsgCancelUpgrade is the Msg/CancelUpgrade request type. +// +// Since: cosmos-sdk 0.46 +message MsgCancelUpgrade { + option (cosmos.msg.v1.signer) = "authority"; + + // authority is the address of the governance account. + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// MsgCancelUpgradeResponse is the Msg/CancelUpgrade response type. +// +// Since: cosmos-sdk 0.46 +message MsgCancelUpgradeResponse {} diff --git a/third_party/proto/cosmos/upgrade/v1beta1/upgrade.proto b/third_party/proto/cosmos/upgrade/v1beta1/upgrade.proto index e888b393..4d19a299 100644 --- a/third_party/proto/cosmos/upgrade/v1beta1/upgrade.proto +++ b/third_party/proto/cosmos/upgrade/v1beta1/upgrade.proto @@ -4,6 +4,7 @@ package cosmos.upgrade.v1beta1; import "google/protobuf/any.proto"; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; +import "cosmos_proto/cosmos.proto"; option go_package = "github.com/cosmos/cosmos-sdk/x/upgrade/types"; option (gogoproto.goproto_getters_all) = false; @@ -38,15 +39,18 @@ message Plan { // Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been // moved to the IBC module in the sub module 02-client. // If this field is not empty, an error will be thrown. - google.protobuf.Any upgraded_client_state = 5 - [deprecated = true, (gogoproto.moretags) = "yaml:\"upgraded_client_state\""]; + google.protobuf.Any upgraded_client_state = 5 [deprecated = true]; } // SoftwareUpgradeProposal is a gov Content type for initiating a software // upgrade. +// Deprecated: This legacy proposal is deprecated in favor of Msg-based gov +// proposals, see MsgSoftwareUpgrade. message SoftwareUpgradeProposal { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; + option deprecated = true; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; string title = 1; string description = 2; @@ -55,9 +59,13 @@ message SoftwareUpgradeProposal { // CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software // upgrade. +// Deprecated: This legacy proposal is deprecated in favor of Msg-based gov +// proposals, see MsgCancelUpgrade. message CancelSoftwareUpgradeProposal { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; + option deprecated = true; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; string title = 1; string description = 2; diff --git a/third_party/proto/cosmos/vesting/v1beta1/tx.proto b/third_party/proto/cosmos/vesting/v1beta1/tx.proto index c49be802..27511ba8 100644 --- a/third_party/proto/cosmos/vesting/v1beta1/tx.proto +++ b/third_party/proto/cosmos/vesting/v1beta1/tx.proto @@ -3,6 +3,10 @@ package cosmos.vesting.v1beta1; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/vesting/v1beta1/vesting.proto"; + +import "cosmos/msg/v1/msg.proto"; option go_package = "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"; @@ -11,21 +15,72 @@ service Msg { // CreateVestingAccount defines a method that enables creating a vesting // account. rpc CreateVestingAccount(MsgCreateVestingAccount) returns (MsgCreateVestingAccountResponse); + // CreatePermanentLockedAccount defines a method that enables creating a permanent + // locked account. + // + // Since: cosmos-sdk 0.46 + rpc CreatePermanentLockedAccount(MsgCreatePermanentLockedAccount) returns (MsgCreatePermanentLockedAccountResponse); + // CreatePeriodicVestingAccount defines a method that enables creating a + // periodic vesting account. + // + // Since: cosmos-sdk 0.46 + rpc CreatePeriodicVestingAccount(MsgCreatePeriodicVestingAccount) returns (MsgCreatePeriodicVestingAccountResponse); } // MsgCreateVestingAccount defines a message that enables creating a vesting // account. message MsgCreateVestingAccount { + option (cosmos.msg.v1.signer) = "from_address"; + + option (gogoproto.equal) = true; + + string from_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string to_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + repeated cosmos.base.v1beta1.Coin amount = 3 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + + int64 end_time = 4; + bool delayed = 5; +} + +// MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. +message MsgCreateVestingAccountResponse {} + +// MsgCreatePermanentLockedAccount defines a message that enables creating a permanent +// locked account. +// +// Since: cosmos-sdk 0.46 +message MsgCreatePermanentLockedAccount { option (gogoproto.equal) = true; string from_address = 1 [(gogoproto.moretags) = "yaml:\"from_address\""]; string to_address = 2 [(gogoproto.moretags) = "yaml:\"to_address\""]; repeated cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - - int64 end_time = 4 [(gogoproto.moretags) = "yaml:\"end_time\""]; - bool delayed = 5; } -// MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. -message MsgCreateVestingAccountResponse {} \ No newline at end of file +// MsgCreatePermanentLockedAccountResponse defines the Msg/CreatePermanentLockedAccount response type. +// +// Since: cosmos-sdk 0.46 +message MsgCreatePermanentLockedAccountResponse {} + +// MsgCreateVestingAccount defines a message that enables creating a vesting +// account. +// +// Since: cosmos-sdk 0.46 +message MsgCreatePeriodicVestingAccount { + option (cosmos.msg.v1.signer) = "from_address"; + + option (gogoproto.equal) = false; + + string from_address = 1; + string to_address = 2; + int64 start_time = 3; + repeated Period vesting_periods = 4 [(gogoproto.nullable) = false]; +} + +// MsgCreateVestingAccountResponse defines the Msg/CreatePeriodicVestingAccount +// response type. +// +// Since: cosmos-sdk 0.46 +message MsgCreatePeriodicVestingAccountResponse {} diff --git a/third_party/proto/cosmos/vesting/v1beta1/vesting.proto b/third_party/proto/cosmos/vesting/v1beta1/vesting.proto index e9f661f9..824cc30d 100644 --- a/third_party/proto/cosmos/vesting/v1beta1/vesting.proto +++ b/third_party/proto/cosmos/vesting/v1beta1/vesting.proto @@ -14,22 +14,13 @@ message BaseVestingAccount { option (gogoproto.goproto_stringer) = false; cosmos.auth.v1beta1.BaseAccount base_account = 1 [(gogoproto.embed) = true]; - repeated cosmos.base.v1beta1.Coin original_vesting = 2 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.moretags) = "yaml:\"original_vesting\"" - ]; - repeated cosmos.base.v1beta1.Coin delegated_free = 3 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.moretags) = "yaml:\"delegated_free\"" - ]; - repeated cosmos.base.v1beta1.Coin delegated_vesting = 4 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.moretags) = "yaml:\"delegated_vesting\"" - ]; - int64 end_time = 5 [(gogoproto.moretags) = "yaml:\"end_time\""]; + repeated cosmos.base.v1beta1.Coin original_vesting = 2 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + repeated cosmos.base.v1beta1.Coin delegated_free = 3 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + repeated cosmos.base.v1beta1.Coin delegated_vesting = 4 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + int64 end_time = 5; } // ContinuousVestingAccount implements the VestingAccount interface. It @@ -39,7 +30,7 @@ message ContinuousVestingAccount { option (gogoproto.goproto_stringer) = false; BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true]; - int64 start_time = 2 [(gogoproto.moretags) = "yaml:\"start_time\""]; + int64 start_time = 2; } // DelayedVestingAccount implements the VestingAccount interface. It vests all @@ -68,8 +59,8 @@ message PeriodicVestingAccount { option (gogoproto.goproto_stringer) = false; BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true]; - int64 start_time = 2 [(gogoproto.moretags) = "yaml:\"start_time\""]; - repeated Period vesting_periods = 3 [(gogoproto.moretags) = "yaml:\"vesting_periods\"", (gogoproto.nullable) = false]; + int64 start_time = 2; + repeated Period vesting_periods = 3 [(gogoproto.nullable) = false]; } // PermanentLockedAccount implements the VestingAccount interface. It does diff --git a/third_party/proto/ethermint/crypto/v1/ethsecp256k1/keys.proto b/third_party/proto/ethermint/crypto/v1/ethsecp256k1/keys.proto index 788382ab..7f4e4646 100644 --- a/third_party/proto/ethermint/crypto/v1/ethsecp256k1/keys.proto +++ b/third_party/proto/ethermint/crypto/v1/ethsecp256k1/keys.proto @@ -3,7 +3,7 @@ package ethermint.crypto.v1.ethsecp256k1; import "gogoproto/gogo.proto"; -option go_package = "github.com/tharsis/ethermint/crypto/ethsecp256k1"; +option go_package = "github.com/evmos/ethermint/crypto/ethsecp256k1"; // PubKey defines a type alias for an ecdsa.PublicKey that implements // Tendermint's PubKey interface. It represents the 33-byte compressed public @@ -11,9 +11,13 @@ option go_package = "github.com/tharsis/ethermint/crypto/ethsecp256k1"; message PubKey { option (gogoproto.goproto_stringer) = false; + // key is the public key in byte form bytes key = 1; } // PrivKey defines a type alias for an ecdsa.PrivateKey that implements // Tendermint's PrivateKey interface. -message PrivKey { bytes key = 1; } +message PrivKey { + // key is the private key in byte form + bytes key = 1; +} diff --git a/third_party/proto/ethermint/evm/v1/events.proto b/third_party/proto/ethermint/evm/v1/events.proto new file mode 100644 index 00000000..2f1b2806 --- /dev/null +++ b/third_party/proto/ethermint/evm/v1/events.proto @@ -0,0 +1,44 @@ +syntax = "proto3"; +package ethermint.evm.v1; + +option go_package = "github.com/evmos/ethermint/x/evm/types"; + +// EventEthereumTx defines the event for an Ethereum transaction +message EventEthereumTx { + // amount + string amount = 1; + // eth_hash is the Ethereum hash of the transaction + string eth_hash = 2; + // index of the transaction in the block + string index = 3; + // gas_used is the amount of gas used by the transaction + string gas_used = 4; + // hash is the Tendermint hash of the transaction + string hash = 5; + // recipient of the transaction + string recipient = 6; + // eth_tx_failed contains a VM error should it occur + string eth_tx_failed = 7; +} + +// EventTxLog defines the event for an Ethereum transaction log +message EventTxLog { + // tx_logs is an array of transaction logs + repeated string tx_logs = 1; +} + +// EventMessage +message EventMessage { + // module which emits the event + string module = 1; + // sender of the message + string sender = 2; + // tx_type is the type of the message + string tx_type = 3; +} + +// EventBlockBloom defines an Ethereum block bloom filter event +message EventBlockBloom { + // bloom is the bloom filter of the block + string bloom = 1; +} diff --git a/third_party/proto/ethermint/evm/v1/evm.proto b/third_party/proto/ethermint/evm/v1/evm.proto index 359006b9..875619ff 100644 --- a/third_party/proto/ethermint/evm/v1/evm.proto +++ b/third_party/proto/ethermint/evm/v1/evm.proto @@ -3,103 +3,93 @@ package ethermint.evm.v1; import "gogoproto/gogo.proto"; -option go_package = "github.com/tharsis/ethermint/x/evm/types"; +option go_package = "github.com/evmos/ethermint/x/evm/types"; // Params defines the EVM module parameters message Params { - // evm denom represents the token denomination used to run the EVM state + // evm_denom represents the token denomination used to run the EVM state // transitions. - string evm_denom = 1 [ (gogoproto.moretags) = "yaml:\"evm_denom\"" ]; - // enable create toggles state transitions that use the vm.Create function - bool enable_create = 2 [ (gogoproto.moretags) = "yaml:\"enable_create\"" ]; - // enable call toggles state transitions that use the vm.Call function - bool enable_call = 3 [ (gogoproto.moretags) = "yaml:\"enable_call\"" ]; - // extra eips defines the additional EIPs for the vm.Config - repeated int64 extra_eips = 4 [ - (gogoproto.customname) = "ExtraEIPs", - (gogoproto.moretags) = "yaml:\"extra_eips\"" - ]; - // chain config defines the EVM chain configuration parameters - ChainConfig chain_config = 5 [ - (gogoproto.moretags) = "yaml:\"chain_config\"", - (gogoproto.nullable) = false - ]; + string evm_denom = 1 [(gogoproto.moretags) = "yaml:\"evm_denom\""]; + // enable_create toggles state transitions that use the vm.Create function + bool enable_create = 2 [(gogoproto.moretags) = "yaml:\"enable_create\""]; + // enable_call toggles state transitions that use the vm.Call function + bool enable_call = 3 [(gogoproto.moretags) = "yaml:\"enable_call\""]; + // extra_eips defines the additional EIPs for the vm.Config + repeated int64 extra_eips = 4 [(gogoproto.customname) = "ExtraEIPs", (gogoproto.moretags) = "yaml:\"extra_eips\""]; + // chain_config defines the EVM chain configuration parameters + ChainConfig chain_config = 5 [(gogoproto.moretags) = "yaml:\"chain_config\"", (gogoproto.nullable) = false]; // list of allowed eip712 msgs and their types - repeated EIP712AllowedMsg eip712_allowed_msgs = 6 [ - (gogoproto.customname) = "EIP712AllowedMsgs", - (gogoproto.nullable) = false - ]; + repeated EIP712AllowedMsg eip712_allowed_msgs = 6 + [(gogoproto.customname) = "EIP712AllowedMsgs", (gogoproto.nullable) = false]; + // allow_unprotected_txs defines if replay-protected (i.e non EIP155 + // signed) transactions can be executed on the state machine. + bool allow_unprotected_txs = 7; } // ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values // instead of *big.Int. message ChainConfig { - // Homestead switch block (nil no fork, 0 = already homestead) + // homestead_block switch (nil no fork, 0 = already homestead) string homestead_block = 1 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.moretags) = "yaml:\"homestead_block\"" ]; - // TheDAO hard-fork switch block (nil no fork) + // dao_fork_block corresponds to TheDAO hard-fork switch block (nil no fork) string dao_fork_block = 2 [ (gogoproto.customname) = "DAOForkBlock", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.moretags) = "yaml:\"dao_fork_block\"" ]; - // Whether the nodes supports or opposes the DAO hard-fork - bool dao_fork_support = 3 [ - (gogoproto.customname) = "DAOForkSupport", - (gogoproto.moretags) = "yaml:\"dao_fork_support\"" - ]; - // EIP150 implements the Gas price changes + // dao_fork_support defines whether the nodes supports or opposes the DAO hard-fork + bool dao_fork_support = 3 + [(gogoproto.customname) = "DAOForkSupport", (gogoproto.moretags) = "yaml:\"dao_fork_support\""]; + // eip150_block: EIP150 implements the Gas price changes // (https://github.com/ethereum/EIPs/issues/150) EIP150 HF block (nil no fork) string eip150_block = 4 [ (gogoproto.customname) = "EIP150Block", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.moretags) = "yaml:\"eip150_block\"" ]; - // EIP150 HF hash (needed for header only clients as only gas pricing changed) - string eip150_hash = 5 [ - (gogoproto.customname) = "EIP150Hash", - (gogoproto.moretags) = "yaml:\"byzantium_block\"" - ]; - // EIP155Block HF block + // eip150_hash: EIP150 HF hash (needed for header only clients as only gas pricing changed) + string eip150_hash = 5 [(gogoproto.customname) = "EIP150Hash", (gogoproto.moretags) = "yaml:\"byzantium_block\""]; + // eip155_block: EIP155Block HF block string eip155_block = 6 [ (gogoproto.customname) = "EIP155Block", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.moretags) = "yaml:\"eip155_block\"" ]; - // EIP158 HF block + // eip158_block: EIP158 HF block string eip158_block = 7 [ (gogoproto.customname) = "EIP158Block", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.moretags) = "yaml:\"eip158_block\"" ]; - // Byzantium switch block (nil no fork, 0 = already on byzantium) + // byzantium_block: Byzantium switch block (nil no fork, 0 = already on byzantium) string byzantium_block = 8 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.moretags) = "yaml:\"byzantium_block\"" ]; - // Constantinople switch block (nil no fork, 0 = already activated) + // constantinople_block: Constantinople switch block (nil no fork, 0 = already activated) string constantinople_block = 9 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.moretags) = "yaml:\"constantinople_block\"" ]; - // Petersburg switch block (nil same as Constantinople) + // petersburg_block: Petersburg switch block (nil same as Constantinople) string petersburg_block = 10 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.moretags) = "yaml:\"petersburg_block\"" ]; - // Istanbul switch block (nil no fork, 0 = already on istanbul) + // istanbul_block: Istanbul switch block (nil no fork, 0 = already on istanbul) string istanbul_block = 11 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.moretags) = "yaml:\"istanbul_block\"" ]; - // Eip-2384 (bomb delay) switch block (nil no fork, 0 = already activated) + // muir_glacier_block: Eip-2384 (bomb delay) switch block (nil no fork, 0 = already activated) string muir_glacier_block = 12 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.moretags) = "yaml:\"muir_glacier_block\"" ]; - // Berlin switch block (nil = no fork, 0 = already on berlin) + // berlin_block: Berlin switch block (nil = no fork, 0 = already on berlin) string berlin_block = 13 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.moretags) = "yaml:\"berlin_block\"" @@ -107,26 +97,46 @@ message ChainConfig { // DEPRECATED: EWASM, YOLOV3 and Catalyst block have been deprecated reserved 14, 15, 16; reserved "yolo_v3_block", "ewasm_block", "catalyst_block"; - // London switch block (nil = no fork, 0 = already on london) + // london_block: London switch block (nil = no fork, 0 = already on london) string london_block = 17 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.moretags) = "yaml:\"london_block\"" ]; - // Eip-4345 (bomb delay) switch block (nil = no fork, 0 = already activated) + // arrow_glacier_block: Eip-4345 (bomb delay) switch block (nil = no fork, 0 = already activated) string arrow_glacier_block = 18 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.moretags) = "yaml:\"arrow_glacier_block\"" ]; - // EIP-3675 (TheMerge) switch block (nil = no fork, 0 = already in merge proceedings) - string merge_fork_block = 19 [ + // DEPRECATED: merge fork block was deprecated: https://github.com/ethereum/go-ethereum/pull/24904 + reserved 19; + reserved "merge_fork_block"; + // gray_glacier_block: EIP-5133 (bomb delay) switch block (nil = no fork, 0 = already activated) + string gray_glacier_block = 20 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"merge_fork_block\"" + (gogoproto.moretags) = "yaml:\"gray_glacier_block\"" + ]; + // merge_netsplit_block: Virtual fork after The Merge to use as a network splitter + string merge_netsplit_block = 21 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.moretags) = "yaml:\"merge_netsplit_block\"" + ]; + // shanghai_block switch block (nil = no fork, 0 = already on shanghai) + string shanghai_block = 22 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.moretags) = "yaml:\"shanghai_block\"" + ]; + // cancun_block switch block (nil = no fork, 0 = already on cancun) + string cancun_block = 23 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.moretags) = "yaml:\"cancun_block\"" ]; } // State represents a single Storage key value pair item. message State { + // key is the stored key string key = 1; + // value is the stored value for the given key string value = 2; } @@ -134,38 +144,38 @@ message State { // with a given hash. It it used for import/export data as transactions are not // persisted on blockchain state after an upgrade. message TransactionLogs { + // hash of the transaction string hash = 1; + // logs is an array of Logs for the given transaction hash repeated Log logs = 2; } // Log represents an protobuf compatible Ethereum Log that defines a contract // log event. These events are generated by the LOG opcode and stored/indexed by // the node. +// +// NOTE: address, topics and data are consensus fields. The rest of the fields +// are derived, i.e. filled in by the nodes, but not secured by consensus. message Log { - // Consensus fields: - // address of the contract that generated the event string address = 1; - // list of topics provided by the contract. + // topics is a list of topics provided by the contract. repeated string topics = 2; - // supplied by the contract, usually ABI-encoded + // data which is supplied by the contract, usually ABI-encoded bytes data = 3; - // Derived fields. These fields are filled in by the node - // but not secured by consensus. - - // block in which the transaction was included - uint64 block_number = 4 [ (gogoproto.jsontag) = "blockNumber" ]; - // hash of the transaction - string tx_hash = 5 [ (gogoproto.jsontag) = "transactionHash" ]; - // index of the transaction in the block - uint64 tx_index = 6 [ (gogoproto.jsontag) = "transactionIndex" ]; - // hash of the block in which the transaction was included - string block_hash = 7 [ (gogoproto.jsontag) = "blockHash" ]; + // block_number of the block in which the transaction was included + uint64 block_number = 4 [(gogoproto.jsontag) = "blockNumber"]; + // tx_hash is the transaction hash + string tx_hash = 5 [(gogoproto.jsontag) = "transactionHash"]; + // tx_index of the transaction in the block + uint64 tx_index = 6 [(gogoproto.jsontag) = "transactionIndex"]; + // block_hash of the block in which the transaction was included + string block_hash = 7 [(gogoproto.jsontag) = "blockHash"]; // index of the log in the block - uint64 index = 8 [ (gogoproto.jsontag) = "logIndex" ]; + uint64 index = 8 [(gogoproto.jsontag) = "logIndex"]; - // The Removed field is true if this log was reverted due to a chain + // removed is true if this log was reverted due to a chain // reorganisation. You must pay attention to this field if you receive logs // through a filter query. bool removed = 9; @@ -178,16 +188,12 @@ message TxResult { // contract_address contains the ethereum address of the created contract (if // any). If the state transition is an evm.Call, the contract address will be // empty. - string contract_address = 1 - [ (gogoproto.moretags) = "yaml:\"contract_address\"" ]; + string contract_address = 1 [(gogoproto.moretags) = "yaml:\"contract_address\""]; // bloom represents the bloom filter bytes bytes bloom = 2; // tx_logs contains the transaction hash and the proto-compatible ethereum // logs. - TransactionLogs tx_logs = 3 [ - (gogoproto.moretags) = "yaml:\"tx_logs\"", - (gogoproto.nullable) = false - ]; + TransactionLogs tx_logs = 3 [(gogoproto.moretags) = "yaml:\"tx_logs\"", (gogoproto.nullable) = false]; // ret defines the bytes from the execution. bytes ret = 4; // reverted flag is set to true when the call has been reverted @@ -200,10 +206,10 @@ message TxResult { message AccessTuple { option (gogoproto.goproto_getters) = false; - // hex formatted ethereum address + // address is a hex formatted ethereum address string address = 1; - // hex formatted hashes of the storage keys - repeated string storage_keys = 2 [ (gogoproto.jsontag) = "storageKeys" ]; + // storage_keys are hex formatted hashes of the storage keys + repeated string storage_keys = 2 [(gogoproto.jsontag) = "storageKeys"]; } // TraceConfig holds extra parameters to trace functions. @@ -213,27 +219,29 @@ message TraceConfig { reserved 4, 7; reserved "disable_memory", "disable_return_data"; - // custom javascript tracer + // tracer is a custom javascript tracer string tracer = 1; - // overrides the default timeout of 5 seconds for JavaScript-based tracing + // timeout overrides the default timeout of 5 seconds for JavaScript-based tracing // calls string timeout = 2; - // number of blocks the tracer is willing to go back + // reexec defines the number of blocks the tracer is willing to go back uint64 reexec = 3; - // disable stack capture - bool disable_stack = 5 [ (gogoproto.jsontag) = "disableStack" ]; - // disable storage capture - bool disable_storage = 6 [ (gogoproto.jsontag) = "disableStorage" ]; - // print output during capture end + // disable_stack switches stack capture + bool disable_stack = 5 [(gogoproto.jsontag) = "disableStack"]; + // disable_storage switches storage capture + bool disable_storage = 6 [(gogoproto.jsontag) = "disableStorage"]; + // debug can be used to print output during capture end bool debug = 8; - // maximum length of output, but zero means unlimited + // limit defines the maximum length of output, but zero means unlimited int32 limit = 9; - // Chain overrides, can be used to execute a trace using future fork rules + // overrides can be used to execute a trace using future fork rules ChainConfig overrides = 10; - // enable memory capture - bool enable_memory = 11 [ (gogoproto.jsontag) = "enableMemory" ]; - // enable return data capture - bool enable_return_data = 12 [ (gogoproto.jsontag) = "enableReturnData" ]; + // enable_memory switches memory capture + bool enable_memory = 11 [(gogoproto.jsontag) = "enableMemory"]; + // enable_return_data switches the capture of return data + bool enable_return_data = 12 [(gogoproto.jsontag) = "enableReturnData"]; + // tracer_json_config configures the tracer using a JSON string + string tracer_json_config = 13 [(gogoproto.jsontag) = "tracerConfig"]; } // EIP712AllowedMsg stores an allowed legacy msg and its eip712 type. diff --git a/third_party/proto/ethermint/evm/v1/genesis.proto b/third_party/proto/ethermint/evm/v1/genesis.proto index 65d27321..a7e4f04a 100644 --- a/third_party/proto/ethermint/evm/v1/genesis.proto +++ b/third_party/proto/ethermint/evm/v1/genesis.proto @@ -1,17 +1,17 @@ syntax = "proto3"; package ethermint.evm.v1; -import "gogoproto/gogo.proto"; import "ethermint/evm/v1/evm.proto"; +import "gogoproto/gogo.proto"; -option go_package = "github.com/tharsis/ethermint/x/evm/types"; +option go_package = "github.com/evmos/ethermint/x/evm/types"; // GenesisState defines the evm module's genesis state. message GenesisState { // accounts is an array containing the ethereum genesis accounts. - repeated GenesisAccount accounts = 1 [ (gogoproto.nullable) = false ]; + repeated GenesisAccount accounts = 1 [(gogoproto.nullable) = false]; // params defines all the parameters of the module. - Params params = 2 [ (gogoproto.nullable) = false ]; + Params params = 2 [(gogoproto.nullable) = false]; } // GenesisAccount defines an account to be initialized in the genesis state. @@ -23,6 +23,5 @@ message GenesisAccount { // code defines the hex bytes of the account code. string code = 2; // storage defines the set of state key values for the account. - repeated State storage = 3 - [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "Storage" ]; + repeated State storage = 3 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "Storage"]; } diff --git a/third_party/proto/ethermint/evm/v1/query.proto b/third_party/proto/ethermint/evm/v1/query.proto index 812ed166..e533edc9 100644 --- a/third_party/proto/ethermint/evm/v1/query.proto +++ b/third_party/proto/ethermint/evm/v1/query.proto @@ -1,14 +1,14 @@ syntax = "proto3"; package ethermint.evm.v1; -import "gogoproto/gogo.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; -import "google/api/annotations.proto"; import "ethermint/evm/v1/evm.proto"; import "ethermint/evm/v1/tx.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; import "google/protobuf/timestamp.proto"; -option go_package = "github.com/tharsis/ethermint/x/evm/types"; +option go_package = "github.com/evmos/ethermint/x/evm/types"; // Query defines the gRPC querier service. service Query { @@ -18,17 +18,14 @@ service Query { } // CosmosAccount queries an Ethereum account's Cosmos Address. - rpc CosmosAccount(QueryCosmosAccountRequest) - returns (QueryCosmosAccountResponse) { + rpc CosmosAccount(QueryCosmosAccountRequest) returns (QueryCosmosAccountResponse) { option (google.api.http).get = "/ethermint/evm/v1/cosmos_account/{address}"; } // ValidatorAccount queries an Ethereum account's from a validator consensus // Address. - rpc ValidatorAccount(QueryValidatorAccountRequest) - returns (QueryValidatorAccountResponse) { - option (google.api.http).get = - "/ethermint/evm/v1/validator_account/{cons_address}"; + rpc ValidatorAccount(QueryValidatorAccountRequest) returns (QueryValidatorAccountResponse) { + option (google.api.http).get = "/ethermint/evm/v1/validator_account/{cons_address}"; } // Balance queries the balance of a the EVM denomination for a single @@ -71,6 +68,12 @@ service Query { rpc TraceBlock(QueryTraceBlockRequest) returns (QueryTraceBlockResponse) { option (google.api.http).get = "/ethermint/evm/v1/trace_block"; } + + // BaseFee queries the base fee of the parent block of the current block, + // it's similar to feemarket module's method, but also checks london hardfork status. + rpc BaseFee(QueryBaseFeeRequest) returns (QueryBaseFeeResponse) { + option (google.api.http).get = "/ethermint/evm/v1/base_fee"; + } } // QueryAccountRequest is the request type for the Query/Account RPC method. @@ -86,7 +89,7 @@ message QueryAccountRequest { message QueryAccountResponse { // balance is the balance of the EVM denomination. string balance = 1; - // code hash is the hex-formatted code bytes from the EOA. + // code_hash is the hex-formatted code bytes from the EOA. string code_hash = 2; // nonce is the account's sequence number. uint64 nonce = 3; @@ -109,7 +112,7 @@ message QueryCosmosAccountResponse { string cosmos_address = 1; // sequence is the account's sequence number. uint64 sequence = 2; - // account_number is the account numbert + // account_number is the account number uint64 account_number = 3; } @@ -154,7 +157,7 @@ message QueryStorageRequest { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; - /// address is the ethereum hex address to query the storage state for. + // address is the ethereum hex address to query the storage state for. string address = 1; // key defines the key of the storage state @@ -164,7 +167,7 @@ message QueryStorageRequest { // QueryStorageResponse is the response type for the Query/Storage RPC // method. message QueryStorageResponse { - // key defines the storage state value hash associated with the given key. + // value defines the storage state value hash associated with the given key. string value = 1; } @@ -195,7 +198,7 @@ message QueryTxLogsRequest { cosmos.base.query.v1beta1.PageRequest pagination = 2; } -// QueryTxLogs is the response type for the Query/TxLogs RPC method. +// QueryTxLogsResponse is the response type for the Query/TxLogs RPC method. message QueryTxLogsResponse { // logs represents the ethereum logs generated from the given transaction. repeated Log logs = 1; @@ -209,65 +212,87 @@ message QueryParamsRequest {} // QueryParamsResponse defines the response type for querying x/evm parameters. message QueryParamsResponse { // params define the evm module parameters. - Params params = 1 [ (gogoproto.nullable) = false ]; + Params params = 1 [(gogoproto.nullable) = false]; } // EthCallRequest defines EthCall request message EthCallRequest { - // same json format as the json rpc api. + // args uses the same json format as the json rpc api. bytes args = 1; - // the default gas cap to be used + // gas_cap defines the default gas cap to be used uint64 gas_cap = 2; + // proposer_address of the requested block in hex format + bytes proposer_address = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ConsAddress"]; + // chain_id is the eip155 chain id parsed from the requested block header + int64 chain_id = 4; } // EstimateGasResponse defines EstimateGas response message EstimateGasResponse { - // the estimated gas + // gas returns the estimated gas uint64 gas = 1; } // QueryTraceTxRequest defines TraceTx request message QueryTraceTxRequest { - // msgEthereumTx for the requested transaction + // msg is the MsgEthereumTx for the requested transaction MsgEthereumTx msg = 1; // tx_index is not necessary anymore reserved 2; reserved "tx_index"; - // TraceConfig holds extra parameters to trace functions. + // trace_config holds extra parameters to trace functions. TraceConfig trace_config = 3; - // the predecessor transactions included in the same block + // predecessors is an array of transactions included in the same block // need to be replayed first to get correct context for tracing. repeated MsgEthereumTx predecessors = 4; - // block number of requested transaction + // block_number of requested transaction int64 block_number = 5; - // block hex hash of requested transaction + // block_hash of requested transaction string block_hash = 6; - // block time of requested transaction + // block_time of requested transaction google.protobuf.Timestamp block_time = 7 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + // proposer_address is the proposer of the requested block + bytes proposer_address = 8 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ConsAddress"]; + // chain_id is the the eip155 chain id parsed from the requested block header + int64 chain_id = 9; } // QueryTraceTxResponse defines TraceTx response message QueryTraceTxResponse { - // response serialized in bytes + // data is the response serialized in bytes bytes data = 1; } // QueryTraceBlockRequest defines TraceTx request message QueryTraceBlockRequest { - // txs messages in the block + // txs is an array of messages in the block repeated MsgEthereumTx txs = 1; - // TraceConfig holds extra parameters to trace functions. + // trace_config holds extra parameters to trace functions. TraceConfig trace_config = 3; - // block number + // block_number of the traced block int64 block_number = 5; - // block hex hash + // block_hash (hex) of the traced block string block_hash = 6; - // block time + // block_time of the traced block google.protobuf.Timestamp block_time = 7 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + // proposer_address is the address of the requested block + bytes proposer_address = 8 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ConsAddress"]; + // chain_id is the eip155 chain id parsed from the requested block header + int64 chain_id = 9; } // QueryTraceBlockResponse defines TraceBlock response message QueryTraceBlockResponse { + // data is the response serialized in bytes bytes data = 1; } +// QueryBaseFeeRequest defines the request type for querying the EIP1559 base +// fee. +message QueryBaseFeeRequest {} + +// QueryBaseFeeResponse returns the EIP1559 base fee. +message QueryBaseFeeResponse { + // base_fee is the EIP1559 base fee + string base_fee = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"]; +} diff --git a/third_party/proto/ethermint/evm/v1/tx.proto b/third_party/proto/ethermint/evm/v1/tx.proto index 1a239689..737b2949 100644 --- a/third_party/proto/ethermint/evm/v1/tx.proto +++ b/third_party/proto/ethermint/evm/v1/tx.proto @@ -1,13 +1,14 @@ syntax = "proto3"; package ethermint.evm.v1; +import "cosmos/msg/v1/msg.proto"; +import "cosmos_proto/cosmos.proto"; +import "ethermint/evm/v1/evm.proto"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "google/protobuf/any.proto"; -import "cosmos_proto/cosmos.proto"; -import "ethermint/evm/v1/evm.proto"; -option go_package = "github.com/tharsis/ethermint/x/evm/types"; +option go_package = "github.com/evmos/ethermint/x/evm/types"; // Msg defines the evm Msg service. service Msg { @@ -15,46 +16,47 @@ service Msg { rpc EthereumTx(MsgEthereumTx) returns (MsgEthereumTxResponse) { option (google.api.http).post = "/ethermint/evm/v1/ethereum_tx"; }; + // UpdateParams defined a governance operation for updating the x/evm module parameters. + // The authority is hard-coded to the Cosmos SDK x/gov module account + rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); } // MsgEthereumTx encapsulates an Ethereum transaction as an SDK message. message MsgEthereumTx { option (gogoproto.goproto_getters) = false; - // inner transaction data + // data is inner transaction data of the Ethereum transaction google.protobuf.Any data = 1; - // caches - // encoded storage size of the transaction - double size = 2 [ (gogoproto.jsontag) = "-" ]; - // transaction hash in hex format - string hash = 3 [ (gogoproto.moretags) = "rlp:\"-\"" ]; - // ethereum signer address in hex format. This address value is checked + // size is the encoded storage size of the transaction (DEPRECATED) + double size = 2 [(gogoproto.jsontag) = "-"]; + // hash of the transaction in hex format + string hash = 3 [(gogoproto.moretags) = "rlp:\"-\""]; + // from is the ethereum signer address in hex format. This address value is checked // against the address derived from the signature (V, R, S) using the // secp256k1 elliptic curve string from = 4; } // LegacyTx is the transaction data of regular Ethereum transactions. +// NOTE: All non-protected transactions (i.e non EIP155 signed) will fail if the +// AllowUnprotectedTxs parameter is disabled. message LegacyTx { option (gogoproto.goproto_getters) = false; option (cosmos_proto.implements_interface) = "TxData"; // nonce corresponds to the account nonce (transaction sequence). uint64 nonce = 1; - // gas price defines the value for each gas unit - string gas_price = 2 - [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; + // gas_price defines the value for each gas unit + string gas_price = 2 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"]; // gas defines the gas limit defined for the transaction. - uint64 gas = 3 [ (gogoproto.customname) = "GasLimit" ]; - // hex formatted address of the recipient + uint64 gas = 3 [(gogoproto.customname) = "GasLimit"]; + // to is the hex formatted address of the recipient string to = 4; // value defines the unsigned integer value of the transaction amount. - string value = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.customname) = "Amount" - ]; - // input defines the data payload bytes of the transaction. + string value = 5 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.customname) = "Amount"]; + // data is the data payload bytes of the transaction. bytes data = 6; // v defines the signature value bytes v = 7; @@ -69,7 +71,7 @@ message AccessListTx { option (gogoproto.goproto_getters) = false; option (cosmos_proto.implements_interface) = "TxData"; - // destination EVM chain ID + // chain_id of the destination EVM chain string chain_id = 1 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.customname) = "ChainID", @@ -77,25 +79,20 @@ message AccessListTx { ]; // nonce corresponds to the account nonce (transaction sequence). uint64 nonce = 2; - // gas price defines the value for each gas unit - string gas_price = 3 - [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; + // gas_price defines the value for each gas unit + string gas_price = 3 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"]; // gas defines the gas limit defined for the transaction. - uint64 gas = 4 [ (gogoproto.customname) = "GasLimit" ]; - // hex formatted address of the recipient + uint64 gas = 4 [(gogoproto.customname) = "GasLimit"]; + // to is the recipient address in hex format string to = 5; // value defines the unsigned integer value of the transaction amount. - string value = 6 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.customname) = "Amount" - ]; - // input defines the data payload bytes of the transaction. + string value = 6 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.customname) = "Amount"]; + // data is the data payload bytes of the transaction. bytes data = 7; - repeated AccessTuple accesses = 8 [ - (gogoproto.castrepeated) = "AccessList", - (gogoproto.jsontag) = "accessList", - (gogoproto.nullable) = false - ]; + // accesses is an array of access tuples + repeated AccessTuple accesses = 8 + [(gogoproto.castrepeated) = "AccessList", (gogoproto.jsontag) = "accessList", (gogoproto.nullable) = false]; // v defines the signature value bytes v = 9; // r defines the signature value @@ -109,7 +106,7 @@ message DynamicFeeTx { option (gogoproto.goproto_getters) = false; option (cosmos_proto.implements_interface) = "TxData"; - // destination EVM chain ID + // chain_id of the destination EVM chain string chain_id = 1 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.customname) = "ChainID", @@ -117,28 +114,22 @@ message DynamicFeeTx { ]; // nonce corresponds to the account nonce (transaction sequence). uint64 nonce = 2; - // gas tip cap defines the max value for the gas tip - string gas_tip_cap = 3 - [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; - // gas fee cap defines the max value for the gas fee - string gas_fee_cap = 4 - [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; + // gas_tip_cap defines the max value for the gas tip + string gas_tip_cap = 3 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"]; + // gas_fee_cap defines the max value for the gas fee + string gas_fee_cap = 4 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"]; // gas defines the gas limit defined for the transaction. - uint64 gas = 5 [ (gogoproto.customname) = "GasLimit" ]; - // hex formatted address of the recipient + uint64 gas = 5 [(gogoproto.customname) = "GasLimit"]; + // to is the hex formatted address of the recipient string to = 6; // value defines the the transaction amount. - string value = 7 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.customname) = "Amount" - ]; - // input defines the data payload bytes of the transaction. + string value = 7 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.customname) = "Amount"]; + // data is the data payload bytes of the transaction. bytes data = 8; - repeated AccessTuple accesses = 9 [ - (gogoproto.castrepeated) = "AccessList", - (gogoproto.jsontag) = "accessList", - (gogoproto.nullable) = false - ]; + // accesses is an array of access tuples + repeated AccessTuple accesses = 9 + [(gogoproto.castrepeated) = "AccessList", (gogoproto.jsontag) = "accessList", (gogoproto.nullable) = false]; // v defines the signature value bytes v = 10; // r defines the signature value @@ -147,6 +138,7 @@ message DynamicFeeTx { bytes s = 12; } +// ExtensionOptionsEthereumTx is an extension option for ethereum transactions message ExtensionOptionsEthereumTx { option (gogoproto.goproto_getters) = false; } @@ -155,18 +147,34 @@ message ExtensionOptionsEthereumTx { message MsgEthereumTxResponse { option (gogoproto.goproto_getters) = false; - // ethereum transaction hash in hex format. This hash differs from the + // hash of the ethereum transaction in hex format. This hash differs from the // Tendermint sha256 hash of the transaction bytes. See // https://github.com/tendermint/tendermint/issues/6539 for reference string hash = 1; // logs contains the transaction hash and the proto-compatible ethereum // logs. repeated Log logs = 2; - // returned data from evm function (result or data supplied with revert + // ret is the returned data from evm function (result or data supplied with revert // opcode) bytes ret = 3; - // vm error is the error returned by vm execution + // vm_error is the error returned by vm execution string vm_error = 4; - // gas consumed by the transaction + // gas_used specifies how much gas was consumed by the transaction uint64 gas_used = 5; } + +// MsgUpdateParams defines a Msg for updating the x/evm module parameters. +message MsgUpdateParams { + option (cosmos.msg.v1.signer) = "authority"; + + // authority is the address of the governance account. + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // params defines the x/evm parameters to update. + // NOTE: All parameters must be supplied. + Params params = 2 [(gogoproto.nullable) = false]; +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +message MsgUpdateParamsResponse {} diff --git a/third_party/proto/ethermint/feemarket/v1/events.proto b/third_party/proto/ethermint/feemarket/v1/events.proto new file mode 100644 index 00000000..74dff2e6 --- /dev/null +++ b/third_party/proto/ethermint/feemarket/v1/events.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; +package ethermint.feemarket.v1; + +option go_package = "github.com/evmos/ethermint/x/feemarket/types"; + +// EventFeeMarket is the event type for the fee market module +message EventFeeMarket { + // base_fee for EIP-1559 blocks + string base_fee = 1; +} + +// EventBlockGas defines an Ethereum block gas event +message EventBlockGas { + // height of the block + string height = 1; + // amount of gas wanted by the block + string amount = 2; +} diff --git a/third_party/proto/ethermint/feemarket/v1/feemarket.proto b/third_party/proto/ethermint/feemarket/v1/feemarket.proto index 1aab31e2..eb89f71c 100644 --- a/third_party/proto/ethermint/feemarket/v1/feemarket.proto +++ b/third_party/proto/ethermint/feemarket/v1/feemarket.proto @@ -3,26 +3,30 @@ package ethermint.feemarket.v1; import "gogoproto/gogo.proto"; -option go_package = "github.com/tharsis/ethermint/x/feemarket/types"; +option go_package = "github.com/evmos/ethermint/x/feemarket/types"; // Params defines the EVM module parameters message Params { - // no base fee forces the EIP-1559 base fee to 0 (needed for 0 price calls) + // no_base_fee forces the EIP-1559 base fee to 0 (needed for 0 price calls) bool no_base_fee = 1; - // base fee change denominator bounds the amount the base fee can change + // base_fee_change_denominator bounds the amount the base fee can change // between blocks. uint32 base_fee_change_denominator = 2; - // elasticity multiplier bounds the maximum gas limit an EIP-1559 block may + // elasticity_multiplier bounds the maximum gas limit an EIP-1559 block may // have. uint32 elasticity_multiplier = 3; // DEPRECATED: initial base fee for EIP-1559 blocks. - reserved 4; + reserved 4; reserved "initial_base_fee"; - // height at which the base fee calculation is enabled. + // enable_height defines at which block height the base fee calculation is enabled. int64 enable_height = 5; - // base fee for EIP-1559 blocks. - string base_fee = 6 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; -} \ No newline at end of file + // base_fee for EIP-1559 blocks. + string base_fee = 6 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + // min_gas_price defines the minimum gas price value for cosmos and eth transactions + string min_gas_price = 7 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + // min_gas_multiplier bounds the minimum gas used to be charged + // to senders based on gas limit + string min_gas_multiplier = 8 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; +} diff --git a/third_party/proto/ethermint/feemarket/v1/genesis.proto b/third_party/proto/ethermint/feemarket/v1/genesis.proto index 362d8c44..2b3613cf 100644 --- a/third_party/proto/ethermint/feemarket/v1/genesis.proto +++ b/third_party/proto/ethermint/feemarket/v1/genesis.proto @@ -1,20 +1,20 @@ syntax = "proto3"; package ethermint.feemarket.v1; -import "gogoproto/gogo.proto"; import "ethermint/feemarket/v1/feemarket.proto"; +import "gogoproto/gogo.proto"; -option go_package = "github.com/tharsis/ethermint/x/feemarket/types"; +option go_package = "github.com/evmos/ethermint/x/feemarket/types"; // GenesisState defines the feemarket module's genesis state. message GenesisState { - // params defines all the paramaters of the module. - Params params = 1 [ (gogoproto.nullable) = false ]; + // params defines all the parameters of the feemarket module. + Params params = 1 [(gogoproto.nullable) = false]; // DEPRECATED: base fee is the exported value from previous software version. // Zero by default. reserved 2; reserved "base_fee"; - // block gas is the amount of gas used on the last block before the upgrade. + // block_gas is the amount of gas wanted on the last block before the upgrade. // Zero by default. uint64 block_gas = 3; } \ No newline at end of file diff --git a/third_party/proto/ethermint/feemarket/v1/query.proto b/third_party/proto/ethermint/feemarket/v1/query.proto index b960808d..2cc763a6 100644 --- a/third_party/proto/ethermint/feemarket/v1/query.proto +++ b/third_party/proto/ethermint/feemarket/v1/query.proto @@ -3,10 +3,10 @@ package ethermint.feemarket.v1; import "gogoproto/gogo.proto"; // import "cosmos/base/query/v1beta1/pagination.proto"; -import "google/api/annotations.proto"; import "ethermint/feemarket/v1/feemarket.proto"; +import "google/api/annotations.proto"; -option go_package = "github.com/tharsis/ethermint/x/feemarket/types"; +option go_package = "github.com/evmos/ethermint/x/feemarket/types"; // Query defines the gRPC querier service. service Query { @@ -32,17 +32,17 @@ message QueryParamsRequest {} // QueryParamsResponse defines the response type for querying x/evm parameters. message QueryParamsResponse { // params define the evm module parameters. - Params params = 1 [ (gogoproto.nullable) = false ]; + Params params = 1 [(gogoproto.nullable) = false]; } // QueryBaseFeeRequest defines the request type for querying the EIP1559 base // fee. message QueryBaseFeeRequest {} -// BaseFeeResponse returns the EIP1559 base fee. +// QueryBaseFeeResponse returns the EIP1559 base fee. message QueryBaseFeeResponse { - string base_fee = 1 - [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; + // base_fee is the EIP1559 base fee + string base_fee = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"]; } // QueryBlockGasRequest defines the request type for querying the EIP1559 base @@ -50,4 +50,7 @@ message QueryBaseFeeResponse { message QueryBlockGasRequest {} // QueryBlockGasResponse returns block gas used for a given height. -message QueryBlockGasResponse { int64 gas = 1; } \ No newline at end of file +message QueryBlockGasResponse { + // gas is the returned block gas + int64 gas = 1; +} \ No newline at end of file diff --git a/third_party/proto/ethermint/feemarket/v1/tx.proto b/third_party/proto/ethermint/feemarket/v1/tx.proto new file mode 100644 index 00000000..c8711960 --- /dev/null +++ b/third_party/proto/ethermint/feemarket/v1/tx.proto @@ -0,0 +1,30 @@ +syntax = "proto3"; +package ethermint.feemarket.v1; + +import "cosmos/msg/v1/msg.proto"; +import "cosmos_proto/cosmos.proto"; +import "ethermint/feemarket/v1/feemarket.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/evmos/ethermint/x/feemarket/types"; + +// Msg defines the erc20 Msg service. +service Msg { + // UpdateParams defined a governance operation for updating the x/feemarket module parameters. + // The authority is hard-coded to the Cosmos SDK x/gov module account + rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); +} + +// MsgUpdateParams defines a Msg for updating the x/feemarket module parameters. +message MsgUpdateParams { + option (cosmos.msg.v1.signer) = "authority"; + // authority is the address of the governance account. + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // params defines the x/feemarket parameters to update. + // NOTE: All parameters must be supplied. + Params params = 2 [(gogoproto.nullable) = false]; +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +message MsgUpdateParamsResponse {} diff --git a/third_party/proto/ethermint/types/v1/account.proto b/third_party/proto/ethermint/types/v1/account.proto index 6beffb27..e50c9bbe 100644 --- a/third_party/proto/ethermint/types/v1/account.proto +++ b/third_party/proto/ethermint/types/v1/account.proto @@ -5,7 +5,7 @@ import "cosmos/auth/v1beta1/auth.proto"; import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; -option go_package = "github.com/tharsis/ethermint/types"; +option go_package = "github.com/evmos/ethermint/types"; // EthAccount implements the authtypes.AccountI interface and embeds an // authtypes.BaseAccount type. It is compatible with the auth AccountKeeper. @@ -14,12 +14,12 @@ message EthAccount { option (gogoproto.goproto_stringer) = false; option (gogoproto.equal) = false; - option (cosmos_proto.implements_interface) = - "github.com/cosmos/cosmos-sdk/x/auth/types.AccountI"; + option (cosmos_proto.implements_interface) = "github.com/cosmos/cosmos-sdk/x/auth/types.AccountI"; - cosmos.auth.v1beta1.BaseAccount base_account = 1 [ - (gogoproto.embed) = true, - (gogoproto.moretags) = "yaml:\"base_account\"" - ]; - string code_hash = 2 [ (gogoproto.moretags) = "yaml:\"code_hash\"" ]; + // base_account is an authtypes.BaseAccount + cosmos.auth.v1beta1.BaseAccount base_account = 1 + [(gogoproto.embed) = true, (gogoproto.moretags) = "yaml:\"base_account\""]; + + // code_hash is the hash calculated from the code contents + string code_hash = 2 [(gogoproto.moretags) = "yaml:\"code_hash\""]; } diff --git a/third_party/proto/ethermint/types/v1/dynamic_fee.proto b/third_party/proto/ethermint/types/v1/dynamic_fee.proto new file mode 100644 index 00000000..d073b29f --- /dev/null +++ b/third_party/proto/ethermint/types/v1/dynamic_fee.proto @@ -0,0 +1,13 @@ +syntax = "proto3"; +package ethermint.types.v1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/evmos/ethermint/types"; + +// ExtensionOptionDynamicFeeTx is an extension option that specifies the maxPrioPrice for cosmos tx +message ExtensionOptionDynamicFeeTx { + // max_priority_price is the same as `max_priority_fee_per_gas` in eip-1559 spec + string max_priority_price = 1 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; +} diff --git a/third_party/proto/ethermint/types/v1/indexer.proto b/third_party/proto/ethermint/types/v1/indexer.proto new file mode 100644 index 00000000..e3ee23ef --- /dev/null +++ b/third_party/proto/ethermint/types/v1/indexer.proto @@ -0,0 +1,30 @@ +syntax = "proto3"; +package ethermint.types.v1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/evmos/ethermint/types"; + +// TxResult is the value stored in eth tx indexer +message TxResult { + option (gogoproto.goproto_getters) = false; + + // height of the blockchain + int64 height = 1; + // tx_index of the cosmos transaction + uint32 tx_index = 2; + // msg_index in a batch transaction + uint32 msg_index = 3; + + // eth_tx_index is the index in the list of valid eth tx in the block, + // aka. the transaction list returned by eth_getBlock api. + int32 eth_tx_index = 4; + // failed is true if the eth transaction did not go succeed + bool failed = 5; + // gas_used by the transaction. If it exceeds the block gas limit, + // it's set to gas limit, which is what's actually deducted by ante handler. + uint64 gas_used = 6; + // cumulative_gas_used specifies the cumulated amount of gas used for all + // processed messages within the current batch transaction. + uint64 cumulative_gas_used = 7; +} diff --git a/third_party/proto/ethermint/types/v1/web3.proto b/third_party/proto/ethermint/types/v1/web3.proto index 7bcab06d..2b7d4654 100644 --- a/third_party/proto/ethermint/types/v1/web3.proto +++ b/third_party/proto/ethermint/types/v1/web3.proto @@ -3,23 +3,23 @@ package ethermint.types.v1; import "gogoproto/gogo.proto"; -option go_package = "github.com/tharsis/ethermint/types"; +option go_package = "github.com/evmos/ethermint/types"; +// ExtensionOptionsWeb3Tx is an extension option that specifies the typed chain id, +// the fee payer as well as its signature data. message ExtensionOptionsWeb3Tx { option (gogoproto.goproto_getters) = false; - // typed data chain id used only in EIP712 Domain and should match + // typed_data_chain_id is used only in EIP712 Domain and should match // Ethereum network ID in a Web3 provider (e.g. Metamask). - uint64 typed_data_chain_id = 1 [ - (gogoproto.jsontag) = "typedDataChainID,omitempty", - (gogoproto.customname) = "TypedDataChainID" - ]; + uint64 typed_data_chain_id = 1 + [(gogoproto.jsontag) = "typedDataChainID,omitempty", (gogoproto.customname) = "TypedDataChainID"]; - // fee payer is an account address for the fee payer. It will be validated + // fee_payer is an account address for the fee payer. It will be validated // during EIP712 signature checking. - string fee_payer = 2 [ (gogoproto.jsontag) = "feePayer,omitempty" ]; + string fee_payer = 2 [(gogoproto.jsontag) = "feePayer,omitempty"]; - // fee payer sig is a signature data from the fee paying account, + // fee_payer_sig is a signature data from the fee paying account, // allows to perform fee delegation when using EIP712 Domain. - bytes fee_payer_sig = 3 [ (gogoproto.jsontag) = "feePayerSig,omitempty" ]; + bytes fee_payer_sig = 3 [(gogoproto.jsontag) = "feePayerSig,omitempty"]; } diff --git a/third_party/proto/ibc/applications/fee/v1/ack.proto b/third_party/proto/ibc/applications/fee/v1/ack.proto new file mode 100644 index 00000000..be0d74a4 --- /dev/null +++ b/third_party/proto/ibc/applications/fee/v1/ack.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; + +package ibc.applications.fee.v1; + +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/29-fee/types"; + +import "gogoproto/gogo.proto"; + +// IncentivizedAcknowledgement is the acknowledgement format to be used by applications wrapped in the fee middleware +message IncentivizedAcknowledgement { + // the underlying app acknowledgement bytes + bytes app_acknowledgement = 1 [(gogoproto.moretags) = "yaml:\"app_acknowledgement\""]; + // the relayer address which submits the recv packet message + string forward_relayer_address = 2 [(gogoproto.moretags) = "yaml:\"forward_relayer_address\""]; + // success flag of the base application callback + bool underlying_app_success = 3 [(gogoproto.moretags) = "yaml:\"underlying_app_successl\""]; +} diff --git a/third_party/proto/ibc/applications/fee/v1/fee.proto b/third_party/proto/ibc/applications/fee/v1/fee.proto new file mode 100644 index 00000000..b38ae9d6 --- /dev/null +++ b/third_party/proto/ibc/applications/fee/v1/fee.proto @@ -0,0 +1,56 @@ +syntax = "proto3"; + +package ibc.applications.fee.v1; + +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/29-fee/types"; + +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; +import "ibc/core/channel/v1/channel.proto"; + +// Fee defines the ICS29 receive, acknowledgement and timeout fees +message Fee { + // the packet receive fee + repeated cosmos.base.v1beta1.Coin recv_fee = 1 [ + (gogoproto.moretags) = "yaml:\"recv_fee\"", + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + // the packet acknowledgement fee + repeated cosmos.base.v1beta1.Coin ack_fee = 2 [ + (gogoproto.moretags) = "yaml:\"ack_fee\"", + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + // the packet timeout fee + repeated cosmos.base.v1beta1.Coin timeout_fee = 3 [ + (gogoproto.moretags) = "yaml:\"timeout_fee\"", + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// PacketFee contains ICS29 relayer fees, refund address and optional list of permitted relayers +message PacketFee { + // fee encapsulates the recv, ack and timeout fees associated with an IBC packet + Fee fee = 1 [(gogoproto.nullable) = false]; + // the refund address for unspent fees + string refund_address = 2 [(gogoproto.moretags) = "yaml:\"refund_address\""]; + // optional list of relayers permitted to receive fees + repeated string relayers = 3; +} + +// PacketFees contains a list of type PacketFee +message PacketFees { + // list of packet fees + repeated PacketFee packet_fees = 1 [(gogoproto.moretags) = "yaml:\"packet_fees\"", (gogoproto.nullable) = false]; +} + +// IdentifiedPacketFees contains a list of type PacketFee and associated PacketId +message IdentifiedPacketFees { + // unique packet identifier comprised of the channel ID, port ID and sequence + ibc.core.channel.v1.PacketId packet_id = 1 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"packet_id\""]; + // list of packet fees + repeated PacketFee packet_fees = 2 [(gogoproto.moretags) = "yaml:\"packet_fees\"", (gogoproto.nullable) = false]; +} diff --git a/third_party/proto/ibc/applications/fee/v1/genesis.proto b/third_party/proto/ibc/applications/fee/v1/genesis.proto new file mode 100644 index 00000000..8f52be19 --- /dev/null +++ b/third_party/proto/ibc/applications/fee/v1/genesis.proto @@ -0,0 +1,66 @@ +syntax = "proto3"; + +package ibc.applications.fee.v1; + +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/29-fee/types"; + +import "gogoproto/gogo.proto"; +import "ibc/applications/fee/v1/fee.proto"; +import "ibc/core/channel/v1/channel.proto"; + +// GenesisState defines the ICS29 fee middleware genesis state +message GenesisState { + // list of identified packet fees + repeated IdentifiedPacketFees identified_fees = 1 + [(gogoproto.moretags) = "yaml:\"identified_fees\"", (gogoproto.nullable) = false]; + // list of fee enabled channels + repeated FeeEnabledChannel fee_enabled_channels = 2 + [(gogoproto.moretags) = "yaml:\"fee_enabled_channels\"", (gogoproto.nullable) = false]; + // list of registered payees + repeated RegisteredPayee registered_payees = 3 + [(gogoproto.moretags) = "yaml:\"registered_payees\"", (gogoproto.nullable) = false]; + // list of registered counterparty payees + repeated RegisteredCounterpartyPayee registered_counterparty_payees = 4 + [(gogoproto.moretags) = "yaml:\"registered_counterparty_payees\"", (gogoproto.nullable) = false]; + // list of forward relayer addresses + repeated ForwardRelayerAddress forward_relayers = 5 + [(gogoproto.moretags) = "yaml:\"forward_relayers\"", (gogoproto.nullable) = false]; +} + +// FeeEnabledChannel contains the PortID & ChannelID for a fee enabled channel +message FeeEnabledChannel { + // unique port identifier + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; + // unique channel identifier + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; +} + +// RegisteredPayee contains the relayer address and payee address for a specific channel +message RegisteredPayee { + // unique channel identifier + string channel_id = 1 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + // the relayer address + string relayer = 2; + // the payee address + string payee = 3; +} + +// RegisteredCounterpartyPayee contains the relayer address and counterparty payee address for a specific channel (used +// for recv fee distribution) +message RegisteredCounterpartyPayee { + // unique channel identifier + string channel_id = 1 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + // the relayer address + string relayer = 2; + // the counterparty payee address + string counterparty_payee = 3 [(gogoproto.moretags) = "yaml:\"counterparty_payee\""]; +} + +// ForwardRelayerAddress contains the forward relayer address and PacketId used for async acknowledgements +message ForwardRelayerAddress { + // the forward relayer address + string address = 1; + // unique packet identifer comprised of the channel ID, port ID and sequence + ibc.core.channel.v1.PacketId packet_id = 2 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"packet_id\""]; +} diff --git a/third_party/proto/ibc/applications/fee/v1/metadata.proto b/third_party/proto/ibc/applications/fee/v1/metadata.proto new file mode 100644 index 00000000..3afdba16 --- /dev/null +++ b/third_party/proto/ibc/applications/fee/v1/metadata.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; + +package ibc.applications.fee.v1; + +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/29-fee/types"; + +import "gogoproto/gogo.proto"; + +// Metadata defines the ICS29 channel specific metadata encoded into the channel version bytestring +// See ICS004: https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#Versioning +message Metadata { + // fee_version defines the ICS29 fee version + string fee_version = 1 [(gogoproto.moretags) = "yaml:\"fee_version\""]; + // app_version defines the underlying application version, which may or may not be a JSON encoded bytestring + string app_version = 2 [(gogoproto.moretags) = "yaml:\"app_version\""]; +} diff --git a/third_party/proto/ibc/applications/fee/v1/query.proto b/third_party/proto/ibc/applications/fee/v1/query.proto new file mode 100644 index 00000000..3153051c --- /dev/null +++ b/third_party/proto/ibc/applications/fee/v1/query.proto @@ -0,0 +1,222 @@ +syntax = "proto3"; + +package ibc.applications.fee.v1; + +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/29-fee/types"; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "ibc/applications/fee/v1/fee.proto"; +import "ibc/applications/fee/v1/genesis.proto"; +import "ibc/core/channel/v1/channel.proto"; + +// Query defines the ICS29 gRPC querier service. +service Query { + // IncentivizedPackets returns all incentivized packets and their associated fees + rpc IncentivizedPackets(QueryIncentivizedPacketsRequest) returns (QueryIncentivizedPacketsResponse) { + option (google.api.http).get = "/ibc/apps/fee/v1/incentivized_packets"; + } + + // IncentivizedPacket returns all packet fees for a packet given its identifier + rpc IncentivizedPacket(QueryIncentivizedPacketRequest) returns (QueryIncentivizedPacketResponse) { + option (google.api.http).get = + "/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/sequences/" + "{packet_id.sequence}/incentivized_packet"; + } + + // Gets all incentivized packets for a specific channel + rpc IncentivizedPacketsForChannel(QueryIncentivizedPacketsForChannelRequest) + returns (QueryIncentivizedPacketsForChannelResponse) { + option (google.api.http).get = "/ibc/apps/fee/v1/channels/{channel_id}/ports/{port_id}/incentivized_packets"; + } + + // TotalRecvFees returns the total receive fees for a packet given its identifier + rpc TotalRecvFees(QueryTotalRecvFeesRequest) returns (QueryTotalRecvFeesResponse) { + option (google.api.http).get = "/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/" + "sequences/{packet_id.sequence}/total_recv_fees"; + } + + // TotalAckFees returns the total acknowledgement fees for a packet given its identifier + rpc TotalAckFees(QueryTotalAckFeesRequest) returns (QueryTotalAckFeesResponse) { + option (google.api.http).get = "/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/" + "sequences/{packet_id.sequence}/total_ack_fees"; + } + + // TotalTimeoutFees returns the total timeout fees for a packet given its identifier + rpc TotalTimeoutFees(QueryTotalTimeoutFeesRequest) returns (QueryTotalTimeoutFeesResponse) { + option (google.api.http).get = "/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/" + "sequences/{packet_id.sequence}/total_timeout_fees"; + } + + // Payee returns the registered payee address for a specific channel given the relayer address + rpc Payee(QueryPayeeRequest) returns (QueryPayeeResponse) { + option (google.api.http).get = "/ibc/apps/fee/v1/channels/{channel_id}/relayers/{relayer}/payee"; + } + + // CounterpartyPayee returns the registered counterparty payee for forward relaying + rpc CounterpartyPayee(QueryCounterpartyPayeeRequest) returns (QueryCounterpartyPayeeResponse) { + option (google.api.http).get = "/ibc/apps/fee/v1/channels/{channel_id}/relayers/{relayer}/counterparty_payee"; + } + + // FeeEnabledChannels returns a list of all fee enabled channels + rpc FeeEnabledChannels(QueryFeeEnabledChannelsRequest) returns (QueryFeeEnabledChannelsResponse) { + option (google.api.http).get = "/ibc/apps/fee/v1/fee_enabled"; + } + + // FeeEnabledChannel returns true if the provided port and channel identifiers belong to a fee enabled channel + rpc FeeEnabledChannel(QueryFeeEnabledChannelRequest) returns (QueryFeeEnabledChannelResponse) { + option (google.api.http).get = "/ibc/apps/fee/v1/channels/{channel_id}/ports/{port_id}/fee_enabled"; + } +} + +// QueryIncentivizedPacketsRequest defines the request type for the IncentivizedPackets rpc +message QueryIncentivizedPacketsRequest { + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 1; + // block height at which to query + uint64 query_height = 2; +} + +// QueryIncentivizedPacketsResponse defines the response type for the IncentivizedPackets rpc +message QueryIncentivizedPacketsResponse { + // list of identified fees for incentivized packets + repeated ibc.applications.fee.v1.IdentifiedPacketFees incentivized_packets = 1 [(gogoproto.nullable) = false]; +} + +// QueryIncentivizedPacketRequest defines the request type for the IncentivizedPacket rpc +message QueryIncentivizedPacketRequest { + // unique packet identifier comprised of channel ID, port ID and sequence + ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.nullable) = false]; + // block height at which to query + uint64 query_height = 2; +} + +// QueryIncentivizedPacketsResponse defines the response type for the IncentivizedPacket rpc +message QueryIncentivizedPacketResponse { + // the identified fees for the incentivized packet + ibc.applications.fee.v1.IdentifiedPacketFees incentivized_packet = 1 [(gogoproto.nullable) = false]; +} + +// QueryIncentivizedPacketsForChannelRequest defines the request type for querying for all incentivized packets +// for a specific channel +message QueryIncentivizedPacketsForChannelRequest { + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 1; + string port_id = 2; + string channel_id = 3; + // Height to query at + uint64 query_height = 4; +} + +// QueryIncentivizedPacketsResponse defines the response type for the incentivized packets RPC +message QueryIncentivizedPacketsForChannelResponse { + // Map of all incentivized_packets + repeated ibc.applications.fee.v1.IdentifiedPacketFees incentivized_packets = 1; +} + +// QueryTotalRecvFeesRequest defines the request type for the TotalRecvFees rpc +message QueryTotalRecvFeesRequest { + // the packet identifier for the associated fees + ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.nullable) = false]; +} + +// QueryTotalRecvFeesResponse defines the response type for the TotalRecvFees rpc +message QueryTotalRecvFeesResponse { + // the total packet receive fees + repeated cosmos.base.v1beta1.Coin recv_fees = 1 [ + (gogoproto.moretags) = "yaml:\"recv_fees\"", + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// QueryTotalAckFeesRequest defines the request type for the TotalAckFees rpc +message QueryTotalAckFeesRequest { + // the packet identifier for the associated fees + ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.nullable) = false]; +} + +// QueryTotalAckFeesResponse defines the response type for the TotalAckFees rpc +message QueryTotalAckFeesResponse { + // the total packet acknowledgement fees + repeated cosmos.base.v1beta1.Coin ack_fees = 1 [ + (gogoproto.moretags) = "yaml:\"ack_fees\"", + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// QueryTotalTimeoutFeesRequest defines the request type for the TotalTimeoutFees rpc +message QueryTotalTimeoutFeesRequest { + // the packet identifier for the associated fees + ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.nullable) = false]; +} + +// QueryTotalTimeoutFeesResponse defines the response type for the TotalTimeoutFees rpc +message QueryTotalTimeoutFeesResponse { + // the total packet timeout fees + repeated cosmos.base.v1beta1.Coin timeout_fees = 1 [ + (gogoproto.moretags) = "yaml:\"timeout_fees\"", + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// QueryPayeeRequest defines the request type for the Payee rpc +message QueryPayeeRequest { + // unique channel identifier + string channel_id = 1 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + // the relayer address to which the distribution address is registered + string relayer = 2; +} + +// QueryPayeeResponse defines the response type for the Payee rpc +message QueryPayeeResponse { + // the payee address to which packet fees are paid out + string payee_address = 1 [(gogoproto.moretags) = "yaml:\"payee_address\""]; +} + +// QueryCounterpartyPayeeRequest defines the request type for the CounterpartyPayee rpc +message QueryCounterpartyPayeeRequest { + // unique channel identifier + string channel_id = 1 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + // the relayer address to which the counterparty is registered + string relayer = 2; +} + +// QueryCounterpartyPayeeResponse defines the response type for the CounterpartyPayee rpc +message QueryCounterpartyPayeeResponse { + // the counterparty payee address used to compensate forward relaying + string counterparty_payee = 1 [(gogoproto.moretags) = "yaml:\"counterparty_payee\""]; +} + +// QueryFeeEnabledChannelsRequest defines the request type for the FeeEnabledChannels rpc +message QueryFeeEnabledChannelsRequest { + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 1; + // block height at which to query + uint64 query_height = 2; +} + +// QueryFeeEnabledChannelsResponse defines the response type for the FeeEnabledChannels rpc +message QueryFeeEnabledChannelsResponse { + // list of fee enabled channels + repeated ibc.applications.fee.v1.FeeEnabledChannel fee_enabled_channels = 1 + [(gogoproto.moretags) = "yaml:\"fee_enabled_channels\"", (gogoproto.nullable) = false]; +} + +// QueryFeeEnabledChannelRequest defines the request type for the FeeEnabledChannel rpc +message QueryFeeEnabledChannelRequest { + // unique port identifier + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; + // unique channel identifier + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; +} + +// QueryFeeEnabledChannelResponse defines the response type for the FeeEnabledChannel rpc +message QueryFeeEnabledChannelResponse { + // boolean flag representing the fee enabled channel status + bool fee_enabled = 1 [(gogoproto.moretags) = "yaml:\"fee_enabled\""]; +} diff --git a/third_party/proto/ibc/applications/fee/v1/tx.proto b/third_party/proto/ibc/applications/fee/v1/tx.proto new file mode 100644 index 00000000..b099b5ee --- /dev/null +++ b/third_party/proto/ibc/applications/fee/v1/tx.proto @@ -0,0 +1,112 @@ +syntax = "proto3"; + +package ibc.applications.fee.v1; + +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/29-fee/types"; + +import "gogoproto/gogo.proto"; +import "ibc/applications/fee/v1/fee.proto"; +import "ibc/core/channel/v1/channel.proto"; + +// Msg defines the ICS29 Msg service. +service Msg { + // RegisterPayee defines a rpc handler method for MsgRegisterPayee + // RegisterPayee is called by the relayer on each channelEnd and allows them to set an optional + // payee to which reverse and timeout relayer packet fees will be paid out. The payee should be registered on + // the source chain from which packets originate as this is where fee distribution takes place. This function may be + // called more than once by a relayer, in which case, the latest payee is always used. + rpc RegisterPayee(MsgRegisterPayee) returns (MsgRegisterPayeeResponse); + + // RegisterCounterpartyPayee defines a rpc handler method for MsgRegisterCounterpartyPayee + // RegisterCounterpartyPayee is called by the relayer on each channelEnd and allows them to specify the counterparty + // payee address before relaying. This ensures they will be properly compensated for forward relaying since + // the destination chain must include the registered counterparty payee address in the acknowledgement. This function + // may be called more than once by a relayer, in which case, the latest counterparty payee address is always used. + rpc RegisterCounterpartyPayee(MsgRegisterCounterpartyPayee) returns (MsgRegisterCounterpartyPayeeResponse); + + // PayPacketFee defines a rpc handler method for MsgPayPacketFee + // PayPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to + // incentivize the relaying of the packet at the next sequence + // NOTE: This method is intended to be used within a multi msg transaction, where the subsequent msg that follows + // initiates the lifecycle of the incentivized packet + rpc PayPacketFee(MsgPayPacketFee) returns (MsgPayPacketFeeResponse); + + // PayPacketFeeAsync defines a rpc handler method for MsgPayPacketFeeAsync + // PayPacketFeeAsync is an open callback that may be called by any module/user that wishes to escrow funds in order to + // incentivize the relaying of a known packet (i.e. at a particular sequence) + rpc PayPacketFeeAsync(MsgPayPacketFeeAsync) returns (MsgPayPacketFeeAsyncResponse); +} + +// MsgRegisterPayee defines the request type for the RegisterPayee rpc +message MsgRegisterPayee { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // unique port identifier + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; + // unique channel identifier + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + // the relayer address + string relayer = 3; + // the payee address + string payee = 4; +} + +// MsgRegisterPayeeResponse defines the response type for the RegisterPayee rpc +message MsgRegisterPayeeResponse {} + +// MsgRegisterCounterpartyPayee defines the request type for the RegisterCounterpartyPayee rpc +message MsgRegisterCounterpartyPayee { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // unique port identifier + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; + // unique channel identifier + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + // the relayer address + string relayer = 3; + // the counterparty payee address + string counterparty_payee = 4 [(gogoproto.moretags) = "yaml:\"counterparty_payee\""]; +} + +// MsgRegisterCounterpartyPayeeResponse defines the response type for the RegisterCounterpartyPayee rpc +message MsgRegisterCounterpartyPayeeResponse {} + +// MsgPayPacketFee defines the request type for the PayPacketFee rpc +// This Msg can be used to pay for a packet at the next sequence send & should be combined with the Msg that will be +// paid for +message MsgPayPacketFee { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // fee encapsulates the recv, ack and timeout fees associated with an IBC packet + ibc.applications.fee.v1.Fee fee = 1 [(gogoproto.nullable) = false]; + // the source port unique identifier + string source_port_id = 2 [(gogoproto.moretags) = "yaml:\"source_port_id\""]; + // the source channel unique identifer + string source_channel_id = 3 [(gogoproto.moretags) = "yaml:\"source_channel_id\""]; + // account address to refund fee if necessary + string signer = 4; + // optional list of relayers permitted to the receive packet fees + repeated string relayers = 5; +} + +// MsgPayPacketFeeResponse defines the response type for the PayPacketFee rpc +message MsgPayPacketFeeResponse {} + +// MsgPayPacketFeeAsync defines the request type for the PayPacketFeeAsync rpc +// This Msg can be used to pay for a packet at a specified sequence (instead of the next sequence send) +message MsgPayPacketFeeAsync { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // unique packet identifier comprised of the channel ID, port ID and sequence + ibc.core.channel.v1.PacketId packet_id = 1 + [(gogoproto.moretags) = "yaml:\"packet_id\"", (gogoproto.nullable) = false]; + // the packet fee associated with a particular IBC packet + PacketFee packet_fee = 2 [(gogoproto.moretags) = "yaml:\"packet_fee\"", (gogoproto.nullable) = false]; +} + +// MsgPayPacketFeeAsyncResponse defines the response type for the PayPacketFeeAsync rpc +message MsgPayPacketFeeAsyncResponse {} diff --git a/third_party/proto/ibc/applications/interchain_accounts/controller/v1/controller.proto b/third_party/proto/ibc/applications/interchain_accounts/controller/v1/controller.proto index 291f3e4f..072d2617 100644 --- a/third_party/proto/ibc/applications/interchain_accounts/controller/v1/controller.proto +++ b/third_party/proto/ibc/applications/interchain_accounts/controller/v1/controller.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.interchain_accounts.controller.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/controller/types"; import "gogoproto/gogo.proto"; diff --git a/third_party/proto/ibc/applications/interchain_accounts/controller/v1/query.proto b/third_party/proto/ibc/applications/interchain_accounts/controller/v1/query.proto index 0a2364cb..db7e888b 100644 --- a/third_party/proto/ibc/applications/interchain_accounts/controller/v1/query.proto +++ b/third_party/proto/ibc/applications/interchain_accounts/controller/v1/query.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.interchain_accounts.controller.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/controller/types"; import "ibc/applications/interchain_accounts/controller/v1/controller.proto"; import "gogoproto/gogo.proto"; diff --git a/third_party/proto/ibc/applications/interchain_accounts/controller/v1/tx.proto b/third_party/proto/ibc/applications/interchain_accounts/controller/v1/tx.proto new file mode 100644 index 00000000..31de5e7e --- /dev/null +++ b/third_party/proto/ibc/applications/interchain_accounts/controller/v1/tx.proto @@ -0,0 +1,50 @@ +syntax = "proto3"; + +package ibc.applications.interchain_accounts.controller.v1; + +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/controller/types"; + +import "gogoproto/gogo.proto"; +import "ibc/applications/interchain_accounts/v1/packet.proto"; + +// Msg defines the 27-interchain-accounts/controller Msg service. +service Msg { + // RegisterInterchainAccount defines a rpc handler for MsgRegisterInterchainAccount. + rpc RegisterInterchainAccount(MsgRegisterInterchainAccount) returns (MsgRegisterInterchainAccountResponse); + // SendTx defines a rpc handler for MsgSendTx. + rpc SendTx(MsgSendTx) returns (MsgSendTxResponse); +} + +// MsgRegisterInterchainAccount defines the payload for Msg/MsgRegisterInterchainAccount +message MsgRegisterInterchainAccount { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string owner = 1; + string connection_id = 2 [(gogoproto.moretags) = "yaml:\"connection_id\""]; + string version = 3; +} + +// MsgRegisterInterchainAccountResponse defines the response for Msg/MsgRegisterInterchainAccountResponse +message MsgRegisterInterchainAccountResponse { + string channel_id = 1 [(gogoproto.moretags) = "yaml:\"channel_id\""]; +} + +// MsgSendTx defines the payload for Msg/SendTx +message MsgSendTx { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string owner = 1; + string connection_id = 2 [(gogoproto.moretags) = "yaml:\"connection_id\""]; + ibc.applications.interchain_accounts.v1.InterchainAccountPacketData packet_data = 3 + [(gogoproto.moretags) = "yaml:\"packet_data\"", (gogoproto.nullable) = false]; + // Relative timeout timestamp provided will be added to the current block time during transaction execution. + // The timeout timestamp must be non-zero. + uint64 relative_timeout = 4 [(gogoproto.moretags) = "yaml:\"relative_timeout\""]; +} + +// MsgSendTxResponse defines the response for MsgSendTx +message MsgSendTxResponse { + uint64 sequence = 1; +} diff --git a/third_party/proto/ibc/applications/interchain_accounts/genesis/v1/genesis.proto b/third_party/proto/ibc/applications/interchain_accounts/genesis/v1/genesis.proto new file mode 100644 index 00000000..c52bab73 --- /dev/null +++ b/third_party/proto/ibc/applications/interchain_accounts/genesis/v1/genesis.proto @@ -0,0 +1,53 @@ +syntax = "proto3"; + +package ibc.applications.interchain_accounts.genesis.v1; + +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/genesis/types"; + +import "gogoproto/gogo.proto"; +import "ibc/applications/interchain_accounts/controller/v1/controller.proto"; +import "ibc/applications/interchain_accounts/host/v1/host.proto"; + +// GenesisState defines the interchain accounts genesis state +message GenesisState { + ControllerGenesisState controller_genesis_state = 1 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"controller_genesis_state\""]; + HostGenesisState host_genesis_state = 2 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"host_genesis_state\""]; +} + +// ControllerGenesisState defines the interchain accounts controller genesis state +message ControllerGenesisState { + repeated ActiveChannel active_channels = 1 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"active_channels\""]; + repeated RegisteredInterchainAccount interchain_accounts = 2 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"interchain_accounts\""]; + repeated string ports = 3; + ibc.applications.interchain_accounts.controller.v1.Params params = 4 [(gogoproto.nullable) = false]; +} + +// HostGenesisState defines the interchain accounts host genesis state +message HostGenesisState { + repeated ActiveChannel active_channels = 1 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"active_channels\""]; + repeated RegisteredInterchainAccount interchain_accounts = 2 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"interchain_accounts\""]; + string port = 3; + ibc.applications.interchain_accounts.host.v1.Params params = 4 [(gogoproto.nullable) = false]; +} + +// ActiveChannel contains a connection ID, port ID and associated active channel ID, as well as a boolean flag to +// indicate if the channel is middleware enabled +message ActiveChannel { + string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; + string port_id = 2 [(gogoproto.moretags) = "yaml:\"port_id\""]; + string channel_id = 3 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + bool is_middleware_enabled = 4 [(gogoproto.moretags) = "yaml:\"is_middleware_enabled\""]; +} + +// RegisteredInterchainAccount contains a connection ID, port ID and associated interchain account address +message RegisteredInterchainAccount { + string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; + string port_id = 2 [(gogoproto.moretags) = "yaml:\"port_id\""]; + string account_address = 3 [(gogoproto.moretags) = "yaml:\"account_address\""]; +} \ No newline at end of file diff --git a/third_party/proto/ibc/applications/interchain_accounts/host/v1/host.proto b/third_party/proto/ibc/applications/interchain_accounts/host/v1/host.proto index a9d951ce..e5baae5d 100644 --- a/third_party/proto/ibc/applications/interchain_accounts/host/v1/host.proto +++ b/third_party/proto/ibc/applications/interchain_accounts/host/v1/host.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.interchain_accounts.host.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/host/types"; import "gogoproto/gogo.proto"; diff --git a/third_party/proto/ibc/applications/interchain_accounts/host/v1/query.proto b/third_party/proto/ibc/applications/interchain_accounts/host/v1/query.proto index 5512d7b4..4b773917 100644 --- a/third_party/proto/ibc/applications/interchain_accounts/host/v1/query.proto +++ b/third_party/proto/ibc/applications/interchain_accounts/host/v1/query.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.interchain_accounts.host.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/host/types"; import "google/api/annotations.proto"; import "ibc/applications/interchain_accounts/host/v1/host.proto"; diff --git a/third_party/proto/ibc/applications/interchain_accounts/v1/account.proto b/third_party/proto/ibc/applications/interchain_accounts/v1/account.proto index 75d2fbd8..56ea941e 100644 --- a/third_party/proto/ibc/applications/interchain_accounts/v1/account.proto +++ b/third_party/proto/ibc/applications/interchain_accounts/v1/account.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.interchain_accounts.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/types"; import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; diff --git a/third_party/proto/ibc/applications/interchain_accounts/v1/metadata.proto b/third_party/proto/ibc/applications/interchain_accounts/v1/metadata.proto index 3eab1d04..eba844f9 100644 --- a/third_party/proto/ibc/applications/interchain_accounts/v1/metadata.proto +++ b/third_party/proto/ibc/applications/interchain_accounts/v1/metadata.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.interchain_accounts.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/types"; import "gogoproto/gogo.proto"; diff --git a/third_party/proto/ibc/applications/interchain_accounts/v1/packet.proto b/third_party/proto/ibc/applications/interchain_accounts/v1/packet.proto index 51ff4279..ac337fd5 100644 --- a/third_party/proto/ibc/applications/interchain_accounts/v1/packet.proto +++ b/third_party/proto/ibc/applications/interchain_accounts/v1/packet.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.interchain_accounts.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/types"; import "google/protobuf/any.proto"; import "gogoproto/gogo.proto"; diff --git a/third_party/proto/ibc/applications/transfer/v1/genesis.proto b/third_party/proto/ibc/applications/transfer/v1/genesis.proto index 0b5c0e0d..71d3f383 100644 --- a/third_party/proto/ibc/applications/transfer/v1/genesis.proto +++ b/third_party/proto/ibc/applications/transfer/v1/genesis.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.transfer.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types"; import "ibc/applications/transfer/v1/transfer.proto"; import "gogoproto/gogo.proto"; diff --git a/third_party/proto/ibc/applications/transfer/v1/query.proto b/third_party/proto/ibc/applications/transfer/v1/query.proto index 5298338c..cf8896fe 100644 --- a/third_party/proto/ibc/applications/transfer/v1/query.proto +++ b/third_party/proto/ibc/applications/transfer/v1/query.proto @@ -7,7 +7,7 @@ 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/ibc-go/v3/modules/apps/transfer/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types"; // Query provides defines the gRPC querier service. service Query { diff --git a/third_party/proto/ibc/applications/transfer/v1/transfer.proto b/third_party/proto/ibc/applications/transfer/v1/transfer.proto index 7a99485c..9c60ad65 100644 --- a/third_party/proto/ibc/applications/transfer/v1/transfer.proto +++ b/third_party/proto/ibc/applications/transfer/v1/transfer.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.transfer.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"; +option go_package = "github.com/cosmos/ibc-go/v6/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 81a733fc..7504a905 100644 --- a/third_party/proto/ibc/applications/transfer/v1/tx.proto +++ b/third_party/proto/ibc/applications/transfer/v1/tx.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.transfer.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types"; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; diff --git a/third_party/proto/ibc/applications/transfer/v2/packet.proto b/third_party/proto/ibc/applications/transfer/v2/packet.proto index d8382f64..5b3b004c 100644 --- a/third_party/proto/ibc/applications/transfer/v2/packet.proto +++ b/third_party/proto/ibc/applications/transfer/v2/packet.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.applications.transfer.v2; -option go_package = "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types"; // FungibleTokenPacketData defines a struct for the packet payload // See FungibleTokenPacketData spec: diff --git a/third_party/proto/ibc/core/channel/v1/channel.proto b/third_party/proto/ibc/core/channel/v1/channel.proto index 68c6ec17..2d301af2 100644 --- a/third_party/proto/ibc/core/channel/v1/channel.proto +++ b/third_party/proto/ibc/core/channel/v1/channel.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.channel.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types"; import "gogoproto/gogo.proto"; import "ibc/core/client/v1/client.proto"; @@ -132,6 +132,20 @@ message PacketState { bytes data = 4; } +// PacketId is an identifer for a unique Packet +// Source chains refer to packets by source port/channel +// Destination chains refer to packets by destination port/channel +message PacketId { + option (gogoproto.goproto_getters) = false; + + // channel port identifier + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; + // channel unique identifier + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + // packet sequence + uint64 sequence = 3; +} + // 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 diff --git a/third_party/proto/ibc/core/channel/v1/genesis.proto b/third_party/proto/ibc/core/channel/v1/genesis.proto index d95c891b..ef0e5148 100644 --- a/third_party/proto/ibc/core/channel/v1/genesis.proto +++ b/third_party/proto/ibc/core/channel/v1/genesis.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.channel.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types"; +option go_package = "github.com/cosmos/ibc-go/v6/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 ceb13d00..f22a3753 100644 --- a/third_party/proto/ibc/core/channel/v1/query.proto +++ b/third_party/proto/ibc/core/channel/v1/query.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.channel.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types"; import "ibc/core/client/v1/client.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; diff --git a/third_party/proto/ibc/core/channel/v1/tx.proto b/third_party/proto/ibc/core/channel/v1/tx.proto index d34b00e9..eba65f1e 100644 --- a/third_party/proto/ibc/core/channel/v1/tx.proto +++ b/third_party/proto/ibc/core/channel/v1/tx.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.channel.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types"; import "gogoproto/gogo.proto"; import "ibc/core/client/v1/client.proto"; @@ -79,9 +79,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 - string previous_channel_id = 2 [(gogoproto.moretags) = "yaml:\"previous_channel_id\""]; + // Deprecated: this field is unused. Crossing hello's are no longer supported in core IBC. + string previous_channel_id = 2 [deprecated = true, (gogoproto.moretags) = "yaml:\"previous_channel_id\""]; // NOTE: the version field within the channel has been deprecated. Its value will be ignored by core IBC. Channel channel = 3 [(gogoproto.nullable) = false]; string counterparty_version = 4 [(gogoproto.moretags) = "yaml:\"counterparty_version\""]; diff --git a/third_party/proto/ibc/core/client/v1/client.proto b/third_party/proto/ibc/core/client/v1/client.proto index f97263c4..0f1e6ab2 100644 --- a/third_party/proto/ibc/core/client/v1/client.proto +++ b/third_party/proto/ibc/core/client/v1/client.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.client.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/core/02-client/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/core/02-client/types"; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; diff --git a/third_party/proto/ibc/core/client/v1/genesis.proto b/third_party/proto/ibc/core/client/v1/genesis.proto index 0ca29d22..02bafd81 100644 --- a/third_party/proto/ibc/core/client/v1/genesis.proto +++ b/third_party/proto/ibc/core/client/v1/genesis.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.client.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/core/02-client/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/core/02-client/types"; import "ibc/core/client/v1/client.proto"; import "gogoproto/gogo.proto"; diff --git a/third_party/proto/ibc/core/client/v1/query.proto b/third_party/proto/ibc/core/client/v1/query.proto index 33a4191c..de16d917 100644 --- a/third_party/proto/ibc/core/client/v1/query.proto +++ b/third_party/proto/ibc/core/client/v1/query.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.client.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/core/02-client/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/core/02-client/types"; import "cosmos/base/query/v1beta1/pagination.proto"; import "ibc/core/client/v1/client.proto"; @@ -46,9 +46,9 @@ service Query { option (google.api.http).get = "/ibc/core/client/v1/client_status/{client_id}"; } - // ClientParams queries all parameters of the ibc client. + // ClientParams queries all parameters of the ibc client submodule. rpc ClientParams(QueryClientParamsRequest) returns (QueryClientParamsResponse) { - option (google.api.http).get = "/ibc/client/v1/params"; + option (google.api.http).get = "/ibc/core/client/v1/params"; } // UpgradedClientState queries an Upgraded IBC light client. diff --git a/third_party/proto/ibc/core/client/v1/tx.proto b/third_party/proto/ibc/core/client/v1/tx.proto index 06dbfbd0..74ad6d9d 100644 --- a/third_party/proto/ibc/core/client/v1/tx.proto +++ b/third_party/proto/ibc/core/client/v1/tx.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.client.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/core/02-client/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/core/02-client/types"; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; diff --git a/third_party/proto/ibc/core/commitment/v1/commitment.proto b/third_party/proto/ibc/core/commitment/v1/commitment.proto index b0afed22..38526624 100644 --- a/third_party/proto/ibc/core/commitment/v1/commitment.proto +++ b/third_party/proto/ibc/core/commitment/v1/commitment.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.commitment.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/core/23-commitment/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/core/23-commitment/types"; import "gogoproto/gogo.proto"; import "proofs.proto"; diff --git a/third_party/proto/ibc/core/connection/v1/connection.proto b/third_party/proto/ibc/core/connection/v1/connection.proto index 7fd2a690..8ec7a00a 100644 --- a/third_party/proto/ibc/core/connection/v1/connection.proto +++ b/third_party/proto/ibc/core/connection/v1/connection.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.connection.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/core/03-connection/types"; import "gogoproto/gogo.proto"; import "ibc/core/commitment/v1/commitment.proto"; diff --git a/third_party/proto/ibc/core/connection/v1/genesis.proto b/third_party/proto/ibc/core/connection/v1/genesis.proto index 1a53422c..c9d46081 100644 --- a/third_party/proto/ibc/core/connection/v1/genesis.proto +++ b/third_party/proto/ibc/core/connection/v1/genesis.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.connection.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types"; +option go_package = "github.com/cosmos/ibc-go/v6/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 f28578f5..04d7c3ea 100644 --- a/third_party/proto/ibc/core/connection/v1/query.proto +++ b/third_party/proto/ibc/core/connection/v1/query.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.connection.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/core/03-connection/types"; import "gogoproto/gogo.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; @@ -41,6 +41,11 @@ service Query { option (google.api.http).get = "/ibc/core/connection/v1/connections/{connection_id}/consensus_state/" "revision/{revision_number}/height/{revision_height}"; } + + // ConnectionParams queries all parameters of the ibc connection submodule. + rpc ConnectionParams(QueryConnectionParamsRequest) returns (QueryConnectionParamsResponse) { + option (google.api.http).get = "/ibc/core/connection/v1/params"; + } } // QueryConnectionRequest is the request type for the Query/Connection RPC @@ -136,3 +141,12 @@ message QueryConnectionConsensusStateResponse { // height at which the proof was retrieved ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false]; } + +// QueryConnectionParamsRequest is the request type for the Query/ConnectionParams RPC method. +message QueryConnectionParamsRequest {} + +// QueryConnectionParamsResponse is the response type for the Query/ConnectionParams RPC method. +message QueryConnectionParamsResponse { + // params defines the parameters of the module. + Params params = 1; +} \ No newline at end of file diff --git a/third_party/proto/ibc/core/connection/v1/tx.proto b/third_party/proto/ibc/core/connection/v1/tx.proto index e7e09c84..94d676bb 100644 --- a/third_party/proto/ibc/core/connection/v1/tx.proto +++ b/third_party/proto/ibc/core/connection/v1/tx.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.connection.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/core/03-connection/types"; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; @@ -49,14 +49,13 @@ 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 - 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]; - uint64 delay_period = 5 [(gogoproto.moretags) = "yaml:\"delay_period\""]; - repeated Version counterparty_versions = 6 [(gogoproto.moretags) = "yaml:\"counterparty_versions\""]; - ibc.core.client.v1.Height proof_height = 7 + // Deprecated: this field is unused. Crossing hellos are no longer supported in core IBC. + string previous_connection_id = 2 [deprecated = true, (gogoproto.moretags) = "yaml:\"previous_connection_id\""]; + google.protobuf.Any client_state = 3 [(gogoproto.moretags) = "yaml:\"client_state\""]; + Counterparty counterparty = 4 [(gogoproto.nullable) = false]; + uint64 delay_period = 5 [(gogoproto.moretags) = "yaml:\"delay_period\""]; + repeated Version counterparty_versions = 6 [(gogoproto.moretags) = "yaml:\"counterparty_versions\""]; + ibc.core.client.v1.Height proof_height = 7 [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; // proof of the initialization the connection on Chain A: `UNITIALIZED -> // INIT` diff --git a/third_party/proto/ibc/core/types/v1/genesis.proto b/third_party/proto/ibc/core/types/v1/genesis.proto index fbddbf30..dd389d41 100644 --- a/third_party/proto/ibc/core/types/v1/genesis.proto +++ b/third_party/proto/ibc/core/types/v1/genesis.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.core.types.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/core/types"; +option go_package = "github.com/cosmos/ibc-go/v6/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 43056801..ad0141af 100644 --- a/third_party/proto/ibc/lightclients/localhost/v1/localhost.proto +++ b/third_party/proto/ibc/lightclients/localhost/v1/localhost.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.lightclients.localhost.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/light-clients/09-localhost/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/light-clients/09-localhost/types"; import "gogoproto/gogo.proto"; import "ibc/core/client/v1/client.proto"; diff --git a/third_party/proto/ibc/lightclients/solomachine/v1/solomachine.proto b/third_party/proto/ibc/lightclients/solomachine/v1/solomachine.proto index c279f5e7..46d102bb 100644 --- a/third_party/proto/ibc/lightclients/solomachine/v1/solomachine.proto +++ b/third_party/proto/ibc/lightclients/solomachine/v1/solomachine.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.lightclients.solomachine.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/core/02-client/legacy/v100"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/core/02-client/legacy/v100"; import "ibc/core/connection/v1/connection.proto"; import "ibc/core/channel/v1/channel.proto"; diff --git a/third_party/proto/ibc/lightclients/solomachine/v2/solomachine.proto b/third_party/proto/ibc/lightclients/solomachine/v2/solomachine.proto index e626c18a..ea5cb89d 100644 --- a/third_party/proto/ibc/lightclients/solomachine/v2/solomachine.proto +++ b/third_party/proto/ibc/lightclients/solomachine/v2/solomachine.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.lightclients.solomachine.v2; -option go_package = "github.com/cosmos/ibc-go/v3/modules/light-clients/06-solomachine/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/light-clients/06-solomachine/types"; import "ibc/core/connection/v1/connection.proto"; import "ibc/core/channel/v1/channel.proto"; diff --git a/third_party/proto/ibc/lightclients/tendermint/v1/tendermint.proto b/third_party/proto/ibc/lightclients/tendermint/v1/tendermint.proto index 2815fe6a..cb0544b5 100644 --- a/third_party/proto/ibc/lightclients/tendermint/v1/tendermint.proto +++ b/third_party/proto/ibc/lightclients/tendermint/v1/tendermint.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.lightclients.tendermint.v1; -option go_package = "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint/types"; +option go_package = "github.com/cosmos/ibc-go/v6/modules/light-clients/07-tendermint/types"; import "tendermint/types/validator.proto"; import "tendermint/types/types.proto"; diff --git a/third_party/proto/proofs.proto b/third_party/proto/proofs.proto index da43503e..a1397dff 100644 --- a/third_party/proto/proofs.proto +++ b/third_party/proto/proofs.proto @@ -11,6 +11,7 @@ enum HashOp { KECCAK = 3; RIPEMD160 = 4; BITCOIN = 5; // ripemd160(sha256(x)) + SHA512_256 = 6; } /** diff --git a/third_party/proto/tendermint/abci/types.proto b/third_party/proto/tendermint/abci/types.proto index 340800f4..44f86112 100644 --- a/third_party/proto/tendermint/abci/types.proto +++ b/third_party/proto/tendermint/abci/types.proto @@ -214,7 +214,7 @@ message ResponseCheckTx { string sender = 9; int64 priority = 10; - // mempool_error is set by Tendermint. + // mempool_error is set by CometBFT. // ABCI applictions creating a ResponseCheckTX should not set mempool_error. string mempool_error = 11; } diff --git a/third_party/proto/tendermint/crypto/keys.proto b/third_party/proto/tendermint/crypto/keys.proto index 16fd7adf..5b94ddae 100644 --- a/third_party/proto/tendermint/crypto/keys.proto +++ b/third_party/proto/tendermint/crypto/keys.proto @@ -5,7 +5,7 @@ option go_package = "github.com/tendermint/tendermint/proto/tendermint/crypto"; import "gogoproto/gogo.proto"; -// PublicKey defines the keys available for use with Tendermint Validators +// PublicKey defines the keys available for use with Validators message PublicKey { option (gogoproto.compare) = true; option (gogoproto.equal) = true; diff --git a/third_party/proto/tendermint/types/types.proto b/third_party/proto/tendermint/types/types.proto index 8d4f0097..3ce16945 100644 --- a/third_party/proto/tendermint/types/types.proto +++ b/third_party/proto/tendermint/types/types.proto @@ -54,7 +54,7 @@ message BlockID { // -------------------------------- -// Header defines the structure of a Tendermint block header. +// Header defines the structure of a block header. message Header { // basic block info tendermint.version.Consensus version = 1 [(gogoproto.nullable) = false]; diff --git a/x/auction/client/rest/query.go b/x/auction/client/rest/query.go deleted file mode 100644 index 0a97df8c..00000000 --- a/x/auction/client/rest/query.go +++ /dev/null @@ -1,174 +0,0 @@ -package rest - -import ( - "fmt" - "net/http" - "strings" - - "github.com/cosmos/cosmos-sdk/client" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/rest" - "github.com/gorilla/mux" - - "github.com/kava-labs/kava/x/auction/types" -) - -const restAuctionID = "auction-id" - -// define routes that get registered by the main application -func registerQueryRoutes(cliCtx client.Context, r *mux.Router) { - r.HandleFunc(fmt.Sprintf("/%s/parameters", types.ModuleName), queryParamsHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/auctions/{%s}", types.ModuleName, restAuctionID), queryAuctionHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/auctions", types.ModuleName), queryAuctionsHandlerFn(cliCtx)).Methods("GET") -} - -func queryParamsHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - res, height, err := cliCtx.QueryWithData(fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryGetParams), nil) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func queryAuctionHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Parse the query height - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - // Prepare params for querier - vars := mux.Vars(r) - if len(vars[restAuctionID]) == 0 { - err := fmt.Errorf("%s required but not specified", restAuctionID) - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - auctionID, ok := rest.ParseUint64OrReturnBadRequest(w, vars[restAuctionID]) - if !ok { - return - } - - bz, err := cliCtx.LegacyAmino.MarshalJSON(types.NewQueryAuctionParams(auctionID)) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - // Query - res, height, err := cliCtx.QueryWithData(fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryGetAuction), bz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - // Write response - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func queryAuctionsHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - _, page, limit, err := rest.ParseHTTPArgsWithLimit(r, 0) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - // Parse the query height - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - var auctionType string - var auctionOwner sdk.AccAddress - var auctionDenom string - var auctionPhase string - - if x := r.URL.Query().Get(RestType); len(x) != 0 { - auctionType = strings.ToLower(strings.TrimSpace(x)) - if auctionType != types.CollateralAuctionType && - auctionType != types.SurplusAuctionType && - auctionType != types.DebtAuctionType { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("invalid auction type %s", x)) - return - } - } - - if x := r.URL.Query().Get(RestOwner); len(x) != 0 { - if auctionType != types.CollateralAuctionType { - rest.WriteErrorResponse(w, http.StatusBadRequest, "cannot apply owner flag to non-collateral auction type") - } - auctionOwnerStr := strings.ToLower(strings.TrimSpace(x)) - auctionOwner, err = sdk.AccAddressFromBech32(auctionOwnerStr) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("cannot parse address from auction owner %s", auctionOwnerStr)) - } - } - - if x := r.URL.Query().Get(RestDenom); len(x) != 0 { - auctionDenom = strings.TrimSpace(x) - err := sdk.ValidateDenom(auctionDenom) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - } - - if x := r.URL.Query().Get(RestPhase); len(x) != 0 { - auctionPhase = strings.ToLower(strings.TrimSpace(x)) - if auctionType != types.CollateralAuctionType && len(auctionType) > 0 { - rest.WriteErrorResponse(w, http.StatusBadRequest, "cannot apply phase flag to non-collateral auction type") - return - } - if auctionPhase != types.ForwardAuctionPhase && auctionPhase != types.ReverseAuctionPhase { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("invalid auction phase %s", x)) - return - } - } - - params := types.NewQueryAllAuctionParams(page, limit, auctionType, auctionDenom, auctionPhase, auctionOwner) - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - // Query - res, height, err := cliCtx.QueryWithData(fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryGetAuctions), bz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - // Write response - cliCtx = cliCtx.WithHeight(height) - - // Unmarshal to Auction and remarshal as AuctionWithPhase - var auctions []types.Auction - err = cliCtx.LegacyAmino.UnmarshalJSON(res, &auctions) - if err != nil { - rest.WriteErrorResponse(w, http.StatusNotFound, err.Error()) - return - } - - auctionsWithPhase := []types.AuctionWithPhase{} // using empty slice so json returns [] instead of null when there are no auctions - for _, a := range auctions { - auctionsWithPhase = append(auctionsWithPhase, types.NewAuctionWithPhase(a)) - } - rest.PostProcessResponse(w, cliCtx, cliCtx.LegacyAmino.MustMarshalJSON(auctionsWithPhase)) - } -} diff --git a/x/auction/client/rest/rest.go b/x/auction/client/rest/rest.go deleted file mode 100644 index 1836a9a8..00000000 --- a/x/auction/client/rest/rest.go +++ /dev/null @@ -1,30 +0,0 @@ -package rest - -import ( - "github.com/gorilla/mux" - - "github.com/cosmos/cosmos-sdk/client" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/rest" -) - -// REST Variable names -// nolint -const ( - RestType = "type" - RestOwner = "owner" - RestDenom = "denom" - RestPhase = "phase" -) - -// RegisterRoutes - Central function to define routes that get registered by the main application -func RegisterRoutes(cliCtx client.Context, r *mux.Router) { - registerQueryRoutes(cliCtx, r) - registerTxRoutes(cliCtx, r) -} - -// PlaceBidReq defines the properties of a bid request's body -type PlaceBidReq struct { - BaseReq rest.BaseReq `json:"base_req"` - Amount sdk.Coin `json:"amount"` -} diff --git a/x/auction/client/rest/tx.go b/x/auction/client/rest/tx.go deleted file mode 100644 index f94a2c3b..00000000 --- a/x/auction/client/rest/tx.go +++ /dev/null @@ -1,53 +0,0 @@ -package rest - -import ( - "fmt" - "net/http" - - "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" - "github.com/gorilla/mux" - - "github.com/kava-labs/kava/x/auction/types" -) - -func registerTxRoutes(cliCtx client.Context, r *mux.Router) { - r.HandleFunc(fmt.Sprintf("/%s/auctions/{%s}/bids", types.ModuleName, restAuctionID), postPlaceBidHandlerFn(cliCtx)).Methods("POST") -} - -func postPlaceBidHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, req *http.Request) { - var requestBody PlaceBidReq - if !rest.ReadRESTReq(w, req, cliCtx.LegacyAmino, &requestBody) { - return - } - - baseReq := requestBody.BaseReq.Sanitize() - if !baseReq.ValidateBasic(w) { - return - } - - bidderAddr, err := sdk.AccAddressFromBech32(requestBody.BaseReq.From) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - // Get auction ID from url - auctionID, ok := rest.ParseUint64OrReturnBadRequest(w, mux.Vars(req)[restAuctionID]) - if !ok { - return - } - - // Create and return a StdTx - msg := types.NewMsgPlaceBid(auctionID, bidderAddr.String(), requestBody.Amount) - if err := msg.ValidateBasic(); err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - tx.WriteGeneratedTxResponse(cliCtx, w, baseReq, &msg) - } -} diff --git a/x/auction/keeper/auctions_test.go b/x/auction/keeper/auctions_test.go index eb31e8cc..b61836c3 100644 --- a/x/auction/keeper/auctions_test.go +++ b/x/auction/keeper/auctions_test.go @@ -259,7 +259,7 @@ func (suite *auctionTestSuite) TestStartSurplusAuction() { if tc.expectPass { suite.NoError(err, tc.name) // check coins moved - suite.Equal(initialLiquidatorCoins.Sub(cs(tc.args.lot)), liquidatorCoins, tc.name) + suite.Equal(initialLiquidatorCoins.Sub(tc.args.lot), liquidatorCoins, tc.name) // check auction in store and is correct suite.True(found, tc.name) diff --git a/x/auction/keeper/bidding_test.go b/x/auction/keeper/bidding_test.go index bfd7c218..412ce9fa 100644 --- a/x/auction/keeper/bidding_test.go +++ b/x/auction/keeper/bidding_test.go @@ -509,13 +509,18 @@ func TestAuctionBidding(t *testing.T) { } // Store some state for use in checks - oldAuction, found := keeper.GetAuction(ctx, id) var oldBidder sdk.AccAddress + var oldBidderOldCoins sdk.Coins + + oldAuction, found := keeper.GetAuction(ctx, id) if found { oldBidder = oldAuction.GetBidder() } - oldBidderOldCoins := bank.GetAllBalances(ctx, oldBidder) + if !oldBidder.Empty() { + oldBidderOldCoins = bank.GetAllBalances(ctx, oldBidder) + } + newBidderOldCoins := bank.GetAllBalances(ctx, tc.bidArgs.bidder) // Place bid on auction @@ -546,9 +551,9 @@ func TestAuctionBidding(t *testing.T) { } } if oldBidder.Equals(tc.bidArgs.bidder) { // same bidder - require.Equal(t, newBidderOldCoins.Sub(cs(bidAmt.Sub(oldAuction.GetBid()))), bank.GetAllBalances(ctx, tc.bidArgs.bidder)) + require.Equal(t, newBidderOldCoins.Sub(bidAmt.Sub(oldAuction.GetBid())), bank.GetAllBalances(ctx, tc.bidArgs.bidder)) } else { // different bidder - require.Equal(t, newBidderOldCoins.Sub(cs(bidAmt)), bank.GetAllBalances(ctx, tc.bidArgs.bidder)) // wrapping in cs() to avoid comparing nil and empty coins + require.Equal(t, newBidderOldCoins.Sub(bidAmt), bank.GetAllBalances(ctx, tc.bidArgs.bidder)) // wrapping in cs() to avoid comparing nil and empty coins // handle checking debt coins for case debt auction has had no bids placed yet TODO make this less confusing if oldBidder.Equals(authtypes.NewModuleAddress(oldAuction.GetInitiator())) { @@ -576,7 +581,9 @@ func TestAuctionBidding(t *testing.T) { // Check coins have not moved require.Equal(t, newBidderOldCoins, bank.GetAllBalances(ctx, tc.bidArgs.bidder)) - require.Equal(t, oldBidderOldCoins, bank.GetAllBalances(ctx, oldBidder)) + if !oldBidder.Empty() { + require.Equal(t, oldBidderOldCoins, bank.GetAllBalances(ctx, oldBidder)) + } } }) } diff --git a/x/auction/keeper/keeper.go b/x/auction/keeper/keeper.go index c47310ec..2858a825 100644 --- a/x/auction/keeper/keeper.go +++ b/x/auction/keeper/keeper.go @@ -6,6 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/store/prefix" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" @@ -15,7 +16,7 @@ import ( ) type Keeper struct { - storeKey sdk.StoreKey + storeKey storetypes.StoreKey cdc codec.Codec paramSubspace paramtypes.Subspace bankKeeper types.BankKeeper @@ -23,7 +24,7 @@ type Keeper struct { } // NewKeeper returns a new auction keeper. -func NewKeeper(cdc codec.Codec, storeKey sdk.StoreKey, paramstore paramtypes.Subspace, +func NewKeeper(cdc codec.Codec, storeKey storetypes.StoreKey, paramstore paramtypes.Subspace, bankKeeper types.BankKeeper, accountKeeper types.AccountKeeper, ) Keeper { if !paramstore.HasKeyTable() { diff --git a/x/auction/legacy/v0_15/auctions.go b/x/auction/legacy/v0_15/auctions.go deleted file mode 100644 index 5b7300db..00000000 --- a/x/auction/legacy/v0_15/auctions.go +++ /dev/null @@ -1,260 +0,0 @@ -package v0_15 - -import ( - "errors" - "fmt" - "strings" - "time" - - sdk "github.com/cosmos/cosmos-sdk/types" - v40auth "github.com/cosmos/cosmos-sdk/x/auth/legacy/v040" -) - -const ( - CollateralAuctionType = "collateral" - SurplusAuctionType = "surplus" - DebtAuctionType = "debt" - ForwardAuctionPhase = "forward" - ReverseAuctionPhase = "reverse" -) - -// Auction is an interface for handling common actions on auctions. -type Auction interface { - GetID() uint64 - WithID(uint64) Auction - - GetInitiator() string - GetLot() sdk.Coin - GetBidder() sdk.AccAddress - GetBid() sdk.Coin - GetEndTime() time.Time - GetHasReceivedBids() bool - GetMaxEndTime() time.Time - - GetType() string - GetPhase() string -} - -var ( - _ Auction = &SurplusAuction{} - _ GenesisAuction = &SurplusAuction{} - _ Auction = &DebtAuction{} - _ GenesisAuction = &DebtAuction{} - _ Auction = &CollateralAuction{} - _ GenesisAuction = &CollateralAuction{} -) - -// BaseAuction is a common type shared by all Auctions. -type BaseAuction struct { - ID uint64 `json:"id" yaml:"id"` - Initiator string `json:"initiator" yaml:"initiator"` // Module name that starts the auction. Pays out Lot. - Lot sdk.Coin `json:"lot" yaml:"lot"` // Coins that will paid out by Initiator to the winning bidder. - Bidder sdk.AccAddress `json:"bidder" yaml:"bidder"` // Latest bidder. Receiver of Lot. - Bid sdk.Coin `json:"bid" yaml:"bid"` // Coins paid into the auction the bidder. - HasReceivedBids bool `json:"has_received_bids" yaml:"has_received_bids"` // Whether the auction has received any bids or not. - EndTime time.Time `json:"end_time" yaml:"end_time"` // Current auction closing time. Triggers at the end of the block with time ≥ EndTime. - MaxEndTime time.Time `json:"max_end_time" yaml:"max_end_time"` // Maximum closing time. Auctions can close before this but never after. -} - -// GetID is a getter for auction ID. -func (a BaseAuction) GetID() uint64 { return a.ID } - -// GetInitiator is a getter for auction Initiator. -func (a BaseAuction) GetInitiator() string { return a.Initiator } - -// GetLot is a getter for auction Lot. -func (a BaseAuction) GetLot() sdk.Coin { return a.Lot } - -// GetBidder is a getter for auction Bidder. -func (a BaseAuction) GetBidder() sdk.AccAddress { return a.Bidder } - -// GetBid is a getter for auction Bid. -func (a BaseAuction) GetBid() sdk.Coin { return a.Bid } - -// GetEndTime is a getter for auction end time. -func (a BaseAuction) GetEndTime() time.Time { return a.EndTime } - -// GetType returns the auction type. Used to identify auctions in event attributes. -func (a BaseAuction) GetType() string { return "base" } - -// GetMaxEndTime is a getter for MaxEndTime -func (a BaseAuction) GetMaxEndTime() time.Time { return a.MaxEndTime } - -// GetMaxEndTime is a getter for GetHasReceivedBids -func (a BaseAuction) GetHasReceivedBids() bool { return a.HasReceivedBids } - -// Validate verifies that the auction end time is before max end time -func (a BaseAuction) Validate() error { - // ID can be 0 for surplus, debt and collateral auctions - if strings.TrimSpace(a.Initiator) == "" { - return errors.New("auction initiator cannot be blank") - } - if !a.Lot.IsValid() { - return fmt.Errorf("invalid lot: %s", a.Lot) - } - // NOTE: bidder can be empty for Surplus and Collateral auctions - if !a.Bidder.Empty() && len(a.Bidder) != v40auth.AddrLen { - return fmt.Errorf("the expected bidder address length is %d, actual length is %d", v40auth.AddrLen, len(a.Bidder)) - } - if !a.Bid.IsValid() { - return fmt.Errorf("invalid bid: %s", a.Bid) - } - if a.EndTime.Unix() <= 0 || a.MaxEndTime.Unix() <= 0 { - return errors.New("end time cannot be zero") - } - if a.EndTime.After(a.MaxEndTime) { - return fmt.Errorf("MaxEndTime < EndTime (%s < %s)", a.MaxEndTime, a.EndTime) - } - return nil -} - -// DebtAuction is a reverse auction that mints what it pays out. -// It is normally used to acquire pegged asset to cover the CDP system's debts that were not covered by selling collateral. -type DebtAuction struct { - BaseAuction `json:"base_auction" yaml:"base_auction"` - - CorrespondingDebt sdk.Coin `json:"corresponding_debt" yaml:"corresponding_debt"` -} - -// WithID returns an auction with the ID set. -func (a DebtAuction) WithID(id uint64) Auction { a.ID = id; return a } - -// GetType returns the auction type. Used to identify auctions in event attributes. -func (a DebtAuction) GetType() string { return DebtAuctionType } - -// GetModuleAccountCoins returns the total number of coins held in the module account for this auction. -// It is used in genesis initialize the module account correctly. -func (a DebtAuction) GetModuleAccountCoins() sdk.Coins { - // a.Lot is minted at auction close, so is never stored in the module account - // a.Bid is paid out on bids, so is never stored in the module account - return sdk.NewCoins(a.CorrespondingDebt) -} - -// GetPhase returns the direction of a debt auction, which never changes. -func (a DebtAuction) GetPhase() string { return ReverseAuctionPhase } - -// Validate validates the DebtAuction fields values. -func (a DebtAuction) Validate() error { - if !a.CorrespondingDebt.IsValid() { - return fmt.Errorf("invalid corresponding debt: %s", a.CorrespondingDebt) - } - return a.BaseAuction.Validate() -} - -// SurplusAuction is a forward auction that burns what it receives from bids. -// It is normally used to sell off excess pegged asset acquired by the CDP system. -type SurplusAuction struct { - BaseAuction `json:"base_auction" yaml:"base_auction"` -} - -// WithID returns an auction with the ID set. -func (a SurplusAuction) WithID(id uint64) Auction { a.ID = id; return a } - -// GetType returns the auction type. Used to identify auctions in event attributes. -func (a SurplusAuction) GetType() string { return SurplusAuctionType } - -// GetModuleAccountCoins returns the total number of coins held in the module account for this auction. -// It is used in genesis initialize the module account correctly. -func (a SurplusAuction) GetModuleAccountCoins() sdk.Coins { - // a.Bid is paid out on bids, so is never stored in the module account - return sdk.NewCoins(a.Lot) -} - -// GetPhase returns the direction of a surplus auction, which never changes. -func (a SurplusAuction) GetPhase() string { return ForwardAuctionPhase } - -// CollateralAuction is a two phase auction. -// Initially, in forward auction phase, bids can be placed up to a max bid. -// Then it switches to a reverse auction phase, where the initial amount up for auction is bid down. -// Unsold Lot is sent to LotReturns, being divided among the addresses by weight. -// Collateral auctions are normally used to sell off collateral seized from CDPs. -type CollateralAuction struct { - BaseAuction `json:"base_auction" yaml:"base_auction"` - - CorrespondingDebt sdk.Coin `json:"corresponding_debt" yaml:"corresponding_debt"` - MaxBid sdk.Coin `json:"max_bid" yaml:"max_bid"` - LotReturns WeightedAddresses `json:"lot_returns" yaml:"lot_returns"` -} - -// WithID returns an auction with the ID set. -func (a CollateralAuction) WithID(id uint64) Auction { a.ID = id; return a } - -// GetType returns the auction type. Used to identify auctions in event attributes. -func (a CollateralAuction) GetType() string { return CollateralAuctionType } - -// GetModuleAccountCoins returns the total number of coins held in the module account for this auction. -// It is used in genesis initialize the module account correctly. -func (a CollateralAuction) GetModuleAccountCoins() sdk.Coins { - // a.Bid is paid out on bids, so is never stored in the module account - return sdk.NewCoins(a.Lot).Add(sdk.NewCoins(a.CorrespondingDebt)...) -} - -// IsReversePhase returns whether the auction has switched over to reverse phase or not. -// CollateralAuctions initially start in forward phase. -func (a CollateralAuction) IsReversePhase() bool { - return a.Bid.IsEqual(a.MaxBid) -} - -// GetPhase returns the direction of a collateral auction. -func (a CollateralAuction) GetPhase() string { - if a.IsReversePhase() { - return ReverseAuctionPhase - } - return ForwardAuctionPhase -} - -// GetLotReturns returns a collateral auction's lot owners -func (a CollateralAuction) GetLotReturns() WeightedAddresses { - return a.LotReturns -} - -// Validate validates the CollateralAuction fields values. -func (a CollateralAuction) Validate() error { - if !a.CorrespondingDebt.IsValid() { - return fmt.Errorf("invalid corresponding debt: %s", a.CorrespondingDebt) - } - if !a.MaxBid.IsValid() { - return fmt.Errorf("invalid max bid: %s", a.MaxBid) - } - if err := a.LotReturns.Validate(); err != nil { - return fmt.Errorf("invalid lot returns: %w", err) - } - return a.BaseAuction.Validate() -} - -// WeightedAddresses is a type for storing some addresses and associated weights. -type WeightedAddresses struct { - Addresses []sdk.AccAddress `json:"addresses" yaml:"addresses"` - Weights []sdk.Int `json:"weights" yaml:"weights"` -} - -// Validate checks for that the weights are not negative, not all zero, and the lengths match. -func (wa WeightedAddresses) Validate() error { - if len(wa.Weights) < 1 { - return fmt.Errorf("must be at least 1 weighted address") - } - - if len(wa.Addresses) != len(wa.Weights) { - return fmt.Errorf("number of addresses doesn't match number of weights, %d ≠ %d", len(wa.Addresses), len(wa.Weights)) - } - - totalWeight := sdk.ZeroInt() - for i := range wa.Addresses { - if wa.Addresses[i].Empty() { - return fmt.Errorf("address %d cannot be empty", i) - } - if len(wa.Addresses[i]) != v40auth.AddrLen { - return fmt.Errorf("address %d has an invalid length: expected %d, got %d", i, v40auth.AddrLen, len(wa.Addresses[i])) - } - if wa.Weights[i].IsNegative() { - return fmt.Errorf("weight %d contains a negative amount: %s", i, wa.Weights[i]) - } - totalWeight = totalWeight.Add(wa.Weights[i]) - } - - if !totalWeight.IsPositive() { - return fmt.Errorf("total weight must be positive") - } - - return nil -} diff --git a/x/auction/legacy/v0_15/keys.go b/x/auction/legacy/v0_15/keys.go deleted file mode 100644 index ae7113a3..00000000 --- a/x/auction/legacy/v0_15/keys.go +++ /dev/null @@ -1,6 +0,0 @@ -package v0_15 - -const ( - // ModuleName The name that will be used throughout the module - ModuleName = "auction" -) diff --git a/x/auction/legacy/v0_15/types.go b/x/auction/legacy/v0_15/types.go deleted file mode 100644 index d23bd684..00000000 --- a/x/auction/legacy/v0_15/types.go +++ /dev/null @@ -1,43 +0,0 @@ -package v0_15 - -import ( - "time" - - "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// GenesisState is auction state that must be provided at chain genesis. -type GenesisState struct { - NextAuctionID uint64 `json:"next_auction_id" yaml:"next_auction_id"` - Params Params `json:"params" yaml:"params"` - Auctions GenesisAuctions `json:"auctions" yaml:"auctions"` -} - -// GenesisAuctions is a slice of genesis auctions. -type GenesisAuctions []GenesisAuction - -// GenesisAuction is an interface that extends the auction interface to add functionality needed for initializing auctions from genesis. -type GenesisAuction interface { - Auction - GetModuleAccountCoins() sdk.Coins - Validate() error -} - -// Params is the governance parameters for the auction module. -type Params struct { - MaxAuctionDuration time.Duration `json:"max_auction_duration" yaml:"max_auction_duration"` // max length of auction - BidDuration time.Duration `json:"bid_duration" yaml:"bid_duration"` // additional time added to the auction end time after each bid, capped by the expiry. - IncrementSurplus sdk.Dec `json:"increment_surplus" yaml:"increment_surplus"` // percentage change (of auc.Bid) required for a new bid on a surplus auction - IncrementDebt sdk.Dec `json:"increment_debt" yaml:"increment_debt"` // percentage change (of auc.Lot) required for a new bid on a debt auction - IncrementCollateral sdk.Dec `json:"increment_collateral" yaml:"increment_collateral"` // percentage change (of auc.Bid or auc.Lot) required for a new bid on a collateral auction -} - -// RegisterCodec registers concrete types on the codec. -func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - cdc.RegisterInterface((*GenesisAuction)(nil), nil) - cdc.RegisterInterface((*Auction)(nil), nil) - cdc.RegisterConcrete(SurplusAuction{}, "auction/SurplusAuction", nil) - cdc.RegisterConcrete(DebtAuction{}, "auction/DebtAuction", nil) - cdc.RegisterConcrete(CollateralAuction{}, "auction/CollateralAuction", nil) -} diff --git a/x/auction/module.go b/x/auction/module.go index ce8898c3..af65a4dd 100644 --- a/x/auction/module.go +++ b/x/auction/module.go @@ -4,7 +4,6 @@ import ( "context" "encoding/json" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" @@ -17,7 +16,6 @@ import ( abci "github.com/tendermint/tendermint/abci/types" "github.com/kava-labs/kava/x/auction/client/cli" - "github.com/kava-labs/kava/x/auction/client/rest" "github.com/kava-labs/kava/x/auction/keeper" "github.com/kava-labs/kava/x/auction/types" ) @@ -61,11 +59,6 @@ func (a AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry types.RegisterInterfaces(registry) } -// RegisterRESTRoutes registers REST routes for the swap module. -func (a AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) { - rest.RegisterRoutes(clientCtx, rtr) -} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the gov module. func (a AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) diff --git a/x/bep3/client/rest/query.go b/x/bep3/client/rest/query.go deleted file mode 100644 index 560db0d6..00000000 --- a/x/bep3/client/rest/query.go +++ /dev/null @@ -1,239 +0,0 @@ -package rest - -import ( - "encoding/hex" - "fmt" - "net/http" - "strconv" - - "github.com/cosmos/cosmos-sdk/client" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/rest" - "github.com/gorilla/mux" - - "github.com/kava-labs/kava/x/bep3/types" -) - -const ( - restSwapID = "swap-id" - restDenom = "denom" -) - -func registerQueryRoutes(cliCtx client.Context, r *mux.Router) { - r.HandleFunc(fmt.Sprintf("/%s/swap/{%s}", types.ModuleName, restSwapID), queryAtomicSwapHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/swaps", types.ModuleName), queryAtomicSwapsHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/supply/{%s}", types.ModuleName, restDenom), queryAssetSupplyHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/supplies", types.ModuleName), queryAssetSuppliesHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/parameters", types.ModuleName), queryParamsHandlerFn(cliCtx)).Methods("GET") -} - -func queryAtomicSwapHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Parse the query height - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - // Prepare params for querier - vars := mux.Vars(r) - if len(vars[restSwapID]) == 0 { - err := fmt.Errorf("%s required but not specified", restSwapID) - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - swapID, err := hex.DecodeString(vars[restSwapID]) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - bz, err := cliCtx.LegacyAmino.MarshalJSON(types.QueryAtomicSwapByID{SwapID: swapID}) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - // Query - res, height, err := cliCtx.QueryWithData(fmt.Sprintf("/custom/%s/%s", types.ModuleName, types.QueryGetAtomicSwap), bz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - // Decode and return results - cliCtx = cliCtx.WithHeight(height) - - var swap types.LegacyAugmentedAtomicSwap - err = cliCtx.LegacyAmino.UnmarshalJSON(res, &swap) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - rest.PostProcessResponse(w, cliCtx, cliCtx.LegacyAmino.MustMarshalJSON(swap)) - } -} - -// HTTP request handler to query list of atomic swaps filtered by optional params -func queryAtomicSwapsHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - _, page, limit, err := rest.ParseHTTPArgsWithLimit(r, 0) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - var ( - involveAddr sdk.AccAddress - expiration uint64 - swapStatus types.SwapStatus - swapDirection types.SwapDirection - ) - - if x := r.URL.Query().Get(RestInvolve); len(x) != 0 { - involveAddr, err = sdk.AccAddressFromBech32(x) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - } - - if x := r.URL.Query().Get(RestExpiration); len(x) != 0 { - expiration, err = strconv.ParseUint(x, 10, 64) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - } - - if x := r.URL.Query().Get(RestStatus); len(x) != 0 { - swapStatus = types.NewSwapStatusFromString(x) - if !swapStatus.IsValid() { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("invalid swap status %s", swapStatus)) - return - } - } - - if x := r.URL.Query().Get(RestDirection); len(x) != 0 { - swapDirection = types.NewSwapDirectionFromString(x) - if !swapDirection.IsValid() { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("invalid swap direction %s", swapDirection)) - return - } - } - - params := types.NewQueryAtomicSwaps(page, limit, involveAddr, expiration, swapStatus, swapDirection) - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - route := fmt.Sprintf("custom/%s/%s", types.QuerierRoute, types.QueryGetAtomicSwaps) - res, height, err := cliCtx.QueryWithData(route, bz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func queryAssetSupplyHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Parse the query height - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - // Prepare params for querier - vars := mux.Vars(r) - denom := vars[restDenom] - params := types.NewQueryAssetSupply(denom) - - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - // Query - res, height, err := cliCtx.QueryWithData(fmt.Sprintf("/custom/%s/%s", types.ModuleName, types.QueryGetAssetSupply), bz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - // Decode and return results - cliCtx = cliCtx.WithHeight(height) - - var assetSupply types.AssetSupply - err = cliCtx.Codec.UnmarshalJSON(res, &assetSupply) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - rest.PostProcessResponse(w, cliCtx, cliCtx.LegacyAmino.MustMarshalJSON(assetSupply)) - } -} - -func queryAssetSuppliesHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Parse the query height - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - route := fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryGetAssetSupplies) - - res, height, err := cliCtx.QueryWithData(route, nil) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - // Decode and return results - cliCtx = cliCtx.WithHeight(height) - - var supplies []types.AssetSupply - err = cliCtx.LegacyAmino.UnmarshalJSON(res, &supplies) - if err != nil { - rest.WriteErrorResponse(w, http.StatusNotFound, err.Error()) - return - } - - // using empty slice so json returns [] instead of null when there's no swaps - sliceSupplies := []types.AssetSupply{} - sliceSupplies = append(sliceSupplies, supplies...) - - rest.PostProcessResponse(w, cliCtx, cliCtx.LegacyAmino.MustMarshalJSON(sliceSupplies)) - } -} - -func queryParamsHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - route := fmt.Sprintf("custom/%s/%s", types.QuerierRoute, types.QueryGetParams) - - res, height, err := cliCtx.QueryWithData(route, nil) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) - } -} diff --git a/x/bep3/client/rest/rest.go b/x/bep3/client/rest/rest.go deleted file mode 100644 index f2b2c506..00000000 --- a/x/bep3/client/rest/rest.go +++ /dev/null @@ -1,55 +0,0 @@ -package rest - -import ( - "github.com/gorilla/mux" - - tmbytes "github.com/tendermint/tendermint/libs/bytes" - - "github.com/cosmos/cosmos-sdk/client" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/rest" -) - -// REST Variable names -// nolint -const ( - RestExpiration = "expiration" - RestInvolve = "involve" - RestStatus = "status" - RestDirection = "direction" -) - -// RegisterRoutes registers bep3-related REST handlers to a router -func RegisterRoutes(cliCtx client.Context, r *mux.Router) { - registerQueryRoutes(cliCtx, r) - registerTxRoutes(cliCtx, r) -} - -// PostCreateSwapReq defines the properties of a swap create request's body -type PostCreateSwapReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - From sdk.AccAddress `json:"from" yaml:"from"` - To sdk.AccAddress `json:"to" yaml:"to"` - RecipientOtherChain string `json:"recipient_other_chain" yaml:"recipient_other_chain"` - SenderOtherChain string `json:"sender_other_chain" yaml:"sender_other_chain"` - RandomNumberHash tmbytes.HexBytes `json:"random_number_hash" yaml:"random_number_hash"` - Timestamp int64 `json:"timestamp" yaml:"timestamp"` - Amount sdk.Coins `json:"amount" yaml:"amount"` - HeightSpan uint64 `json:"height_span" yaml:"height_span"` - CrossChain bool `json:"cross_chain" yaml:"cross_chain"` -} - -// PostClaimSwapReq defines the properties of a swap claim request's body -type PostClaimSwapReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - From sdk.AccAddress `json:"from" yaml:"from"` - SwapID tmbytes.HexBytes `json:"swap_id" yaml:"swap_id"` - RandomNumber tmbytes.HexBytes `json:"random_number" yaml:"random_number"` -} - -// PostRefundSwapReq defines the properties of swap refund request's body -type PostRefundSwapReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - From sdk.AccAddress `json:"from" yaml:"from"` - SwapID tmbytes.HexBytes `json:"swap_id" yaml:"swap_id"` -} diff --git a/x/bep3/client/rest/tx.go b/x/bep3/client/rest/tx.go deleted file mode 100644 index 918d45f9..00000000 --- a/x/bep3/client/rest/tx.go +++ /dev/null @@ -1,109 +0,0 @@ -package rest - -import ( - "fmt" - "net/http" - - "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" - - "github.com/kava-labs/kava/x/bep3/types" -) - -func registerTxRoutes(cliCtx client.Context, r *mux.Router) { - r.HandleFunc(fmt.Sprintf("/%s/swap/create", types.ModuleName), postCreateHandlerFn(cliCtx)).Methods("POST") - r.HandleFunc(fmt.Sprintf("/%s/swap/claim", types.ModuleName), postClaimHandlerFn(cliCtx)).Methods("POST") - r.HandleFunc(fmt.Sprintf("/%s/swap/refund", types.ModuleName), postRefundHandlerFn(cliCtx)).Methods("POST") -} - -func postCreateHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Decode PUT request body - var req PostCreateSwapReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - return - } - req.BaseReq = req.BaseReq.Sanitize() - if !req.BaseReq.ValidateBasic(w) { - return - } - - // Create and return msg - msg := types.NewMsgCreateAtomicSwap( - req.From.String(), - req.To.String(), - req.RecipientOtherChain, - req.SenderOtherChain, - req.RandomNumberHash, - req.Timestamp, - req.Amount, - req.HeightSpan, - ) - if err := msg.ValidateBasic(); err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - tx.WriteGeneratedTxResponse(cliCtx, w, req.BaseReq, &msg) - } -} - -func postClaimHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Decode PUT request body - var req PostClaimSwapReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - return - } - req.BaseReq = req.BaseReq.Sanitize() - if !req.BaseReq.ValidateBasic(w) { - return - } - - // Create and return msg - msg := types.NewMsgClaimAtomicSwap( - req.From.String(), - req.SwapID, - req.RandomNumber, - ) - if err := msg.ValidateBasic(); err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - tx.WriteGeneratedTxResponse(cliCtx, w, req.BaseReq, &msg) - } -} - -func postRefundHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Decode PUT request body - var req PostRefundSwapReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - return - } - req.BaseReq = req.BaseReq.Sanitize() - if !req.BaseReq.ValidateBasic(w) { - return - } - - senderAddr, err := sdk.AccAddressFromBech32(req.BaseReq.From) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - // Create and return msg - msg := types.NewMsgRefundAtomicSwap( - senderAddr.String(), - req.SwapID, - ) - if err := msg.ValidateBasic(); err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - tx.WriteGeneratedTxResponse(cliCtx, w, req.BaseReq, &msg) - } -} diff --git a/x/bep3/genesis.go b/x/bep3/genesis.go index 5a3f0d05..d14e78df 100644 --- a/x/bep3/genesis.go +++ b/x/bep3/genesis.go @@ -56,7 +56,7 @@ func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, accountKeeper types.Acco // Atomic swap assets must be both supported and active err := keeper.ValidateLiveAsset(ctx, swap.Amount[0]) if err != nil { - panic(err) + panic(fmt.Sprintf("swap has invalid asset: %s", err)) } keeper.SetAtomicSwap(ctx, swap) @@ -110,7 +110,7 @@ func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, accountKeeper types.Acco } limit, err := keeper.GetSupplyLimit(ctx, supply.GetDenom()) if err != nil { - panic(err) + panic(fmt.Sprintf("asset's supply limit not found: %s", err)) } if supply.CurrentSupply.Amount.GT(limit.Limit) { panic(fmt.Sprintf("asset's current supply %s is over the supply limit %s", supply.CurrentSupply, limit.Limit)) diff --git a/x/bep3/genesis_test.go b/x/bep3/genesis_test.go index b84e3035..530c07ed 100644 --- a/x/bep3/genesis_test.go +++ b/x/bep3/genesis_test.go @@ -3,11 +3,10 @@ package bep3_test import ( "testing" - "github.com/stretchr/testify/suite" - + "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - + "github.com/stretchr/testify/suite" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" tmtime "github.com/tendermint/tendermint/types/time" @@ -83,9 +82,10 @@ func (suite *GenesisTestSuite) TestGenesisState() { cdc := suite.app.AppCodec() testCases := []struct { - name string - genState GenState - expectPass bool + name string + genState GenState + expectPass bool + expectedErr interface{} }{ { name: "default", @@ -124,37 +124,51 @@ func (suite *GenesisTestSuite) TestGenesisState() { { name: "incoming supply doesn't match amount in incoming atomic swaps", genState: func() app.GenesisState { - gs := baseGenState(suite.addrs[0]) + gs := baseGenState(suite.addrs[0]) // incoming supply is zero _, addrs := app.GeneratePrivKeyAddressPairs(1) - swap, _ := loadSwapAndSupply(addrs[0], 2) + swap, _ := loadSwapAndSupply(addrs[0], 0) gs.AtomicSwaps = types.AtomicSwaps{swap} return app.GenesisState{types.ModuleName: cdc.MustMarshalJSON(&gs)} }, - expectPass: false, + expectPass: false, + expectedErr: "asset's incoming supply 0bnb does not match amount 50000 in incoming atomic swaps", }, { name: "current supply above limit", genState: func() app.GenesisState { gs := baseGenState(suite.addrs[0]) - assetParam, _ := suite.keeper.GetAsset(suite.ctx, "bnb") + bnbSupplyLimit := math.ZeroInt() + for _, ap := range gs.Params.AssetParams { + if ap.Denom == "bnb" { + bnbSupplyLimit = ap.SupplyLimit.Limit + } + } gs.Supplies = types.AssetSupplies{ - { - IncomingSupply: c("bnb", 0), - OutgoingSupply: c("bnb", 0), - CurrentSupply: c("bnb", assetParam.SupplyLimit.Limit.Add(i(1)).Int64()), - }, + types.NewAssetSupply( + c("bnb", 0), + c("bnb", 0), + sdk.NewCoin("bnb", bnbSupplyLimit.Add(i(1))), + c("bnb", 0), + 0, + ), } return app.GenesisState{types.ModuleName: cdc.MustMarshalJSON(&gs)} }, - expectPass: false, + expectPass: false, + expectedErr: "asset's current supply 350000000000001bnb is over the supply limit 350000000000000", }, { name: "incoming supply above limit", genState: func() app.GenesisState { gs := baseGenState(suite.addrs[0]) // Set up overlimit amount - assetParam, _ := suite.keeper.GetAsset(suite.ctx, "bnb") - overLimitAmount := assetParam.SupplyLimit.Limit.Add(i(1)) + bnbSupplyLimit := math.ZeroInt() + for _, ap := range gs.Params.AssetParams { + if ap.Denom == "bnb" { + bnbSupplyLimit = ap.SupplyLimit.Limit + } + } + overLimitAmount := bnbSupplyLimit.Add(i(1)) // Set up an atomic swap with amount equal to the currently asset supply _, addrs := app.GeneratePrivKeyAddressPairs(2) @@ -168,23 +182,31 @@ func (suite *GenesisTestSuite) TestGenesisState() { // Set up asset supply with overlimit current supply gs.Supplies = types.AssetSupplies{ - { - IncomingSupply: c("bnb", assetParam.SupplyLimit.Limit.Add(i(1)).Int64()), - OutgoingSupply: c("bnb", 0), - CurrentSupply: c("bnb", 0), - }, + types.NewAssetSupply( + c("bnb", overLimitAmount.Int64()), + c("bnb", 0), + c("bnb", 0), + c("bnb", 0), + 0, + ), } return app.GenesisState{types.ModuleName: cdc.MustMarshalJSON(&gs)} }, - expectPass: false, + expectPass: false, + expectedErr: "asset's incoming supply 350000000000001bnb is over the supply limit 350000000000000", }, { name: "incoming supply + current supply above limit", genState: func() app.GenesisState { gs := baseGenState(suite.addrs[0]) // Set up overlimit amount - assetParam, _ := suite.keeper.GetAsset(suite.ctx, "bnb") - halfLimit := assetParam.SupplyLimit.Limit.Int64() / 2 + bnbSupplyLimit := math.ZeroInt() + for _, ap := range gs.Params.AssetParams { + if ap.Denom == "bnb" { + bnbSupplyLimit = ap.SupplyLimit.Limit + } + } + halfLimit := bnbSupplyLimit.Int64() / 2 overHalfLimit := halfLimit + 1 // Set up an atomic swap with amount equal to the currently asset supply @@ -197,25 +219,33 @@ func (suite *GenesisTestSuite) TestGenesisState() { TestRecipientOtherChain, 0, types.SWAP_STATUS_OPEN, true, types.SWAP_DIRECTION_INCOMING) gs.AtomicSwaps = types.AtomicSwaps{swap} - // Set up asset supply with overlimit current supply + // Set up asset supply with overlimit supply gs.Supplies = types.AssetSupplies{ - { - IncomingSupply: c("bnb", halfLimit), - OutgoingSupply: c("bnb", 0), - CurrentSupply: c("bnb", overHalfLimit), - }, + types.NewAssetSupply( + c("bnb", halfLimit), + c("bnb", 0), + c("bnb", overHalfLimit), + c("bnb", 0), + 0, + ), } return app.GenesisState{types.ModuleName: cdc.MustMarshalJSON(&gs)} }, - expectPass: false, + expectPass: false, + expectedErr: "asset's incoming supply + current supply 350000000000001bnb is over the supply limit 350000000000000", }, { name: "outgoing supply above limit", genState: func() app.GenesisState { gs := baseGenState(suite.addrs[0]) // Set up overlimit amount - assetParam, _ := suite.keeper.GetAsset(suite.ctx, "bnb") - overLimitAmount := assetParam.SupplyLimit.Limit.Add(i(1)) + bnbSupplyLimit := math.ZeroInt() + for _, ap := range gs.Params.AssetParams { + if ap.Denom == "bnb" { + bnbSupplyLimit = ap.SupplyLimit.Limit + } + } + overLimitAmount := bnbSupplyLimit.Add(i(1)) // Set up an atomic swap with amount equal to the currently asset supply _, addrs := app.GeneratePrivKeyAddressPairs(2) @@ -227,32 +257,38 @@ func (suite *GenesisTestSuite) TestGenesisState() { TestRecipientOtherChain, 0, types.SWAP_STATUS_OPEN, true, types.SWAP_DIRECTION_OUTGOING) gs.AtomicSwaps = types.AtomicSwaps{swap} - // Set up asset supply with overlimit current supply + // Set up asset supply with overlimit outgoing supply gs.Supplies = types.AssetSupplies{ - { - IncomingSupply: c("bnb", 0), - OutgoingSupply: c("bnb", 0), - CurrentSupply: c("bnb", assetParam.SupplyLimit.Limit.Add(i(1)).Int64()), - }, + types.NewAssetSupply( + c("bnb", 0), + c("bnb", overLimitAmount.Int64()), + c("bnb", 0), + c("bnb", 0), + 0, + ), } return app.GenesisState{types.ModuleName: cdc.MustMarshalJSON(&gs)} }, - expectPass: false, + expectPass: false, + expectedErr: "asset's outgoing supply 350000000000001bnb is over the supply limit 350000000000000", }, { name: "asset supply denom is not a supported asset", genState: func() app.GenesisState { gs := baseGenState(suite.addrs[0]) gs.Supplies = types.AssetSupplies{ - { - IncomingSupply: c("fake", 0), - OutgoingSupply: c("fake", 0), - CurrentSupply: c("fake", 0), - }, + types.NewAssetSupply( + c("fake", 0), + c("fake", 0), + c("fake", 0), + c("fake", 0), + 0, + ), } return app.GenesisState{types.ModuleName: cdc.MustMarshalJSON(&gs)} }, - expectPass: false, + expectPass: false, + expectedErr: "asset's supply limit not found: fake: asset not found", }, { name: "atomic swap asset type is unsupported", @@ -269,7 +305,8 @@ func (suite *GenesisTestSuite) TestGenesisState() { gs.AtomicSwaps = types.AtomicSwaps{swap} return app.GenesisState{types.ModuleName: cdc.MustMarshalJSON(&gs)} }, - expectPass: false, + expectPass: false, + expectedErr: "swap has invalid asset: fake: asset not found", }, { name: "atomic swap status is invalid", @@ -286,7 +323,8 @@ func (suite *GenesisTestSuite) TestGenesisState() { gs.AtomicSwaps = types.AtomicSwaps{swap} return app.GenesisState{types.ModuleName: cdc.MustMarshalJSON(&gs)} }, - expectPass: false, + expectPass: false, + expectedErr: "failed to validate bep3 genesis state: invalid swap status", }, { name: "minimum block lock cannot be > maximum block lock", @@ -296,7 +334,8 @@ func (suite *GenesisTestSuite) TestGenesisState() { gs.Params.AssetParams[0].MaxBlockLock = 200 return app.GenesisState{types.ModuleName: cdc.MustMarshalJSON(&gs)} }, - expectPass: false, + expectPass: false, + expectedErr: "failed to validate bep3 genesis state: asset bnb has minimum block lock > maximum block lock 201 > 200", }, { name: "empty supported asset denom", @@ -305,7 +344,8 @@ func (suite *GenesisTestSuite) TestGenesisState() { gs.Params.AssetParams[0].Denom = "" return app.GenesisState{types.ModuleName: cdc.MustMarshalJSON(&gs)} }, - expectPass: false, + expectPass: false, + expectedErr: "failed to validate bep3 genesis state: asset denom invalid: ", }, { name: "negative supported asset limit", @@ -314,7 +354,8 @@ func (suite *GenesisTestSuite) TestGenesisState() { gs.Params.AssetParams[0].SupplyLimit.Limit = i(-100) return app.GenesisState{types.ModuleName: cdc.MustMarshalJSON(&gs)} }, - expectPass: false, + expectPass: false, + expectedErr: "failed to validate bep3 genesis state: asset bnb has invalid (negative) supply limit: -100", }, { name: "duplicate supported asset denom", @@ -323,20 +364,22 @@ func (suite *GenesisTestSuite) TestGenesisState() { gs.Params.AssetParams[1].Denom = "bnb" return app.GenesisState{types.ModuleName: cdc.MustMarshalJSON(&gs)} }, - expectPass: false, + expectPass: false, + expectedErr: "failed to validate bep3 genesis state: asset bnb cannot have duplicate denom", }, } for _, tc := range testCases { suite.Run(tc.name, func() { suite.SetupTest() + gs := tc.genState() if tc.expectPass { suite.NotPanics(func() { - suite.app.InitializeFromGenesisStates(tc.genState()) + suite.app.InitializeFromGenesisStates(gs) }, tc.name) } else { - suite.Panics(func() { - suite.app.InitializeFromGenesisStates(tc.genState()) + suite.PanicsWithValue(tc.expectedErr, func() { + suite.app.InitializeFromGenesisStates(gs) }, tc.name) } }) diff --git a/x/bep3/keeper/keeper.go b/x/bep3/keeper/keeper.go index 2c31f9ee..405d8ec2 100644 --- a/x/bep3/keeper/keeper.go +++ b/x/bep3/keeper/keeper.go @@ -6,6 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/store/prefix" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/tendermint/tendermint/libs/log" @@ -15,7 +16,7 @@ import ( // Keeper of the bep3 store type Keeper struct { - key sdk.StoreKey + key storetypes.StoreKey cdc codec.Codec paramSubspace paramtypes.Subspace bankKeeper types.BankKeeper @@ -24,7 +25,7 @@ type Keeper struct { } // NewKeeper creates a bep3 keeper -func NewKeeper(cdc codec.Codec, key sdk.StoreKey, sk types.BankKeeper, ak types.AccountKeeper, +func NewKeeper(cdc codec.Codec, key storetypes.StoreKey, sk types.BankKeeper, ak types.AccountKeeper, paramstore paramtypes.Subspace, maccs map[string]bool, ) Keeper { if !paramstore.HasKeyTable() { diff --git a/x/bep3/module.go b/x/bep3/module.go index 55565fa9..6603803f 100644 --- a/x/bep3/module.go +++ b/x/bep3/module.go @@ -4,7 +4,6 @@ import ( "context" "encoding/json" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" @@ -17,7 +16,6 @@ import ( abci "github.com/tendermint/tendermint/abci/types" "github.com/kava-labs/kava/x/bep3/client/cli" - "github.com/kava-labs/kava/x/bep3/client/rest" "github.com/kava-labs/kava/x/bep3/keeper" "github.com/kava-labs/kava/x/bep3/types" ) @@ -64,11 +62,6 @@ func (a AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry types.RegisterInterfaces(registry) } -// RegisterRESTRoutes registers REST routes for the swap module. -func (a AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) { - rest.RegisterRoutes(clientCtx, rtr) -} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the gov module. func (a AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) diff --git a/x/bep3/types/supply.go b/x/bep3/types/supply.go index 8c17140d..def20cd7 100644 --- a/x/bep3/types/supply.go +++ b/x/bep3/types/supply.go @@ -31,7 +31,7 @@ func (a AssetSupply) Validate() error { return sdkerrors.Wrapf(sdkerrors.ErrInvalidCoins, "current supply %s", a.CurrentSupply) } if !a.TimeLimitedCurrentSupply.IsValid() { - return sdkerrors.Wrapf(sdkerrors.ErrInvalidCoins, "time-limited current supply %s", a.CurrentSupply) + return sdkerrors.Wrapf(sdkerrors.ErrInvalidCoins, "time-limited current supply %s", a.TimeLimitedCurrentSupply) } denom := a.CurrentSupply.Denom if (a.IncomingSupply.Denom != denom) || diff --git a/x/cdp/client/rest/query.go b/x/cdp/client/rest/query.go deleted file mode 100644 index ba83719f..00000000 --- a/x/cdp/client/rest/query.go +++ /dev/null @@ -1,336 +0,0 @@ -package rest - -import ( - "fmt" - "net/http" - "strconv" - "strings" - - "github.com/cosmos/cosmos-sdk/client" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/rest" - "github.com/gorilla/mux" - - "github.com/kava-labs/kava/x/cdp/types" -) - -// define routes that get registered by the main application -func registerQueryRoutes(cliCtx client.Context, r *mux.Router) { - r.HandleFunc("/cdp/accounts", getAccountsHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc("/cdp/parameters", getParamsHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc("/cdp/totalPrincipal", getTotalPrincipal(cliCtx)).Methods("GET") - r.HandleFunc("/cdp/totalCollateral", getTotalCollateral(cliCtx)).Methods("GET") - r.HandleFunc("/cdp/cdps", queryCdpsHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/cdp/cdps/cdp/{%s}/{%s}", types.RestOwner, types.RestCollateralType), queryCdpHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/cdp/cdps/collateralType/{%s}", types.RestCollateralType), queryCdpsByCollateralTypeHandlerFn(cliCtx)).Methods("GET") // legacy - r.HandleFunc(fmt.Sprintf("/cdp/cdps/ratio/{%s}/{%s}", types.RestCollateralType, types.RestRatio), queryCdpsByRatioHandlerFn(cliCtx)).Methods("GET") // legacy - r.HandleFunc(fmt.Sprintf("/cdp/cdps/cdp/deposits/{%s}/{%s}", types.RestOwner, types.RestCollateralType), queryCdpDepositsHandlerFn(cliCtx)).Methods("GET") -} - -func queryCdpHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - vars := mux.Vars(r) - ownerBech32 := vars[types.RestOwner] - collateralType := vars[types.RestCollateralType] - - owner, err := sdk.AccAddressFromBech32(ownerBech32) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - params := types.NewQueryCdpParams(owner, collateralType) - - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("failed to marshal query params: %s", err)) - return - } - - res, height, err := cliCtx.QueryWithData(fmt.Sprintf("custom/cdp/%s", types.QueryGetCdp), bz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusNotFound, err.Error()) - return - } - - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func queryCdpsByCollateralTypeHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - vars := mux.Vars(r) - collateralType := vars[types.RestCollateralType] - - params := types.NewQueryCdpsByCollateralTypeParams(collateralType) - - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("failed to marshal query params: %s", err)) - return - } - - res, height, err := cliCtx.QueryWithData(fmt.Sprintf("custom/cdp/%s", types.QueryGetCdpsByCollateralType), bz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusNotFound, err.Error()) - return - } - - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func queryCdpsByRatioHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - vars := mux.Vars(r) - collateralType := vars[types.RestCollateralType] - ratioStr := vars[types.RestRatio] - - ratioDec, sdkError := sdk.NewDecFromStr(ratioStr) - if sdkError != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, sdkError.Error()) - return - } - - params := types.NewQueryCdpsByRatioParams(collateralType, ratioDec) - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("failed to marshal query params: %s", err)) - return - } - - res, height, err := cliCtx.QueryWithData(fmt.Sprintf("custom/cdp/%s", types.QueryGetCdpsByCollateralization), bz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusNotFound, err.Error()) - return - } - - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func queryCdpDepositsHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - vars := mux.Vars(r) - ownerBech32 := vars[types.RestOwner] - collateralType := vars[types.RestCollateralType] - - owner, err := sdk.AccAddressFromBech32(ownerBech32) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - params := types.NewQueryCdpDeposits(owner, collateralType) - - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("failed to marshal query params: %s", err)) - return - } - - res, height, err := cliCtx.QueryWithData(fmt.Sprintf("custom/cdp/%s", types.QueryGetCdpDeposits), bz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusNotFound, err.Error()) - return - } - - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func getParamsHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - res, height, err := cliCtx.QueryWithData(fmt.Sprintf("custom/cdp/%s", types.QueryGetParams), nil) - cliCtx = cliCtx.WithHeight(height) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func getAccountsHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - res, height, err := cliCtx.QueryWithData(fmt.Sprintf("custom/cdp/%s", types.QueryGetAccounts), nil) - cliCtx = cliCtx.WithHeight(height) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func queryCdpsHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - _, page, limit, err := rest.ParseHTTPArgsWithLimit(r, 0) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - // Parse the query height - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - var cdpCollateralType string - var cdpOwner sdk.AccAddress - var cdpID uint64 - var cdpRatio sdk.Dec - - if x := r.URL.Query().Get(RestCollateralType); len(x) != 0 { - cdpCollateralType = strings.TrimSpace(x) - } - - if x := r.URL.Query().Get(RestOwner); len(x) != 0 { - cdpOwnerStr := strings.ToLower(strings.TrimSpace(x)) - cdpOwner, err = sdk.AccAddressFromBech32(cdpOwnerStr) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("cannot parse address from cdp owner %s", cdpOwnerStr)) - return - } - } - - if x := r.URL.Query().Get(RestID); len(x) != 0 { - cdpID, err = strconv.ParseUint(strings.TrimSpace(x), 10, 64) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - } - - if x := r.URL.Query().Get(RestRatio); len(x) != 0 { - cdpRatio, err = sdk.NewDecFromStr(strings.TrimSpace(x)) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - } else { - // Set to sdk.Dec(0) so that if not specified in params it doesn't panic when unmarshaled - cdpRatio = sdk.ZeroDec() - } - - params := types.NewQueryCdpsParams(page, limit, cdpCollateralType, cdpOwner, cdpID, cdpRatio) - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - route := fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryGetCdps) - res, height, err := cliCtx.QueryWithData(route, bz) - cliCtx = cliCtx.WithHeight(height) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func getTotalPrincipal(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Parse the query height - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - var cdpCollateralType string - - if x := r.URL.Query().Get(RestCollateralType); len(x) != 0 { - cdpCollateralType = strings.TrimSpace(x) - } - - params := types.NewQueryGetTotalPrincipalParams(cdpCollateralType) - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - route := fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryGetTotalPrincipal) - res, height, err := cliCtx.QueryWithData(route, bz) - cliCtx = cliCtx.WithHeight(height) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func getTotalCollateral(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Parse the query height - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - var cdpCollateralType string - - if x := r.URL.Query().Get(RestCollateralType); len(x) != 0 { - cdpCollateralType = strings.TrimSpace(x) - } - - params := types.NewQueryGetTotalCollateralParams(cdpCollateralType) - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - route := fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryGetTotalCollateral) - res, height, err := cliCtx.QueryWithData(route, bz) - cliCtx = cliCtx.WithHeight(height) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - rest.PostProcessResponse(w, cliCtx, res) - } -} diff --git a/x/cdp/client/rest/rest.go b/x/cdp/client/rest/rest.go deleted file mode 100644 index d43b5fff..00000000 --- a/x/cdp/client/rest/rest.go +++ /dev/null @@ -1,74 +0,0 @@ -package rest - -import ( - "github.com/gorilla/mux" - - "github.com/cosmos/cosmos-sdk/client" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/rest" -) - -// REST Variable names -// nolint -const ( - RestOwner = "owner" - RestCollateralType = "collateral-type" - RestID = "id" - RestRatio = "ratio" -) - -// RegisterRoutes - Central function to define routes that get registered by the main application -func RegisterRoutes(cliCtx client.Context, r *mux.Router) { - registerQueryRoutes(cliCtx, r) - registerTxRoutes(cliCtx, r) -} - -// PostCdpReq defines the properties of cdp request's body. -type PostCdpReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - Sender sdk.AccAddress `json:"sender" yaml:"sender"` - Collateral sdk.Coin `json:"collateral" yaml:"collateral"` - CollateralType string `json:"collateral_type" yaml:"collateral_type"` - Principal sdk.Coin `json:"principal" yaml:"principal"` -} - -// PostDepositReq defines the properties of cdp request's body. -type PostDepositReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - Owner sdk.AccAddress `json:"owner" yaml:"owner"` - Depositor sdk.AccAddress `json:"depositor" yaml:"depositor"` - Collateral sdk.Coin `json:"collateral" yaml:"collateral"` - CollateralType string `json:"collateral_type" yaml:"collateral_type"` -} - -// PostWithdrawalReq defines the properties of cdp request's body. -type PostWithdrawalReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - Owner sdk.AccAddress `json:"owner" yaml:"owner"` - Depositor sdk.AccAddress `json:"depositor" yaml:"depositor"` - Collateral sdk.Coin `json:"collateral" yaml:"collateral"` - CollateralType string `json:"collateral_type" yaml:"collateral_type"` -} - -// PostDrawReq defines the properties of cdp request's body. -type PostDrawReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - Owner sdk.AccAddress `json:"owner" yaml:"owner"` - CollateralType string `json:"collateral_type" yaml:"collateral_type"` - Principal sdk.Coin `json:"principal" yaml:"principal"` -} - -// PostRepayReq defines the properties of cdp request's body. -type PostRepayReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - Owner sdk.AccAddress `json:"owner" yaml:"owner"` - CollateralType string `json:"collateral_type" yaml:"collateral_type"` - Payment sdk.Coin `json:"payment" yaml:"payment"` -} - -// PostLiquidateReq defines the properties of cdp liquidation request's body. -type PostLiquidateReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - Owner sdk.AccAddress `json:"owner" yaml:"owner"` - CollateralType string `json:"collateral_type" yaml:"collateral_type"` -} diff --git a/x/cdp/client/rest/tx.go b/x/cdp/client/rest/tx.go deleted file mode 100644 index 9142874f..00000000 --- a/x/cdp/client/rest/tx.go +++ /dev/null @@ -1,228 +0,0 @@ -package rest - -import ( - "bytes" - "fmt" - "net/http" - - "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" - "github.com/gorilla/mux" - - "github.com/kava-labs/kava/x/cdp/types" -) - -func registerTxRoutes(cliCtx client.Context, r *mux.Router) { - r.HandleFunc("/cdp", postCdpHandlerFn(cliCtx)).Methods("POST") - r.HandleFunc("/cdp/{owner}/{collateralType}/deposits", postDepositHandlerFn(cliCtx)).Methods("POST") - r.HandleFunc("/cdp/{owner}/{collateralType}/withdraw", postWithdrawHandlerFn(cliCtx)).Methods("POST") - r.HandleFunc("/cdp/{owner}/{collateralType}/draw", postDrawHandlerFn(cliCtx)).Methods("POST") - r.HandleFunc("/cdp/{owner}/{collateralType}/repay", postRepayHandlerFn(cliCtx)).Methods("POST") - r.HandleFunc("/cdp/{owner}/{collateralType}/liquidate", postLiquidateHandlerFn(cliCtx)).Methods("POST") -} - -func postCdpHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req PostCdpReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - rest.WriteErrorResponse(w, http.StatusBadRequest, "failed to parse request") - return - } - - baseReq := req.BaseReq.Sanitize() - if !baseReq.ValidateBasic(w) { - return - } - - fromAddr, err := sdk.AccAddressFromBech32(baseReq.From) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - if !bytes.Equal(fromAddr, req.Sender) { - rest.WriteErrorResponse(w, http.StatusUnauthorized, fmt.Sprintf("expected: %s, got: %s", fromAddr, req.Sender)) - return - } - - msg := types.NewMsgCreateCDP( - req.Sender, - req.Collateral, - req.Principal, - req.CollateralType, - ) - if err := msg.ValidateBasic(); err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - tx.WriteGeneratedTxResponse(cliCtx, w, baseReq, &msg) - } -} - -func postDepositHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req PostDepositReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - rest.WriteErrorResponse(w, http.StatusBadRequest, "failed to parse request") - return - } - - baseReq := req.BaseReq.Sanitize() - if !baseReq.ValidateBasic(w) { - return - } - - msg := types.NewMsgDeposit( - req.Owner, - req.Depositor, - req.Collateral, - req.CollateralType, - ) - if err := msg.ValidateBasic(); err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - tx.WriteGeneratedTxResponse(cliCtx, w, baseReq, &msg) - } -} - -func postWithdrawHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req PostWithdrawalReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - rest.WriteErrorResponse(w, http.StatusBadRequest, "failed to parse request") - return - } - - baseReq := req.BaseReq.Sanitize() - if !baseReq.ValidateBasic(w) { - return - } - - msg := types.NewMsgWithdraw( - req.Owner, - req.Depositor, - req.Collateral, - req.CollateralType, - ) - if err := msg.ValidateBasic(); err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - tx.WriteGeneratedTxResponse(cliCtx, w, baseReq, &msg) - } -} - -func postDrawHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req PostDrawReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - rest.WriteErrorResponse(w, http.StatusBadRequest, "failed to parse request") - return - } - - baseReq := req.BaseReq.Sanitize() - if !baseReq.ValidateBasic(w) { - return - } - - fromAddr, err := sdk.AccAddressFromBech32(baseReq.From) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - if !bytes.Equal(fromAddr, req.Owner) { - rest.WriteErrorResponse(w, http.StatusUnauthorized, fmt.Sprintf("expected: %s, got: %s", fromAddr, req.Owner)) - return - } - - msg := types.NewMsgDrawDebt( - req.Owner, - req.CollateralType, - req.Principal, - ) - if err := msg.ValidateBasic(); err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - tx.WriteGeneratedTxResponse(cliCtx, w, baseReq, &msg) - } -} - -func postRepayHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req PostRepayReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - rest.WriteErrorResponse(w, http.StatusBadRequest, "failed to parse request") - return - } - - baseReq := req.BaseReq.Sanitize() - if !baseReq.ValidateBasic(w) { - return - } - - fromAddr, err := sdk.AccAddressFromBech32(baseReq.From) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - if !bytes.Equal(fromAddr, req.Owner) { - rest.WriteErrorResponse(w, http.StatusUnauthorized, fmt.Sprintf("expected: %s, got: %s", fromAddr, req.Owner)) - return - } - - msg := types.NewMsgRepayDebt( - req.Owner, - req.CollateralType, - req.Payment, - ) - if err := msg.ValidateBasic(); err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - tx.WriteGeneratedTxResponse(cliCtx, w, baseReq, &msg) - } -} - -func postLiquidateHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req PostLiquidateReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - rest.WriteErrorResponse(w, http.StatusBadRequest, "failed to parse request") - return - } - - baseReq := req.BaseReq.Sanitize() - if !baseReq.ValidateBasic(w) { - return - } - - fromAddr, err := sdk.AccAddressFromBech32(baseReq.From) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - msg := types.NewMsgLiquidate( - fromAddr, - req.Owner, - req.CollateralType, - ) - if err := msg.ValidateBasic(); err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - tx.WriteGeneratedTxResponse(cliCtx, w, baseReq, &msg) - } -} diff --git a/x/cdp/keeper/interest.go b/x/cdp/keeper/interest.go index 994705b0..a84cc096 100644 --- a/x/cdp/keeper/interest.go +++ b/x/cdp/keeper/interest.go @@ -4,6 +4,7 @@ import ( "fmt" "math" + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/kava-labs/kava/x/cdp/types" @@ -47,7 +48,7 @@ func (k Keeper) AccumulateInterest(ctx sdk.Context, ctype string) error { return nil } interestFactor := CalculateInterestFactor(borrowRateSpy, sdk.NewInt(timeElapsed)) - interestAccumulated := (interestFactor.Mul(totalPrincipalPrior.ToDec())).RoundInt().Sub(totalPrincipalPrior) + interestAccumulated := (interestFactor.Mul(sdk.NewDecFromInt(totalPrincipalPrior))).RoundInt().Sub(totalPrincipalPrior) if interestAccumulated.IsZero() { // in the case accumulated interest rounds to zero, exit early without updating accrual time return nil @@ -90,13 +91,13 @@ func CalculateInterestFactor(perSecondInterestRate sdk.Dec, secondsElapsed sdk.I scalingFactorInt := sdk.NewInt(int64(scalingFactor)) // Convert per-second interest rate to a uint scaled by 1e18 - interestMantissa := sdk.NewUintFromBigInt(perSecondInterestRate.MulInt(scalingFactorInt).RoundInt().BigInt()) + interestMantissa := sdkmath.NewUintFromBigInt(perSecondInterestRate.MulInt(scalingFactorInt).RoundInt().BigInt()) // Convert seconds elapsed to uint (*not scaled*) - secondsElapsedUint := sdk.NewUintFromBigInt(secondsElapsed.BigInt()) + secondsElapsedUint := sdkmath.NewUintFromBigInt(secondsElapsed.BigInt()) // Calculate the interest factor as a uint scaled by 1e18 - interestFactorMantissa := sdk.RelativePow(interestMantissa, secondsElapsedUint, scalingFactorUint) + interestFactorMantissa := sdkmath.RelativePow(interestMantissa, secondsElapsedUint, scalingFactorUint) // Convert interest factor to an unscaled sdk.Dec return sdk.NewDecFromBigInt(interestFactorMantissa.BigInt()).QuoInt(scalingFactorInt) @@ -155,7 +156,7 @@ func (k Keeper) CalculateNewInterest(ctx sdk.Context, cdp types.CDP) sdk.Coin { if cdpInterestFactor.Equal(sdk.OneDec()) { return sdk.NewCoin(cdp.AccumulatedFees.Denom, sdk.ZeroInt()) } - accumulatedInterest := cdp.GetTotalPrincipal().Amount.ToDec().Mul(cdpInterestFactor).RoundInt().Sub(cdp.GetTotalPrincipal().Amount) + accumulatedInterest := sdk.NewDecFromInt(cdp.GetTotalPrincipal().Amount).Mul(cdpInterestFactor).RoundInt().Sub(cdp.GetTotalPrincipal().Amount) return sdk.NewCoin(cdp.AccumulatedFees.Denom, accumulatedInterest) } diff --git a/x/cdp/keeper/keeper.go b/x/cdp/keeper/keeper.go index ee6f207e..b6ca8841 100644 --- a/x/cdp/keeper/keeper.go +++ b/x/cdp/keeper/keeper.go @@ -6,6 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/store/prefix" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" @@ -14,7 +15,7 @@ import ( // Keeper keeper for the cdp module type Keeper struct { - key sdk.StoreKey + key storetypes.StoreKey cdc codec.Codec paramSubspace paramtypes.Subspace pricefeedKeeper types.PricefeedKeeper @@ -26,7 +27,7 @@ type Keeper struct { } // NewKeeper creates a new keeper -func NewKeeper(cdc codec.Codec, key sdk.StoreKey, paramstore paramtypes.Subspace, pfk types.PricefeedKeeper, +func NewKeeper(cdc codec.Codec, key storetypes.StoreKey, paramstore paramtypes.Subspace, pfk types.PricefeedKeeper, ak types.AuctionKeeper, bk types.BankKeeper, ack types.AccountKeeper, maccs map[string][]string, ) Keeper { if !paramstore.HasKeyTable() { diff --git a/x/cdp/keeper/seize.go b/x/cdp/keeper/seize.go index d038a19f..331fe239 100644 --- a/x/cdp/keeper/seize.go +++ b/x/cdp/keeper/seize.go @@ -140,7 +140,7 @@ func (k Keeper) payoutKeeperLiquidationReward(ctx sdk.Context, keeper sdk.AccAdd if !found { return types.CDP{}, sdkerrors.Wrapf(types.ErrInvalidCollateral, "%s", cdp.Type) } - reward := cdp.Collateral.Amount.ToDec().Mul(collateralParam.KeeperRewardPercentage).RoundInt() + reward := sdk.NewDecFromInt(cdp.Collateral.Amount).Mul(collateralParam.KeeperRewardPercentage).RoundInt() rewardCoin := sdk.NewCoin(cdp.Collateral.Denom, reward) paidReward := false deposits := k.GetDeposits(ctx, cdp.ID) diff --git a/x/cdp/module.go b/x/cdp/module.go index 6d9bd6fc..599e2714 100644 --- a/x/cdp/module.go +++ b/x/cdp/module.go @@ -4,7 +4,6 @@ import ( "context" "encoding/json" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" @@ -17,7 +16,6 @@ import ( abci "github.com/tendermint/tendermint/abci/types" "github.com/kava-labs/kava/x/cdp/client/cli" - "github.com/kava-labs/kava/x/cdp/client/rest" "github.com/kava-labs/kava/x/cdp/keeper" "github.com/kava-labs/kava/x/cdp/types" ) @@ -63,11 +61,6 @@ func (a AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry types.RegisterInterfaces(registry) } -// RegisterRESTRoutes registers REST routes for the swap module. -func (a AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) { - rest.RegisterRoutes(clientCtx, rtr) -} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the gov module. func (a AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { diff --git a/x/cdp/types/cdp.go b/x/cdp/types/cdp.go index 15ad920c..25e137ca 100644 --- a/x/cdp/types/cdp.go +++ b/x/cdp/types/cdp.go @@ -81,7 +81,7 @@ func (cdp CDP) GetNormalizedPrincipal() (sdk.Dec, error) { if cdp.InterestFactor.LT(sdk.OneDec()) { return sdk.Dec{}, fmt.Errorf("interest factor '%s' must be ≥ 1", cdp.InterestFactor) } - return unsyncedDebt.ToDec().Quo(cdp.InterestFactor), nil + return sdk.NewDecFromInt(unsyncedDebt).Quo(cdp.InterestFactor), nil } // CDPs a collection of CDP objects diff --git a/x/committee/abci_test.go b/x/committee/abci_test.go index 740c94f9..3056d290 100644 --- a/x/committee/abci_test.go +++ b/x/committee/abci_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/suite" sdk "github.com/cosmos/cosmos-sdk/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" @@ -51,12 +51,12 @@ func (suite *ModuleTestSuite) TestBeginBlock_ClosesExpired() { ) suite.keeper.SetCommittee(suite.ctx, memberCom) - pprop1 := govtypes.NewTextProposal("Title 1", "A description of this proposal.") + pprop1 := govv1beta1.NewTextProposal("Title 1", "A description of this proposal.") id1, err := suite.keeper.SubmitProposal(suite.ctx, memberCom.Members[0], memberCom.ID, pprop1) suite.NoError(err) oneHrLaterCtx := suite.ctx.WithBlockTime(suite.ctx.BlockTime().Add(time.Hour)) - pprop2 := govtypes.NewTextProposal("Title 2", "A description of this proposal.") + pprop2 := govv1beta1.NewTextProposal("Title 2", "A description of this proposal.") id2, err := suite.keeper.SubmitProposal(oneHrLaterCtx, memberCom.Members[0], memberCom.ID, pprop2) suite.NoError(err) diff --git a/x/committee/client/cli/tx.go b/x/committee/client/cli/tx.go index 0022f7bd..2bfd20eb 100644 --- a/x/committee/client/cli/tx.go +++ b/x/committee/client/cli/tx.go @@ -18,7 +18,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" paramsproposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal" "github.com/kava-labs/kava/x/committee/types" @@ -231,7 +231,7 @@ and to delete a committee: if err != nil { return err } - var content govtypes.Content + var content govv1beta1.Content if err := clientCtx.Codec.UnmarshalInterfaceJSON(bz, &content); err != nil { return err } @@ -240,7 +240,7 @@ and to delete a committee: } // Build message and run basic validation - msg, err := govtypes.NewMsgSubmitProposal(content, deposit, proposer) + msg, err := govv1beta1.NewMsgSubmitProposal(content, deposit, proposer) if err != nil { return err } diff --git a/x/committee/client/proposal_handler.go b/x/committee/client/proposal_handler.go index 0bbd31ea..f2494526 100644 --- a/x/committee/client/proposal_handler.go +++ b/x/committee/client/proposal_handler.go @@ -4,8 +4,7 @@ import ( govclient "github.com/cosmos/cosmos-sdk/x/gov/client" "github.com/kava-labs/kava/x/committee/client/cli" - "github.com/kava-labs/kava/x/committee/client/rest" ) // ProposalHandler is a struct containing handler funcs for submiting CommitteeChange/Delete proposal txs to the gov module through the cli or rest. -var ProposalHandler = govclient.NewProposalHandler(cli.GetGovCmdSubmitProposal, rest.ProposalRESTHandler) +var ProposalHandler = govclient.NewProposalHandler(cli.GetGovCmdSubmitProposal) diff --git a/x/committee/client/rest/query.go b/x/committee/client/rest/query.go deleted file mode 100644 index fb4a3b91..00000000 --- a/x/committee/client/rest/query.go +++ /dev/null @@ -1,297 +0,0 @@ -package rest - -import ( - "errors" - "fmt" - "net/http" - - "github.com/gorilla/mux" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/types/rest" - - "github.com/kava-labs/kava/x/committee/client/common" - "github.com/kava-labs/kava/x/committee/types" -) - -func registerQueryRoutes(cliCtx client.Context, r *mux.Router) { - r.HandleFunc(fmt.Sprintf("/%s/committees", types.ModuleName), queryCommitteesHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/committees/{%s}", types.ModuleName, RestCommitteeID), queryCommitteeHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/next-proposal-id", types.ModuleName), queryNextProposalIdHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/committees/{%s}/proposals", types.ModuleName, RestCommitteeID), queryProposalsHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/proposals/{%s}", types.ModuleName, RestProposalID), queryProposalHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/proposals/{%s}/proposer", types.ModuleName, RestProposalID), queryProposerHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/proposals/{%s}/tally", types.ModuleName, RestProposalID), queryTallyOnProposalHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/proposals/{%s}/votes", types.ModuleName, RestProposalID), queryVotesOnProposalHandlerFn(cliCtx)).Methods("GET") -} - -// ------------------------------------------ -// Committees -// ------------------------------------------ - -func queryCommitteesHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Parse the query height - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - // Query - res, height, err := cliCtx.QueryWithData(fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryCommittees), nil) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - // Write response - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func queryCommitteeHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Parse the query height - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - // Prepare params for querier - vars := mux.Vars(r) - if len(vars[RestCommitteeID]) == 0 { - err := errors.New("committeeID required but not specified") - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - committeeID, ok := rest.ParseUint64OrReturnBadRequest(w, vars[RestCommitteeID]) - if !ok { - return - } - bz, err := cliCtx.LegacyAmino.MarshalJSON(types.NewQueryCommitteeParams(committeeID)) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - // Query - res, height, err := cliCtx.QueryWithData(fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryCommittee), bz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - // Write response - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) - } -} - -// ------------------------------------------ -// Proposals -// ------------------------------------------ - -func queryNextProposalIdHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Parse the query height - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - // Query - res, height, err := cliCtx.QueryWithData(fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryNextProposalID), nil) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - // Write response - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func queryProposalsHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Parse the query height - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - // Prepare params for querier - vars := mux.Vars(r) - if len(vars[RestCommitteeID]) == 0 { - err := errors.New("committeeID required but not specified") - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - committeeID, ok := rest.ParseUint64OrReturnBadRequest(w, vars[RestCommitteeID]) - if !ok { - return - } - bz, err := cliCtx.LegacyAmino.MarshalJSON(types.NewQueryCommitteeParams(committeeID)) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - // Query - res, height, err := cliCtx.QueryWithData(fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryProposals), bz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - // Write response - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func queryProposalHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Parse the query height - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - // Prepare params for querier - vars := mux.Vars(r) - if len(vars[RestProposalID]) == 0 { - err := errors.New("proposalID required but not specified") - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - proposalID, ok := rest.ParseUint64OrReturnBadRequest(w, vars[RestProposalID]) - if !ok { - return - } - - proposal, height, err := common.QueryProposalByID(cliCtx, cliCtx.LegacyAmino, types.ModuleName, proposalID) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - res, err := cliCtx.LegacyAmino.MarshalJSON(proposal) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - // Write response - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func queryProposerHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Parse the query height - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - // Prepare params for querier - vars := mux.Vars(r) - proposalID, ok := rest.ParseUint64OrReturnBadRequest(w, vars[RestProposalID]) - if !ok { - return - } - - // Query - res, err := common.QueryProposer(cliCtx, proposalID) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - // Write response - rest.PostProcessResponse(w, cliCtx, res) - } -} - -// ------------------------------------------ -// Votes -// ------------------------------------------ - -func queryVotesOnProposalHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Parse the query height - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - // Prepare params for querier - vars := mux.Vars(r) - if len(vars[RestProposalID]) == 0 { - err := errors.New(fmt.Sprintf("%s required but not specified", RestProposalID)) - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - proposalID, ok := rest.ParseUint64OrReturnBadRequest(w, vars[RestProposalID]) - if !ok { - return - } - bz, err := cliCtx.LegacyAmino.MarshalJSON(types.NewQueryProposalParams(proposalID)) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - // Query - res, height, err := cliCtx.QueryWithData(fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryVotes), bz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - // Write response - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func queryTallyOnProposalHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Parse the query height - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - // Prepare params for querier - vars := mux.Vars(r) - if len(vars[RestProposalID]) == 0 { - err := errors.New(fmt.Sprintf("%s required but not specified", RestProposalID)) - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - proposalID, ok := rest.ParseUint64OrReturnBadRequest(w, vars[RestProposalID]) - if !ok { - return - } - bz, err := cliCtx.LegacyAmino.MarshalJSON(types.NewQueryProposalParams(proposalID)) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - // Query - res, height, err := cliCtx.QueryWithData(fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryTally), bz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - // Write response - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) - } -} diff --git a/x/committee/client/rest/rest.go b/x/committee/client/rest/rest.go deleted file mode 100644 index 897c7b91..00000000 --- a/x/committee/client/rest/rest.go +++ /dev/null @@ -1,20 +0,0 @@ -package rest - -import ( - "github.com/gorilla/mux" - - "github.com/cosmos/cosmos-sdk/client" -) - -// REST Variable names -const ( - RestProposalID = "proposal-id" - RestCommitteeID = "committee-id" - RestVote = "vote" -) - -// RegisterRoutes - Central function to define routes that get registered by the main application -func RegisterRoutes(cliCtx client.Context, r *mux.Router) { - registerQueryRoutes(cliCtx, r) - registerTxRoutes(cliCtx, r) -} diff --git a/x/committee/client/rest/tx.go b/x/committee/client/rest/tx.go deleted file mode 100644 index 73aae0e7..00000000 --- a/x/committee/client/rest/tx.go +++ /dev/null @@ -1,173 +0,0 @@ -package rest - -import ( - "fmt" - "net/http" - "strings" - - "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" - govrest "github.com/cosmos/cosmos-sdk/x/gov/client/rest" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - - "github.com/kava-labs/kava/x/committee/types" -) - -func registerTxRoutes(cliCtx client.Context, r *mux.Router) { - r.HandleFunc(fmt.Sprintf("/%s/committees/{%s}/proposals", types.ModuleName, RestCommitteeID), postProposalHandlerFn(cliCtx)).Methods("POST") - r.HandleFunc(fmt.Sprintf("/%s/proposals/{%s}/votes", types.ModuleName, RestProposalID), postVoteHandlerFn(cliCtx)).Methods("POST") -} - -// PostProposalReq defines the properties of a proposal request's body. -type PostProposalReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - PubProposal types.PubProposal `json:"pub_proposal" yaml:"pub_proposal"` - Proposer sdk.AccAddress `json:"proposer" yaml:"proposer"` -} - -func postProposalHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Parse and validate url params - vars := mux.Vars(r) - if len(vars[RestCommitteeID]) == 0 { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("%s required but not specified", RestCommitteeID)) - return - } - committeeID, ok := rest.ParseUint64OrReturnBadRequest(w, vars[RestCommitteeID]) - if !ok { - return - } - - // Parse and validate http request body - var req PostProposalReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - return - } - req.BaseReq = req.BaseReq.Sanitize() - if !req.BaseReq.ValidateBasic(w) { - return - } - if err := req.PubProposal.ValidateBasic(); err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - // Create and return a StdTx - msg, err := types.NewMsgSubmitProposal(req.PubProposal, req.Proposer, committeeID) - if rest.CheckBadRequestError(w, err) { - return - } - if rest.CheckBadRequestError(w, msg.ValidateBasic()) { - return - } - tx.WriteGeneratedTxResponse(cliCtx, w, req.BaseReq, msg) - } -} - -// PostVoteReq defines the properties of a vote request's body. -type PostVoteReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - Voter sdk.AccAddress `json:"voter" yaml:"voter"` - Vote types.VoteType `json:"vote" yaml:"vote"` -} - -func postVoteHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Parse and validate url params - vars := mux.Vars(r) - if len(vars[RestProposalID]) == 0 { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("%s required but not specified", RestProposalID)) - return - } - proposalID, ok := rest.ParseUint64OrReturnBadRequest(w, vars[RestProposalID]) - if !ok { - return - } - - if len(vars[RestVote]) == 0 { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("%s required but not specified", RestVote)) - return - } - - rawVote := strings.ToLower(strings.TrimSpace(vars[RestVote])) - if len(rawVote) == 0 { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("invalid %s: %s", RestVote, rawVote)) - return - } - - var vote types.VoteType - switch rawVote { - case "yes", "y": - vote = types.VOTE_TYPE_YES - case "no", "n": - vote = types.VOTE_TYPE_NO - default: - rest.WriteErrorResponse(w, http.StatusBadRequest, "must specify a valid vote type (\"yes\", \"y\"/\"no\" \"n\")") - return - } - - // Parse and validate http request body - var req PostVoteReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - return - } - req.BaseReq = req.BaseReq.Sanitize() - if !req.BaseReq.ValidateBasic(w) { - return - } - - // Create and return a StdTx - msg := types.NewMsgVote(req.Voter, proposalID, vote) - if rest.CheckBadRequestError(w, msg.ValidateBasic()) { - return - } - tx.WriteGeneratedTxResponse(cliCtx, w, req.BaseReq, msg) - } -} - -// This is a rest handler for for the gov module, that handles committee change/delete proposals. -type PostGovProposalReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - Content govtypes.Content `json:"content" yaml:"content"` - Proposer sdk.AccAddress `json:"proposer" yaml:"proposer"` - Deposit sdk.Coins `json:"deposit" yaml:"deposit"` -} - -func ProposalRESTHandler(cliCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "committee", - Handler: postGovProposalHandlerFn(cliCtx), - } -} - -func postGovProposalHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Parse and validate http request body - var req PostGovProposalReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - return - } - req.BaseReq = req.BaseReq.Sanitize() - if !req.BaseReq.ValidateBasic(w) { - return - } - if err := req.Content.ValidateBasic(); err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - // Create and return a StdTx - msg, err := govtypes.NewMsgSubmitProposal(req.Content, req.Deposit, req.Proposer) - if rest.CheckBadRequestError(w, err) { - return - } - if rest.CheckBadRequestError(w, msg.ValidateBasic()) { - return - } - tx.WriteGeneratedTxResponse(cliCtx, w, req.BaseReq, msg) - } -} diff --git a/x/committee/keeper/integration_test.go b/x/committee/keeper/integration_test.go index e118af40..75c04a0c 100644 --- a/x/committee/keeper/integration_test.go +++ b/x/committee/keeper/integration_test.go @@ -6,7 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/kava-labs/kava/app" "github.com/kava-labs/kava/x/committee/keeper" @@ -49,7 +49,7 @@ func mustNewTestMemberCommittee(addresses []sdk.AccAddress) *types.MemberCommitt // mustNewTestProposal returns a new test proposal. func mustNewTestProposal() types.Proposal { proposal, err := types.NewProposal( - govtypes.NewTextProposal("A Title", "A description of this proposal."), + govv1beta1.NewTextProposal("A Title", "A description of this proposal."), 1, 1, time.Date(2010, time.January, 1, 0, 0, 0, 0, time.UTC), ) if err != nil { diff --git a/x/committee/keeper/keeper.go b/x/committee/keeper/keeper.go index 3fdc8c88..a9ba14fe 100644 --- a/x/committee/keeper/keeper.go +++ b/x/committee/keeper/keeper.go @@ -5,26 +5,27 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/store/prefix" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/kava-labs/kava/x/committee/types" ) type Keeper struct { cdc codec.Codec - storeKey sdk.StoreKey + storeKey storetypes.StoreKey paramKeeper types.ParamKeeper accountKeeper types.AccountKeeper bankKeeper types.BankKeeper // Proposal router - router govtypes.Router + router govv1beta1.Router } -func NewKeeper(cdc codec.Codec, storeKey sdk.StoreKey, router govtypes.Router, +func NewKeeper(cdc codec.Codec, storeKey storetypes.StoreKey, router govv1beta1.Router, paramKeeper types.ParamKeeper, ak types.AccountKeeper, sk types.BankKeeper, ) Keeper { // Logic in the keeper methods assume the set of gov handlers is fixed. diff --git a/x/committee/keeper/keeper_test.go b/x/committee/keeper/keeper_test.go index 61a2d1b3..4ba614a7 100644 --- a/x/committee/keeper/keeper_test.go +++ b/x/committee/keeper/keeper_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/stretchr/testify/suite" "github.com/kava-labs/kava/x/committee/testutil" @@ -49,7 +49,7 @@ func (suite *keeperTestSuite) TestGetSetDeleteCommittee() { func (suite *keeperTestSuite) TestGetSetDeleteProposal() { // test setup prop, err := types.NewProposal( - govtypes.NewTextProposal("A Title", "A description of this proposal."), + govv1beta1.NewTextProposal("A Title", "A description of this proposal."), 12, 0, time.Date(1998, time.January, 1, 0, 0, 0, 0, time.UTC), diff --git a/x/committee/keeper/proposal.go b/x/committee/keeper/proposal.go index 95d8b232..e079a5a5 100644 --- a/x/committee/keeper/proposal.go +++ b/x/committee/keeper/proposal.go @@ -201,16 +201,16 @@ func (k Keeper) TallyTokenCommitteeVotes(ctx sdk.Context, proposalID uint64, accNumCoins := k.bankKeeper.GetBalance(ctx, acc.GetAddress(), tallyDenom).Amount // Add votes to counters - totalVotes = totalVotes.Add(accNumCoins.ToDec()) + totalVotes = totalVotes.Add(sdk.NewDecFromInt(accNumCoins)) if vote.VoteType == types.VOTE_TYPE_YES { - yesVotes = yesVotes.Add(accNumCoins.ToDec()) + yesVotes = yesVotes.Add(sdk.NewDecFromInt(accNumCoins)) } else if vote.VoteType == types.VOTE_TYPE_NO { - noVotes = noVotes.Add(accNumCoins.ToDec()) + noVotes = noVotes.Add(sdk.NewDecFromInt(accNumCoins)) } } possibleVotesInt := k.bankKeeper.GetSupply(ctx, tallyDenom).Amount - return yesVotes, noVotes, totalVotes, possibleVotesInt.ToDec() + return yesVotes, noVotes, totalVotes, sdk.NewDecFromInt(possibleVotesInt) } func (k Keeper) attemptEnactProposal(ctx sdk.Context, proposal types.Proposal) types.ProposalOutcome { diff --git a/x/committee/keeper/proposal_test.go b/x/committee/keeper/proposal_test.go index fba2bb4d..792c43dc 100644 --- a/x/committee/keeper/proposal_test.go +++ b/x/committee/keeper/proposal_test.go @@ -6,7 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" @@ -345,7 +345,7 @@ func (suite *keeperTestSuite) TestAddVote() { // setup the committee and proposal keeper.SetCommittee(ctx, tc.committee) - _, err := keeper.SubmitProposal(ctx, tc.committee.GetMembers()[0], tc.committee.GetID(), govtypes.NewTextProposal("A Title", "A description of this proposal.")) + _, err := keeper.SubmitProposal(ctx, tc.committee.GetMembers()[0], tc.committee.GetID(), govv1beta1.NewTextProposal("A Title", "A description of this proposal.")) suite.NoError(err) ctx = ctx.WithBlockTime(tc.voteTime) @@ -416,7 +416,7 @@ func (suite *keeperTestSuite) TestTallyMemberCommitteeVotes() { tApp.AppCodec(), []types.Committee{memberCom}, []types.Proposal{types.MustNewProposal( - govtypes.NewTextProposal("A Title", "A description of this proposal."), + govv1beta1.NewTextProposal("A Title", "A description of this proposal."), defaultProposalID, memberCom.GetID(), firstBlockTime.Add(time.Hour*24*7), @@ -555,14 +555,13 @@ func (suite *keeperTestSuite) TestTallyTokenCommitteeVotes() { tApp.AppCodec(), []types.Committee{tokenCom}, []types.Proposal{types.MustNewProposal( - govtypes.NewTextProposal("A Title", "A description of this proposal."), + govv1beta1.NewTextProposal("A Title", "A description of this proposal."), defaultProposalID, tokenCom.GetID(), firstBlockTime.Add(time.Hour*24*7), )}, tc.votes, ), - bankGenState(tApp.AppCodec(), totalSupply), app.NewFundedGenStateWithCoins(tApp.AppCodec(), genCoins, genAddrs), ) @@ -575,7 +574,7 @@ func (suite *keeperTestSuite) TestTallyTokenCommitteeVotes() { // Check that all non-Yes votes are counted according to their weight suite.Equal(tc.expectedTotalVoteCount, currVotes) // Check that possible votes equals the number of members on the committee - suite.Equal(totalSupply.AmountOf(tokenCom.GetTallyDenom()).ToDec(), possibleVotes) + suite.Equal(sdk.NewDecFromInt(totalSupply.AmountOf(tokenCom.GetTallyDenom())), possibleVotes) } } @@ -632,7 +631,7 @@ func (suite *keeperTestSuite) TestGetMemberCommitteeProposalResult() { tApp.AppCodec(), []types.Committee{tc.committee}, []types.Proposal{types.MustNewProposal( - govtypes.NewTextProposal("A Title", "A description of this proposal."), + govv1beta1.NewTextProposal("A Title", "A description of this proposal."), defaultID, tc.committee.GetID(), firstBlockTime.Add(time.Hour*24*7), @@ -759,14 +758,13 @@ func (suite *keeperTestSuite) TestGetTokenCommitteeProposalResult() { tApp.AppCodec(), []types.Committee{tc.committee}, []types.Proposal{types.MustNewProposal( - govtypes.NewTextProposal("A Title", "A description of this proposal."), + govv1beta1.NewTextProposal("A Title", "A description of this proposal."), defaultID, tc.committee.GetID(), firstBlockTime.Add(time.Hour*24*7), )}, tc.votes, ), - bankGenState(tApp.AppCodec(), totalSupply), app.NewFundedGenStateWithCoins(tApp.AppCodec(), genCoins, genAddrs), ) @@ -799,7 +797,7 @@ func (suite *keeperTestSuite) TestCloseProposal() { tApp.AppCodec(), []types.Committee{memberCom}, []types.Proposal{types.MustNewProposal( - govtypes.NewTextProposal("A Title", "A description of this proposal."), + govv1beta1.NewTextProposal("A Title", "A description of this proposal."), proposalID, memberCom.GetID(), firstBlockTime.Add(time.Hour*24*7), @@ -856,7 +854,7 @@ func bankGenState(cdc codec.Codec, coins sdk.Coins) app.GenesisState { } type UnregisteredPubProposal struct { - govtypes.TextProposal + govv1beta1.TextProposal } func (UnregisteredPubProposal) ProposalRoute() string { return "unregistered" } diff --git a/x/committee/module.go b/x/committee/module.go index 58f96056..7dbfb0a5 100644 --- a/x/committee/module.go +++ b/x/committee/module.go @@ -5,7 +5,6 @@ import ( "encoding/json" "fmt" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" @@ -18,7 +17,6 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" "github.com/kava-labs/kava/x/committee/client/cli" - "github.com/kava-labs/kava/x/committee/client/rest" "github.com/kava-labs/kava/x/committee/keeper" "github.com/kava-labs/kava/x/committee/types" ) @@ -68,11 +66,6 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod return genState.Validate() } -// RegisterRESTRoutes registers committee module's REST service handlers. -func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) { - rest.RegisterRoutes(clientCtx, rtr) -} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for committee module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) diff --git a/x/committee/proposal_handler.go b/x/committee/proposal_handler.go index c339c934..d9d92c26 100644 --- a/x/committee/proposal_handler.go +++ b/x/committee/proposal_handler.go @@ -3,13 +3,13 @@ package committee import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/kava-labs/kava/x/committee/keeper" "github.com/kava-labs/kava/x/committee/types" ) -func NewProposalHandler(k keeper.Keeper) govtypes.Handler { - return func(ctx sdk.Context, content govtypes.Content) error { +func NewProposalHandler(k keeper.Keeper) govv1beta1.Handler { + return func(ctx sdk.Context, content govv1beta1.Content) error { switch c := content.(type) { case *types.CommitteeChangeProposal: return handleCommitteeChangeProposal(ctx, k, c) diff --git a/x/committee/proposal_handler_test.go b/x/committee/proposal_handler_test.go index a3cc76cb..586cac89 100644 --- a/x/committee/proposal_handler_test.go +++ b/x/committee/proposal_handler_test.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" @@ -62,7 +62,7 @@ func (suite *ProposalHandlerTestSuite) SetupTest() { }, types.Proposals{ types.MustNewProposal( - govtypes.NewTextProposal("A Title", "A description of this proposal."), 1, 1, testTime.Add(7*24*time.Hour), + govv1beta1.NewTextProposal("A Title", "A description of this proposal."), 1, 1, testTime.Add(7*24*time.Hour), ), }, []types.Vote{ diff --git a/x/committee/simulation/operations.go b/x/committee/simulation/operations.go index 6c092700..63776a70 100644 --- a/x/committee/simulation/operations.go +++ b/x/committee/simulation/operations.go @@ -136,7 +136,7 @@ func SimulateMsgSubmitProposal(cdc *codec.Codec, ak AccountKeeper, k keeper.Keep // pick the voters // num voters determined by whether the proposal should pass or not numMembers := int64(len(selectedCommittee.GetMembers())) - majority := selectedCommittee.GetVoteThreshold().Mul(sdk.NewInt(numMembers).ToDec()).Ceil().TruncateInt64() + majority := selectedCommittee.GetVoteThreshold().Mul(sdk.NewDec(numMembers)).Ceil().TruncateInt64() numVoters := r.Int63n(majority) // in interval [0, majority) shouldPass := r.Float64() < proposalPassPercentage diff --git a/x/committee/types/codec.go b/x/committee/types/codec.go index 9f0acc95..ef16146e 100644 --- a/x/committee/types/codec.go +++ b/x/committee/types/codec.go @@ -2,12 +2,13 @@ package types import ( "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/legacy" "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" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" proposaltypes "github.com/cosmos/cosmos-sdk/x/params/types/proposal" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" kavadisttypes "github.com/kava-labs/kava/x/kavadist/types" @@ -30,11 +31,15 @@ func init() { cryptocodec.RegisterCrypto(amino) // amino is not sealed so that other modules can register their own pubproposal and/or permission types. + // CommitteeChange/Delete proposals along with Permission types are + // registered on gov's ModuleCdc + RegisterLegacyAminoCodec(govv1beta1.ModuleCdc.LegacyAmino) + // Register external module pubproposal types. Ideally these would be registered within the modules' types pkg init function. // However registration happens here as a work-around. RegisterProposalTypeCodec(distrtypes.CommunityPoolSpendProposal{}, "cosmos-sdk/CommunityPoolSpendProposal") RegisterProposalTypeCodec(proposaltypes.ParameterChangeProposal{}, "cosmos-sdk/ParameterChangeProposal") - RegisterProposalTypeCodec(govtypes.TextProposal{}, "cosmos-sdk/TextProposal") + RegisterProposalTypeCodec(govv1beta1.TextProposal{}, "cosmos-sdk/TextProposal") RegisterProposalTypeCodec(upgradetypes.SoftwareUpgradeProposal{}, "cosmos-sdk/SoftwareUpgradeProposal") RegisterProposalTypeCodec(upgradetypes.CancelSoftwareUpgradeProposal{}, "cosmos-sdk/CancelSoftwareUpgradeProposal") } @@ -60,8 +65,8 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(ParamsChangePermission{}, "kava/ParamsChangePermission", nil) // Msgs - cdc.RegisterConcrete(&MsgSubmitProposal{}, "kava/MsgSubmitProposal", nil) - cdc.RegisterConcrete(&MsgVote{}, "kava/MsgVote", nil) + legacy.RegisterAminoMsg(cdc, &MsgSubmitProposal{}, "kava/MsgSubmitProposal") + legacy.RegisterAminoMsg(cdc, &MsgVote{}, "kava/MsgVote") } // RegisterProposalTypeCodec allows external modules to register their own pubproposal types on the @@ -102,7 +107,7 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { (*PubProposal)(nil), &Proposal{}, &distrtypes.CommunityPoolSpendProposal{}, - &govtypes.TextProposal{}, + &govv1beta1.TextProposal{}, &kavadisttypes.CommunityPoolMultiSpendProposal{}, &proposaltypes.ParameterChangeProposal{}, &upgradetypes.SoftwareUpgradeProposal{}, @@ -110,7 +115,7 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { ) registry.RegisterImplementations( - (*govtypes.Content)(nil), + (*govv1beta1.Content)(nil), &CommitteeChangeProposal{}, &CommitteeDeleteProposal{}, ) diff --git a/x/committee/types/committee.go b/x/committee/types/committee.go index 96df78d1..d5e5990d 100644 --- a/x/committee/types/committee.go +++ b/x/committee/types/committee.go @@ -7,7 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" proto "github.com/gogo/protobuf/proto" "sigs.k8s.io/yaml" ) @@ -21,15 +21,6 @@ const ( BondDenom = "ukava" ) -func init() { - // CommitteeChange/Delete proposals are registered on gov's ModuleCdc (see proposal.go). - // But since these proposals contain Committees, these types also need registering: - govtypes.ModuleCdc.RegisterInterface((*Committee)(nil), nil) - govtypes.RegisterProposalTypeCodec(BaseCommittee{}, "kava/BaseCommittee") - govtypes.RegisterProposalTypeCodec(MemberCommittee{}, "kava/MemberCommittee") - govtypes.RegisterProposalTypeCodec(TokenCommittee{}, "kava/TokenCommittee") -} - // Marshal needed for protobuf compatibility. func (t TallyOption) Marshal() ([]byte, error) { return []byte{byte(t)}, nil @@ -343,7 +334,7 @@ func (c TokenCommittee) Validate() error { // PubProposal is the interface that all proposals must fulfill to be submitted to a committee. // Proposal types can be created external to this module. For example a ParamChangeProposal, or CommunityPoolSpendProposal. // It is pinned to the equivalent type in the gov module to create compatibility between proposal types. -type PubProposal govtypes.Content +type PubProposal govv1beta1.Content var ( _ PubProposal = Proposal{} diff --git a/x/committee/types/committee_test.go b/x/committee/types/committee_test.go index d8f7d7fc..f4500d38 100644 --- a/x/committee/types/committee_test.go +++ b/x/committee/types/committee_test.go @@ -6,7 +6,7 @@ import ( "time" sdk "github.com/cosmos/cosmos-sdk/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/crypto" @@ -368,7 +368,7 @@ func TestProposalGetContent(t *testing.T) { mockTitle := "A Title" mockDescription := "A Description" proposal, err := types.NewProposal( - govtypes.NewTextProposal(mockTitle, mockDescription), + govv1beta1.NewTextProposal(mockTitle, mockDescription), 1, 1, time.Date(2010, time.January, 1, 0, 0, 0, 0, time.UTC), ) assert.NoError(t, err) diff --git a/x/committee/types/genesis_test.go b/x/committee/types/genesis_test.go index 99f6e002..6b2d46ce 100644 --- a/x/committee/types/genesis_test.go +++ b/x/committee/types/genesis_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/require" sdk "github.com/cosmos/cosmos-sdk/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/tendermint/tendermint/crypto" "github.com/kava-labs/kava/x/committee/testutil" @@ -59,7 +59,7 @@ func TestGenesisState_Validate(t *testing.T) { }, types.Proposals{ types.MustNewProposal( - govtypes.NewTextProposal("A Title", "A description of this proposal."), 1, 1, testTime.Add(7*24*time.Hour)), + govv1beta1.NewTextProposal("A Title", "A description of this proposal."), 1, 1, testTime.Add(7*24*time.Hour)), }, []types.Vote{ {ProposalID: 1, Voter: addresses[0], VoteType: types.VOTE_TYPE_YES}, @@ -130,7 +130,7 @@ func TestGenesisState_Validate(t *testing.T) { append( testGenesis.Proposals, types.MustNewProposal( - govtypes.NewTextProposal("A Title", "A description of this proposal."), + govv1beta1.NewTextProposal("A Title", "A description of this proposal."), testGenesis.NextProposalID, 47, // doesn't exist testTime.Add(7*24*time.Hour), diff --git a/x/committee/types/msg_test.go b/x/committee/types/msg_test.go index 803d9fd5..65ecfe28 100644 --- a/x/committee/types/msg_test.go +++ b/x/committee/types/msg_test.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) func MustNewMsgSubmitProposal(pubProposal PubProposal, proposer sdk.AccAddress, committeeId uint64) *MsgSubmitProposal { @@ -28,12 +28,12 @@ func TestMsgSubmitProposal_ValidateBasic(t *testing.T) { }{ { name: "normal", - msg: MustNewMsgSubmitProposal(govtypes.NewTextProposal("A Title", "A proposal description."), addr, 3), + msg: MustNewMsgSubmitProposal(govv1beta1.NewTextProposal("A Title", "A proposal description."), addr, 3), expectPass: true, }, { name: "empty address", - msg: MustNewMsgSubmitProposal(govtypes.NewTextProposal("A Title", "A proposal description."), nil, 3), + msg: MustNewMsgSubmitProposal(govv1beta1.NewTextProposal("A Title", "A proposal description."), nil, 3), expectPass: false, }, { diff --git a/x/committee/types/permissions.go b/x/committee/types/permissions.go index e6a9f8f9..5e229c52 100644 --- a/x/committee/types/permissions.go +++ b/x/committee/types/permissions.go @@ -8,22 +8,12 @@ import ( "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" paramsproposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" proto "github.com/gogo/protobuf/proto" ) -func init() { - // CommitteeChange/Delete proposals are registered on gov's ModuleCdc (see proposal.go). - // But since these proposals contain Permissions, these types also need registering: - govtypes.ModuleCdc.RegisterInterface((*Permission)(nil), nil) - govtypes.RegisterProposalTypeCodec(GodPermission{}, "kava/GodPermission") - govtypes.RegisterProposalTypeCodec(TextPermission{}, "kava/TextPermission") - govtypes.RegisterProposalTypeCodec(SoftwareUpgradePermission{}, "kava/SoftwareUpgradePermission") - govtypes.RegisterProposalTypeCodec(ParamsChangePermission{}, "kava/ParamsChangePermission") -} - // Permission is anything with a method that validates whether a proposal is allowed by it or not. type Permission interface { Allows(sdk.Context, ParamKeeper, PubProposal) bool @@ -70,7 +60,7 @@ func (GodPermission) Allows(sdk.Context, ParamKeeper, PubProposal) bool { return // Allows implement permission interface for TextPermission. func (TextPermission) Allows(_ sdk.Context, _ ParamKeeper, p PubProposal) bool { - _, ok := p.(*govtypes.TextProposal) + _, ok := p.(*govv1beta1.TextProposal) return ok } diff --git a/x/committee/types/permissions_test.go b/x/committee/types/permissions_test.go index 1d9280fe..5c4e62f0 100644 --- a/x/committee/types/permissions_test.go +++ b/x/committee/types/permissions_test.go @@ -7,7 +7,7 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" paramsproposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal" "github.com/kava-labs/kava/x/committee/types" @@ -161,7 +161,7 @@ func TestParamsChangePermission_SimpleParamsChange_Allows(t *testing.T) { { name: "not allowed (mismatched pubproposal type)", permission: testPermission, - pubProposal: govtypes.NewTextProposal("A Title", "A description of this proposal."), + pubProposal: govv1beta1.NewTextProposal("A Title", "A description of this proposal."), expectAllowed: false, }, { diff --git a/x/committee/types/proposal.go b/x/committee/types/proposal.go index c019b26c..e933e9b4 100644 --- a/x/committee/types/proposal.go +++ b/x/committee/types/proposal.go @@ -3,7 +3,7 @@ package types import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) const ( @@ -34,7 +34,7 @@ func (p ProposalOutcome) String() string { } // ensure proposal types fulfill the PubProposal interface and the gov Content interface. -var _, _ govtypes.Content = &CommitteeChangeProposal{}, &CommitteeDeleteProposal{} +var _, _ govv1beta1.Content = &CommitteeChangeProposal{}, &CommitteeDeleteProposal{} var _, _ PubProposal = &CommitteeChangeProposal{}, &CommitteeDeleteProposal{} // ensure CommitteeChangeProposal fulfill the codectypes.UnpackInterfacesMessage interface @@ -42,11 +42,8 @@ var _ codectypes.UnpackInterfacesMessage = &CommitteeChangeProposal{} func init() { // Gov proposals need to be registered on gov's ModuleCdc so MsgSubmitProposal can be encoded. - govtypes.RegisterProposalType(ProposalTypeCommitteeChange) - govtypes.RegisterProposalTypeCodec(CommitteeChangeProposal{}, "kava/CommitteeChangeProposal") - - govtypes.RegisterProposalType(ProposalTypeCommitteeDelete) - govtypes.RegisterProposalTypeCodec(CommitteeDeleteProposal{}, "kava/CommitteeDeleteProposal") + govv1beta1.RegisterProposalType(ProposalTypeCommitteeChange) + govv1beta1.RegisterProposalType(ProposalTypeCommitteeDelete) } func NewCommitteeChangeProposal(title string, description string, newCommittee Committee) (CommitteeChangeProposal, error) { @@ -98,7 +95,7 @@ func (ccp CommitteeChangeProposal) UnpackInterfaces(unpacker codectypes.AnyUnpac // ValidateBasic runs basic stateless validity checks func (ccp CommitteeChangeProposal) ValidateBasic() error { - if err := govtypes.ValidateAbstract(&ccp); err != nil { + if err := govv1beta1.ValidateAbstract(&ccp); err != nil { return err } committee, err := UnpackCommittee(ccp.NewCommittee) @@ -133,5 +130,5 @@ func (cdp CommitteeDeleteProposal) ProposalType() string { return ProposalTypeCo // ValidateBasic runs basic stateless validity checks func (cdp CommitteeDeleteProposal) ValidateBasic() error { - return govtypes.ValidateAbstract(&cdp) + return govv1beta1.ValidateAbstract(&cdp) } diff --git a/x/community/client/cli/tx.go b/x/community/client/cli/tx.go index 26bba71b..a140c12c 100644 --- a/x/community/client/cli/tx.go +++ b/x/community/client/cli/tx.go @@ -11,7 +11,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/tx" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/kava-labs/kava/x/community/client/utils" "github.com/kava-labs/kava/x/community/types" @@ -116,7 +116,7 @@ Where proposal.json contains: } from := clientCtx.GetFromAddress() - msg, err := govtypes.NewMsgSubmitProposal(&proposal, deposit, from) + msg, err := govv1beta1.NewMsgSubmitProposal(&proposal, deposit, from) if err != nil { return err } @@ -176,7 +176,7 @@ Where proposal.json contains: return err } from := clientCtx.GetFromAddress() - msg, err := govtypes.NewMsgSubmitProposal(&proposal, deposit, from) + msg, err := govv1beta1.NewMsgSubmitProposal(&proposal, deposit, from) if err != nil { return err } diff --git a/x/community/client/proposal_handler.go b/x/community/client/proposal_handler.go index 2ba9f328..f1a0dfa1 100644 --- a/x/community/client/proposal_handler.go +++ b/x/community/client/proposal_handler.go @@ -1,35 +1,17 @@ package client import ( - "net/http" - - "github.com/cosmos/cosmos-sdk/client" govclient "github.com/cosmos/cosmos-sdk/x/gov/client" - govrest "github.com/cosmos/cosmos-sdk/x/gov/client/rest" "github.com/kava-labs/kava/x/community/client/cli" - "github.com/kava-labs/kava/x/community/types" ) // community-pool deposit/withdraw lend proposal handlers var ( LendDepositProposalHandler = govclient.NewProposalHandler( cli.NewCmdSubmitCommunityPoolLendDepositProposal, - notImplementedRestHandler(types.ProposalTypeCommunityPoolLendDeposit), ) LendWithdrawProposalHandler = govclient.NewProposalHandler( cli.NewCmdSubmitCommunityPoolLendWithdrawProposal, - notImplementedRestHandler(types.ProposalTypeCommunityPoolLendDeposit), ) ) - -func notImplementedRestHandler(subRoute string) govclient.RESTHandlerFn { - return func(ctx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: subRoute, - Handler: func(w http.ResponseWriter, r *http.Request) { - http.Error(w, "Unimplemented", http.StatusNotImplemented) - }, - } - } -} diff --git a/x/community/handler.go b/x/community/handler.go index cd498440..07f16a51 100644 --- a/x/community/handler.go +++ b/x/community/handler.go @@ -3,15 +3,15 @@ package community import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/kava-labs/kava/x/community/keeper" "github.com/kava-labs/kava/x/community/types" ) // NewCommunityPoolProposalHandler handles x/community proposals. -func NewCommunityPoolProposalHandler(k keeper.Keeper) govtypes.Handler { - return func(ctx sdk.Context, content govtypes.Content) error { +func NewCommunityPoolProposalHandler(k keeper.Keeper) govv1beta1.Handler { + return func(ctx sdk.Context, content govv1beta1.Content) error { switch c := content.(type) { case *types.CommunityPoolLendDepositProposal: return keeper.HandleCommunityPoolLendDepositProposal(ctx, k, c) diff --git a/x/community/keeper/proposal_handler.go b/x/community/keeper/proposal_handler.go index 6f6aba10..f724a8e5 100644 --- a/x/community/keeper/proposal_handler.go +++ b/x/community/keeper/proposal_handler.go @@ -31,7 +31,7 @@ func HandleCommunityPoolLendWithdrawProposal(ctx sdk.Context, k Keeper, p *types } balanceAfter := k.bankKeeper.GetAllBalances(ctx, k.moduleAddress) - totalWithdrawn := balanceAfter.Sub(balanceBefore) + totalWithdrawn := balanceAfter.Sub(balanceBefore...) // send all withdrawn coins back to community pool return k.distrKeeper.FundCommunityPool(ctx, totalWithdrawn, k.moduleAddress) diff --git a/x/community/keeper/proposal_handler_test.go b/x/community/keeper/proposal_handler_test.go index 261789b9..ecf56f80 100644 --- a/x/community/keeper/proposal_handler_test.go +++ b/x/community/keeper/proposal_handler_test.go @@ -289,6 +289,12 @@ func (suite *proposalTestSuite) TestCommunityLendWithdrawProposal() { suite.Run(tc.name, func() { suite.SetupTest() + // Disable minting, so that the community pool balance doesn't change + // during the test - this is because staking denom is "ukava" and no + // longer "stake" which has an initial and changing balance instead + // of just 0 + suite.App.SetInflation(suite.Ctx, sdk.ZeroDec()) + // setup initial deposit if !tc.initialDeposit.IsZero() { deposit := types.NewCommunityPoolLendDepositProposal("initial deposit", "has coins", tc.initialDeposit) @@ -312,7 +318,7 @@ func (suite *proposalTestSuite) TestCommunityLendWithdrawProposal() { } // expect funds to be removed from hard deposit - expectedRemaining := tc.initialDeposit.Sub(tc.expectedWithdrawal) + expectedRemaining := tc.initialDeposit.Sub(tc.expectedWithdrawal...) deposits := suite.hardKeeper.GetDepositsByUser(suite.Ctx, suite.MaccAddress) if expectedRemaining.IsZero() { suite.Len(deposits, 0, "expected all deposits to be withdrawn") diff --git a/x/community/module.go b/x/community/module.go index f017e435..2861e9f4 100644 --- a/x/community/module.go +++ b/x/community/module.go @@ -4,7 +4,6 @@ import ( "context" "encoding/json" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" @@ -55,10 +54,6 @@ func (a AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry types.RegisterInterfaces(registry) } -// RegisterRESTRoutes registers REST routes for the module. -// Deprecated: unused but necessary to fulfill AppModuleBasic interface -func (a AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router) {} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module. func (a AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { diff --git a/x/community/types/codec.go b/x/community/types/codec.go index 9913d187..a5a92c56 100644 --- a/x/community/types/codec.go +++ b/x/community/types/codec.go @@ -6,7 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/msgservice" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -24,7 +24,7 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { registry.RegisterImplementations((*sdk.Msg)(nil), &MsgFundCommunityPool{}, ) - registry.RegisterImplementations((*govtypes.Content)(nil), + registry.RegisterImplementations((*govv1beta1.Content)(nil), &CommunityPoolLendDepositProposal{}, &CommunityPoolLendWithdrawProposal{}, ) diff --git a/x/community/types/msg.go b/x/community/types/msg.go index 2deed288..fe376229 100644 --- a/x/community/types/msg.go +++ b/x/community/types/msg.go @@ -3,7 +3,7 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/x/auth/legacy/legacytx" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" ) // ensure Msg interface compliance at compile time diff --git a/x/community/types/proposal.go b/x/community/types/proposal.go index 51448ac4..a86434ab 100644 --- a/x/community/types/proposal.go +++ b/x/community/types/proposal.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) const ( @@ -18,15 +18,15 @@ const ( // Assert CommunityPoolLendDepositProposal implements govtypes.Content at compile-time var ( - _ govtypes.Content = &CommunityPoolLendDepositProposal{} - _ govtypes.Content = &CommunityPoolLendWithdrawProposal{} + _ govv1beta1.Content = &CommunityPoolLendDepositProposal{} + _ govv1beta1.Content = &CommunityPoolLendWithdrawProposal{} ) func init() { - govtypes.RegisterProposalType(ProposalTypeCommunityPoolLendDeposit) - govtypes.RegisterProposalTypeCodec(&CommunityPoolLendDepositProposal{}, "kava/CommunityPoolLendDepositProposal") - govtypes.RegisterProposalType(ProposalTypeCommunityPoolLendWithdraw) - govtypes.RegisterProposalTypeCodec(&CommunityPoolLendWithdrawProposal{}, "kava/CommunityPoolLendWithdrawProposal") + govv1beta1.RegisterProposalType(ProposalTypeCommunityPoolLendDeposit) + govv1beta1.ModuleCdc.Amino.RegisterConcrete(&CommunityPoolLendDepositProposal{}, "kava/CommunityPoolLendDepositProposal", nil) + govv1beta1.RegisterProposalType(ProposalTypeCommunityPoolLendWithdraw) + govv1beta1.ModuleCdc.Amino.RegisterConcrete(&CommunityPoolLendWithdrawProposal{}, "kava/CommunityPoolLendWithdrawProposal", nil) } // NewCommunityPoolLendDepositProposal creates a new community pool deposit proposal. @@ -65,7 +65,7 @@ func (p *CommunityPoolLendDepositProposal) String() string { // ValidateBasic stateless validation of a community pool lend deposit proposal. func (p *CommunityPoolLendDepositProposal) ValidateBasic() error { - if err := govtypes.ValidateAbstract(p); err != nil { + if err := govv1beta1.ValidateAbstract(p); err != nil { return err } // ensure the proposal has valid amount @@ -111,7 +111,7 @@ func (p *CommunityPoolLendWithdrawProposal) String() string { // ValidateBasic stateless validation of a community pool withdraw proposal. func (p *CommunityPoolLendWithdrawProposal) ValidateBasic() error { - if err := govtypes.ValidateAbstract(p); err != nil { + if err := govv1beta1.ValidateAbstract(p); err != nil { return err } // ensure the proposal has valid amount diff --git a/x/earn/client/cli/tx.go b/x/earn/client/cli/tx.go index 9d667303..2ab9e45d 100644 --- a/x/earn/client/cli/tx.go +++ b/x/earn/client/cli/tx.go @@ -11,7 +11,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/tx" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/kava-labs/kava/x/earn/types" ) @@ -155,7 +155,7 @@ Where proposal.json contains: from := clientCtx.GetFromAddress() content := types.NewCommunityPoolDepositProposal(proposal.Title, proposal.Description, proposal.Amount) - msg, err := govtypes.NewMsgSubmitProposal(content, proposal.Deposit, from) + msg, err := govv1beta1.NewMsgSubmitProposal(content, proposal.Deposit, from) if err != nil { return err } @@ -213,7 +213,7 @@ Where proposal.json contains: from := clientCtx.GetFromAddress() content := types.NewCommunityPoolWithdrawProposal(proposal.Title, proposal.Description, proposal.Amount) - msg, err := govtypes.NewMsgSubmitProposal(content, proposal.Deposit, from) + msg, err := govv1beta1.NewMsgSubmitProposal(content, proposal.Deposit, from) if err != nil { return err } diff --git a/x/earn/client/proposal_handler.go b/x/earn/client/proposal_handler.go index 9d76d960..22d75829 100644 --- a/x/earn/client/proposal_handler.go +++ b/x/earn/client/proposal_handler.go @@ -4,11 +4,10 @@ import ( govclient "github.com/cosmos/cosmos-sdk/x/gov/client" "github.com/kava-labs/kava/x/earn/client/cli" - "github.com/kava-labs/kava/x/earn/client/rest" ) // community-pool deposit/withdraw proposal handlers var ( - DepositProposalHandler = govclient.NewProposalHandler(cli.GetCmdSubmitCommunityPoolDepositProposal, rest.DepositProposalRESTHandler) - WithdrawProposalHandler = govclient.NewProposalHandler(cli.GetCmdSubmitCommunityPoolWithdrawProposal, rest.WithdrawProposalRESTHandler) + DepositProposalHandler = govclient.NewProposalHandler(cli.GetCmdSubmitCommunityPoolDepositProposal) + WithdrawProposalHandler = govclient.NewProposalHandler(cli.GetCmdSubmitCommunityPoolWithdrawProposal) ) diff --git a/x/earn/client/rest/rest.go b/x/earn/client/rest/rest.go deleted file mode 100644 index bff5052f..00000000 --- a/x/earn/client/rest/rest.go +++ /dev/null @@ -1,97 +0,0 @@ -package rest - -import ( - "net/http" - - "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" - govrest "github.com/cosmos/cosmos-sdk/x/gov/client/rest" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - - "github.com/kava-labs/kava/x/earn/types" -) - -type ( - // CommunityPoolDepositProposalReq defines a community pool deposit proposal request body. - CommunityPoolDepositProposalReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - - Title string `json:"title" yaml:"title"` - Description string `json:"description" yaml:"description"` - Amount sdk.Coin `json:"amount" yaml:"amount"` - Deposit sdk.Coins `json:"deposit" yaml:"deposit"` - Proposer sdk.AccAddress `json:"proposer" yaml:"proposer"` - } - // CommunityPoolWithdrawProposalReq defines a community pool deposit proposal request body. - CommunityPoolWithdrawProposalReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - - Title string `json:"title" yaml:"title"` - Description string `json:"description" yaml:"description"` - Amount sdk.Coin `json:"amount" yaml:"amount"` - Deposit sdk.Coins `json:"deposit" yaml:"deposit"` - Proposer sdk.AccAddress `json:"proposer" yaml:"proposer"` - } -) - -// DepositProposalRESTHandler returns a ProposalRESTHandler that exposes the community pool deposit REST handler with a given sub-route. -func DepositProposalRESTHandler(cliCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: types.ProposalTypeCommunityPoolDeposit, - Handler: postDepositProposalHandlerFn(cliCtx), - } -} - -func postDepositProposalHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req CommunityPoolDepositProposalReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - return - } - req.BaseReq = req.BaseReq.Sanitize() - if !req.BaseReq.ValidateBasic(w) { - return - } - content := types.NewCommunityPoolDepositProposal(req.Title, req.Description, req.Amount) - msg, err := govtypes.NewMsgSubmitProposal(content, req.Deposit, req.Proposer) - if rest.CheckBadRequestError(w, err) { - return - } - if rest.CheckBadRequestError(w, msg.ValidateBasic()) { - return - } - tx.WriteGeneratedTxResponse(cliCtx, w, req.BaseReq, msg) - } -} - -// WithdrawProposalRESTHandler returns a ProposalRESTHandler that exposes the community pool deposit REST handler with a given sub-route. -func WithdrawProposalRESTHandler(cliCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: types.ProposalTypeCommunityPoolWithdraw, - Handler: postWithdrawProposalHandlerFn(cliCtx), - } -} - -func postWithdrawProposalHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req CommunityPoolWithdrawProposalReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - return - } - req.BaseReq = req.BaseReq.Sanitize() - if !req.BaseReq.ValidateBasic(w) { - return - } - content := types.NewCommunityPoolWithdrawProposal(req.Title, req.Description, req.Amount) - msg, err := govtypes.NewMsgSubmitProposal(content, req.Deposit, req.Proposer) - if rest.CheckBadRequestError(w, err) { - return - } - if rest.CheckBadRequestError(w, msg.ValidateBasic()) { - return - } - tx.WriteGeneratedTxResponse(cliCtx, w, req.BaseReq, msg) - } -} diff --git a/x/earn/handler.go b/x/earn/handler.go index b6eac9a5..6018fb1d 100644 --- a/x/earn/handler.go +++ b/x/earn/handler.go @@ -3,15 +3,15 @@ package earn import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/kava-labs/kava/x/earn/keeper" "github.com/kava-labs/kava/x/earn/types" ) // NewCommunityPoolProposalHandler -func NewCommunityPoolProposalHandler(k keeper.Keeper) govtypes.Handler { - return func(ctx sdk.Context, content govtypes.Content) error { +func NewCommunityPoolProposalHandler(k keeper.Keeper) govv1beta1.Handler { + return func(ctx sdk.Context, content govv1beta1.Content) error { switch c := content.(type) { case *types.CommunityPoolDepositProposal: return keeper.HandleCommunityPoolDepositProposal(ctx, k, c) diff --git a/x/earn/keeper/deposit_test.go b/x/earn/keeper/deposit_test.go index 17a1fd16..806d1b17 100644 --- a/x/earn/keeper/deposit_test.go +++ b/x/earn/keeper/deposit_test.go @@ -52,7 +52,7 @@ func (suite *depositTestSuite) TestDeposit_Balances() { suite.VaultTotalValuesEqual(sdk.NewCoins(depositAmount)) suite.VaultTotalSharesEqual(types.NewVaultShares( - types.NewVaultShare(depositAmount.Denom, depositAmount.Amount.ToDec()), + types.NewVaultShare(depositAmount.Denom, sdk.NewDecFromInt(depositAmount.Amount)), )) } diff --git a/x/earn/keeper/grpc_query_test.go b/x/earn/keeper/grpc_query_test.go index 1de7b7be..46b75a4e 100644 --- a/x/earn/keeper/grpc_query_test.go +++ b/x/earn/keeper/grpc_query_test.go @@ -142,7 +142,7 @@ func (suite *grpcQueryTestSuite) TestVaults_WithSupply() { Strategies: []types.StrategyType{types.STRATEGY_TYPE_HARD}, IsPrivateVault: false, AllowedDepositors: nil, - TotalShares: depositAmount.Amount.ToDec().String(), + TotalShares: sdk.NewDecFromInt(depositAmount.Amount).String(), TotalValue: depositAmount.Amount, }, { @@ -150,7 +150,7 @@ func (suite *grpcQueryTestSuite) TestVaults_WithSupply() { Strategies: []types.StrategyType{types.STRATEGY_TYPE_SAVINGS}, IsPrivateVault: false, AllowedDepositors: nil, - TotalShares: deposit2Amount.Amount.ToDec().String(), + TotalShares: sdk.NewDecFromInt(deposit2Amount.Amount).String(), TotalValue: deposit2Amount.Amount, }, }, @@ -204,7 +204,7 @@ func (suite *grpcQueryTestSuite) TestVaults_MixedSupply() { Strategies: []types.StrategyType{types.STRATEGY_TYPE_SAVINGS}, IsPrivateVault: false, AllowedDepositors: nil, - TotalShares: depositAmount.Amount.ToDec().String(), + TotalShares: sdk.NewDecFromInt(depositAmount.Amount).String(), TotalValue: depositAmount.Amount, }, }, @@ -300,7 +300,7 @@ func (suite *grpcQueryTestSuite) TestDeposits() { Depositor: acc1.String(), // Only includes specified deposit shares Shares: types.NewVaultShares( - types.NewVaultShare(deposit1Amount.Denom, deposit1Amount.Amount.ToDec()), + types.NewVaultShare(deposit1Amount.Denom, sdk.NewDecFromInt(deposit1Amount.Amount)), ), // Only the specified vault denom value Value: sdk.NewCoins(deposit1Amount), @@ -325,7 +325,7 @@ func (suite *grpcQueryTestSuite) TestDeposits() { Depositor: acc2.String(), // Only includes specified deposit shares Shares: types.NewVaultShares( - types.NewVaultShare(deposit3Amount.Denom, deposit3Amount.Amount.ToDec()), + types.NewVaultShare(deposit3Amount.Denom, sdk.NewDecFromInt(deposit3Amount.Amount)), ), // Only the specified vault denom value Value: sdk.NewCoins(deposit3Amount), @@ -349,7 +349,7 @@ func (suite *grpcQueryTestSuite) TestDeposits() { Depositor: acc2.String(), // Only includes specified deposit shares Shares: types.NewVaultShares( - types.NewVaultShare(deposit3Amount.Denom, deposit3Amount.Amount.ToDec()), + types.NewVaultShare(deposit3Amount.Denom, sdk.NewDecFromInt(deposit3Amount.Amount)), ), // Only the specified vault denom value Value: sdk.NewCoins( @@ -382,8 +382,8 @@ func (suite *grpcQueryTestSuite) TestDeposits() { { Depositor: acc1.String(), Shares: types.NewVaultShares( - types.NewVaultShare(deposit1Amount.Denom, deposit1Amount.Amount.ToDec()), - types.NewVaultShare(deposit2Amount.Denom, deposit2Amount.Amount.ToDec()), + types.NewVaultShare(deposit1Amount.Denom, sdk.NewDecFromInt(deposit1Amount.Amount)), + types.NewVaultShare(deposit2Amount.Denom, sdk.NewDecFromInt(deposit2Amount.Amount)), ), Value: sdk.NewCoins(deposit1Amount, deposit2Amount), }, @@ -405,8 +405,8 @@ func (suite *grpcQueryTestSuite) TestDeposits() { Depositor: acc2.String(), Shares: types.VaultShares{ // Does not include non-bkava vaults - types.NewVaultShare(deposit4Amount.Denom, deposit4Amount.Amount.ToDec()), - types.NewVaultShare(deposit3Amount.Denom, deposit3Amount.Amount.ToDec()), + types.NewVaultShare(deposit4Amount.Denom, sdk.NewDecFromInt(deposit4Amount.Amount)), + types.NewVaultShare(deposit3Amount.Denom, sdk.NewDecFromInt(deposit3Amount.Amount)), }, Value: sdk.Coins{ // Does not include non-bkava vaults @@ -419,7 +419,7 @@ func (suite *grpcQueryTestSuite) TestDeposits() { for i := range res.Deposits[0].Shares { suite.Equal( res.Deposits[0].Shares[i].Amount, - res.Deposits[0].Value[i].Amount.ToDec(), + sdk.NewDecFromInt(res.Deposits[0].Value[i].Amount), "order of deposit value should match shares", ) } diff --git a/x/earn/keeper/hooks_test.go b/x/earn/keeper/hooks_test.go index 462f64d0..55d8b673 100644 --- a/x/earn/keeper/hooks_test.go +++ b/x/earn/keeper/hooks_test.go @@ -58,7 +58,7 @@ func (suite *hookTestSuite) TestHooks_DepositAndWithdraw() { suite.Ctx, acc1deposit1Amount.Denom, acc.GetAddress(), - acc1deposit1Amount.Amount.ToDec(), + sdk.NewDecFromInt(acc1deposit1Amount.Amount), ).Once() err := suite.Keeper.Deposit( suite.Ctx, @@ -75,7 +75,7 @@ func (suite *hookTestSuite) TestHooks_DepositAndWithdraw() { suite.Ctx, acc1deposit1Amount.Denom, acc.GetAddress(), - acc1deposit1Amount.Amount.ToDec(), + sdk.NewDecFromInt(acc1deposit1Amount.Amount), ).Once() err = suite.Keeper.Deposit( suite.Ctx, @@ -115,7 +115,7 @@ func (suite *hookTestSuite) TestHooks_DepositAndWithdraw() { suite.Ctx, acc1deposit2Amount.Denom, acc.GetAddress(), - acc1deposit2Amount.Amount.ToDec(), + sdk.NewDecFromInt(acc1deposit2Amount.Amount), ).Once() err = suite.Keeper.Deposit( suite.Ctx, @@ -131,7 +131,7 @@ func (suite *hookTestSuite) TestHooks_DepositAndWithdraw() { suite.Ctx, acc1deposit2Amount.Denom, acc.GetAddress(), - acc1deposit2Amount.Amount.ToDec(), + sdk.NewDecFromInt(acc1deposit2Amount.Amount), ).Once() err = suite.Keeper.Deposit( suite.Ctx, @@ -174,7 +174,7 @@ func (suite *hookTestSuite) TestHooks_DepositAndWithdraw() { suite.Ctx, acc2deposit1Amount.Denom, acc2.GetAddress(), - acc2deposit1Amount.Amount.ToDec(), + sdk.NewDecFromInt(acc2deposit1Amount.Amount), ).Once() err = suite.Keeper.Deposit( suite.Ctx, @@ -192,7 +192,7 @@ func (suite *hookTestSuite) TestHooks_DepositAndWithdraw() { suite.Ctx, acc2deposit1Amount.Denom, acc2.GetAddress(), - acc2deposit1Amount.Amount.ToDec(), + sdk.NewDecFromInt(acc2deposit1Amount.Amount), ).Once() err = suite.Keeper.Deposit( suite.Ctx, @@ -232,7 +232,7 @@ func (suite *hookTestSuite) TestHooks_DepositAndWithdraw() { suite.Ctx, acc2deposit2Amount.Denom, acc2.GetAddress(), - acc2deposit2Amount.Amount.ToDec(), + sdk.NewDecFromInt(acc2deposit2Amount.Amount), ).Once() err = suite.Keeper.Deposit( suite.Ctx, @@ -248,7 +248,7 @@ func (suite *hookTestSuite) TestHooks_DepositAndWithdraw() { suite.Ctx, acc2deposit2Amount.Denom, acc2.GetAddress(), - acc2deposit2Amount.Amount.ToDec(), + sdk.NewDecFromInt(acc2deposit2Amount.Amount), ).Once() err = suite.Keeper.Deposit( suite.Ctx, @@ -508,20 +508,20 @@ func (suite *hookTestSuite) TestHooks_HookOrdering() { acc := suite.CreateAccount(sdk.NewCoins(startBalance), 0) - earnHooks.On("AfterVaultDepositCreated", suite.Ctx, depositAmount.Denom, acc.GetAddress(), depositAmount.Amount.ToDec()). + earnHooks.On("AfterVaultDepositCreated", suite.Ctx, depositAmount.Denom, acc.GetAddress(), sdk.NewDecFromInt(depositAmount.Amount)). Run(func(args mock.Arguments) { shares, found := suite.Keeper.GetVaultAccountShares(suite.Ctx, acc.GetAddress()) suite.Require().True(found, "expected after hook to be called after shares are updated") - suite.Require().Equal(depositAmount.Amount.ToDec(), shares.AmountOf(depositAmount.Denom)) + suite.Require().Equal(sdk.NewDecFromInt(depositAmount.Amount), shares.AmountOf(depositAmount.Denom)) }) err := suite.Keeper.Deposit(suite.Ctx, acc.GetAddress(), depositAmount, types.STRATEGY_TYPE_HARD) suite.Require().NoError(err) - earnHooks.On("BeforeVaultDepositModified", suite.Ctx, depositAmount.Denom, acc.GetAddress(), depositAmount.Amount.ToDec()). + earnHooks.On("BeforeVaultDepositModified", suite.Ctx, depositAmount.Denom, acc.GetAddress(), sdk.NewDecFromInt(depositAmount.Amount)). Run(func(args mock.Arguments) { shares, found := suite.Keeper.GetVaultAccountShares(suite.Ctx, acc.GetAddress()) suite.Require().True(found, "expected after hook to be called after shares are updated") - suite.Require().Equal(depositAmount.Amount.ToDec(), shares.AmountOf(depositAmount.Denom)) + suite.Require().Equal(sdk.NewDecFromInt(depositAmount.Amount), shares.AmountOf(depositAmount.Denom)) }) err = suite.Keeper.Deposit(suite.Ctx, acc.GetAddress(), depositAmount, types.STRATEGY_TYPE_HARD) suite.Require().NoError(err) @@ -532,7 +532,7 @@ func (suite *hookTestSuite) TestHooks_HookOrdering() { Run(func(args mock.Arguments) { shares, found := suite.Keeper.GetVaultAccountShares(suite.Ctx, acc.GetAddress()) suite.Require().True(found, "expected after hook to be called after shares are updated") - suite.Require().Equal(depositAmount.Amount.MulRaw(2).ToDec(), shares.AmountOf(depositAmount.Denom)) + suite.Require().Equal(sdk.NewDecFromInt(depositAmount.Amount.MulRaw(2)), shares.AmountOf(depositAmount.Denom)) }) _, err = suite.Keeper.Withdraw(suite.Ctx, acc.GetAddress(), depositAmount, types.STRATEGY_TYPE_HARD) suite.Require().NoError(err) diff --git a/x/earn/keeper/keeper.go b/x/earn/keeper/keeper.go index b9ffa3f0..c7a691d7 100644 --- a/x/earn/keeper/keeper.go +++ b/x/earn/keeper/keeper.go @@ -2,7 +2,7 @@ package keeper import ( "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" + storetypes "github.com/cosmos/cosmos-sdk/store/types" "github.com/kava-labs/kava/x/earn/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" @@ -10,7 +10,7 @@ import ( // Keeper keeper for the earn module type Keeper struct { - key sdk.StoreKey + key storetypes.StoreKey cdc codec.Codec paramSubspace paramtypes.Subspace hooks types.EarnHooks @@ -29,7 +29,7 @@ type Keeper struct { // NewKeeper creates a new keeper func NewKeeper( cdc codec.Codec, - key sdk.StoreKey, + key storetypes.StoreKey, paramstore paramtypes.Subspace, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, diff --git a/x/earn/keeper/msg_server_test.go b/x/earn/keeper/msg_server_test.go index 31a3e8cd..aa20ff44 100644 --- a/x/earn/keeper/msg_server_test.go +++ b/x/earn/keeper/msg_server_test.go @@ -69,7 +69,7 @@ func (suite *msgServerTestSuite) TestDeposit() { sdk.NewAttribute(types.AttributeKeyVaultDenom, depositAmount.Denom), sdk.NewAttribute(types.AttributeKeyDepositor, acc.GetAddress().String()), // Shares 1:1 to amount - sdk.NewAttribute(types.AttributeKeyShares, depositAmount.Amount.ToDec().String()), + sdk.NewAttribute(types.AttributeKeyShares, sdk.NewDecFromInt(depositAmount.Amount).String()), sdk.NewAttribute(sdk.AttributeKeyAmount, depositAmount.Amount.String()), ), ) @@ -122,7 +122,7 @@ func (suite *msgServerTestSuite) TestWithdraw() { types.EventTypeVaultWithdraw, sdk.NewAttribute(types.AttributeKeyVaultDenom, depositAmount.Denom), sdk.NewAttribute(types.AttributeKeyOwner, acc.GetAddress().String()), - sdk.NewAttribute(types.AttributeKeyShares, depositAmount.Amount.ToDec().String()), + sdk.NewAttribute(types.AttributeKeyShares, sdk.NewDecFromInt(depositAmount.Amount).String()), sdk.NewAttribute(sdk.AttributeKeyAmount, depositAmount.Amount.String()), ), ) diff --git a/x/earn/keeper/proposal_handler_test.go b/x/earn/keeper/proposal_handler_test.go index 23856736..fdac7162 100644 --- a/x/earn/keeper/proposal_handler_test.go +++ b/x/earn/keeper/proposal_handler_test.go @@ -40,10 +40,10 @@ func (suite *proposalTestSuite) TestCommunityDepositProposal() { suite.Require().NoError(err) balance := suite.BankKeeper.GetAllBalances(ctx, macc.GetAddress()) - suite.Require().Equal(fundAmount.Sub(sdk.NewCoins(depositAmount)), balance) + suite.Require().Equal(fundAmount.Sub(depositAmount), balance) feePool = distKeeper.GetFeePool(ctx) communityPoolBalance, change := feePool.CommunityPool.TruncateDecimal() - suite.Require().Equal(fundAmount.Sub(sdk.NewCoins(depositAmount)), communityPoolBalance) + suite.Require().Equal(fundAmount.Sub(depositAmount), communityPoolBalance) suite.Require().True(change.Empty()) } @@ -65,7 +65,7 @@ func (suite *proposalTestSuite) TestCommunityWithdrawProposal() { suite.Require().NoError(err) balance := suite.BankKeeper.GetAllBalances(ctx, macc.GetAddress()) - suite.Require().Equal(fundAmount.Sub(sdk.NewCoins(depositAmount)), balance) + suite.Require().Equal(fundAmount.Sub(depositAmount), balance) withdraw := types.NewCommunityPoolWithdrawProposal("test title", "desc", depositAmount) diff --git a/x/earn/keeper/strategy_hard_test.go b/x/earn/keeper/strategy_hard_test.go index 871a9394..e760f594 100644 --- a/x/earn/keeper/strategy_hard_test.go +++ b/x/earn/keeper/strategy_hard_test.go @@ -46,7 +46,7 @@ func (suite *strategyHardTestSuite) TestDeposit_SingleAcc() { suite.HardDepositAmountEqual(sdk.NewCoins(depositAmount)) suite.VaultTotalValuesEqual(sdk.NewCoins(depositAmount)) suite.VaultTotalSharesEqual(types.NewVaultShares( - types.NewVaultShare(depositAmount.Denom, depositAmount.Amount.ToDec()), + types.NewVaultShare(depositAmount.Denom, sdk.NewDecFromInt(depositAmount.Amount)), )) // Query vault total @@ -76,7 +76,7 @@ func (suite *strategyHardTestSuite) TestDeposit_SingleAcc_MultipleDeposits() { suite.HardDepositAmountEqual(sdk.NewCoins(expectedVaultBalance)) suite.VaultTotalValuesEqual(sdk.NewCoins(expectedVaultBalance)) suite.VaultTotalSharesEqual(types.NewVaultShares( - types.NewVaultShare(expectedVaultBalance.Denom, expectedVaultBalance.Amount.ToDec()), + types.NewVaultShare(expectedVaultBalance.Denom, sdk.NewDecFromInt(expectedVaultBalance.Amount)), )) // Query vault total @@ -112,7 +112,7 @@ func (suite *strategyHardTestSuite) TestDeposit_MultipleAcc_MultipleDeposits() { suite.HardDepositAmountEqual(sdk.NewCoins(expectedTotalValue)) suite.VaultTotalValuesEqual(sdk.NewCoins(expectedTotalValue)) suite.VaultTotalSharesEqual(types.NewVaultShares( - types.NewVaultShare(expectedTotalValue.Denom, expectedTotalValue.Amount.ToDec()), + types.NewVaultShare(expectedTotalValue.Denom, sdk.NewDecFromInt(expectedTotalValue.Amount)), )) // Query vault total diff --git a/x/earn/keeper/strategy_savings_test.go b/x/earn/keeper/strategy_savings_test.go index 19c13e55..e8087f48 100644 --- a/x/earn/keeper/strategy_savings_test.go +++ b/x/earn/keeper/strategy_savings_test.go @@ -47,7 +47,7 @@ func (suite *strategySavingsTestSuite) TestDeposit_SingleAcc() { suite.SavingsDepositAmountEqual(sdk.NewCoins(depositAmount)) suite.VaultTotalValuesEqual(sdk.NewCoins(depositAmount)) suite.VaultTotalSharesEqual(types.NewVaultShares( - types.NewVaultShare(depositAmount.Denom, depositAmount.Amount.ToDec()), + types.NewVaultShare(depositAmount.Denom, sdk.NewDecFromInt(depositAmount.Amount)), )) // Query vault total @@ -76,7 +76,7 @@ func (suite *strategySavingsTestSuite) TestDeposit_SingleAcc_MultipleDeposits() suite.SavingsDepositAmountEqual(sdk.NewCoins(expectedVaultBalance)) suite.VaultTotalValuesEqual(sdk.NewCoins(expectedVaultBalance)) suite.VaultTotalSharesEqual(types.NewVaultShares( - types.NewVaultShare(expectedVaultBalance.Denom, expectedVaultBalance.Amount.ToDec()), + types.NewVaultShare(expectedVaultBalance.Denom, sdk.NewDecFromInt(expectedVaultBalance.Amount)), )) // Query vault total @@ -111,7 +111,7 @@ func (suite *strategySavingsTestSuite) TestDeposit_MultipleAcc_MultipleDeposits( suite.SavingsDepositAmountEqual(sdk.NewCoins(expectedTotalValue)) suite.VaultTotalValuesEqual(sdk.NewCoins(expectedTotalValue)) suite.VaultTotalSharesEqual(types.NewVaultShares( - types.NewVaultShare(expectedTotalValue.Denom, expectedTotalValue.Amount.ToDec()), + types.NewVaultShare(expectedTotalValue.Denom, sdk.NewDecFromInt(expectedTotalValue.Amount)), )) // Query vault total diff --git a/x/earn/keeper/vault_share.go b/x/earn/keeper/vault_share.go index c8490c35..36f3c608 100644 --- a/x/earn/keeper/vault_share.go +++ b/x/earn/keeper/vault_share.go @@ -12,7 +12,7 @@ func (k *Keeper) ConvertToShares(ctx sdk.Context, assets sdk.Coin) (types.VaultS totalShares, found := k.GetVaultTotalShares(ctx, assets.Denom) if !found { // No shares issued yet, so shares are issued 1:1 - return types.NewVaultShare(assets.Denom, assets.Amount.ToDec()), nil + return types.NewVaultShare(assets.Denom, sdk.NewDecFromInt(assets.Amount)), nil } totalValue, err := k.GetVaultTotalValue(ctx, assets.Denom) @@ -40,7 +40,7 @@ func (k *Keeper) ConvertToShares(ctx sdk.Context, assets sdk.Coin) (types.VaultS // 100 * 100 / 105 == 10000 / 105 == 95.238095238095238095 // 100 * (100 / 105) == 100 * 0.952380952380952380 == 95.238095238095238000 // rounded down and truncated ^ loss of precision ^ - issuedShares := assets.Amount.ToDec().Mul(totalShares.Amount).QuoTruncate(totalValue.Amount.ToDec()) + issuedShares := sdk.NewDecFromInt(assets.Amount).Mul(totalShares.Amount).QuoTruncate(sdk.NewDecFromInt(totalValue.Amount)) if issuedShares.IsZero() { return types.VaultShare{}, fmt.Errorf("share count is zero") @@ -65,7 +65,7 @@ func (k *Keeper) ConvertToAssets(ctx sdk.Context, share types.VaultShare) (sdk.C // accValue := totalValue * percentOwnership // accValue := totalValue * accShares / totalVaultShares // Division must be last to avoid rounding errors and properly truncate. - value := totalValue.Amount.ToDec().Mul(share.Amount).QuoTruncate(totalVaultShares.Amount) + value := sdk.NewDecFromInt(totalValue.Amount).Mul(share.Amount).QuoTruncate(totalVaultShares.Amount) return sdk.NewCoin(share.Denom, value.TruncateInt()), nil } diff --git a/x/earn/keeper/vault_test.go b/x/earn/keeper/vault_test.go index 308513f8..5a4bb480 100644 --- a/x/earn/keeper/vault_test.go +++ b/x/earn/keeper/vault_test.go @@ -38,7 +38,7 @@ func (suite *vaultTestSuite) TestGetVaultTotalShares() { vaultTotalShares, found := suite.Keeper.GetVaultTotalShares(suite.Ctx, vaultDenom) suite.Require().True(found) - suite.Equal(depositAmount.Amount.ToDec(), vaultTotalShares.Amount) + suite.Equal(sdk.NewDecFromInt(depositAmount.Amount), vaultTotalShares.Amount) } func (suite *vaultTestSuite) TestGetVaultTotalShares_NotFound() { @@ -109,8 +109,8 @@ func (suite *vaultTestSuite) TestGetVaultAccountSupplied() { suite.Require().True(found) // Account supply only includes the deposit from respective accounts - suite.Equal(deposit1Amount.Amount.ToDec(), vaultAcc1Supplied.Shares.AmountOf(vaultDenom)) - suite.Equal(deposit1Amount.Amount.ToDec(), vaultAcc2Supplied.Shares.AmountOf(vaultDenom)) + suite.Equal(sdk.NewDecFromInt(deposit1Amount.Amount), vaultAcc1Supplied.Shares.AmountOf(vaultDenom)) + suite.Equal(sdk.NewDecFromInt(deposit1Amount.Amount), vaultAcc2Supplied.Shares.AmountOf(vaultDenom)) } func (suite *vaultTestSuite) TestGetVaultAccountValue() { diff --git a/x/earn/keeper/withdraw_test.go b/x/earn/keeper/withdraw_test.go index 0bb14a91..88e9135d 100644 --- a/x/earn/keeper/withdraw_test.go +++ b/x/earn/keeper/withdraw_test.go @@ -77,7 +77,7 @@ func (suite *withdrawTestSuite) TestWithdraw_NoVaultShareRecord() { suite.VaultTotalValuesEqual(sdk.NewCoins(acc1DepositAmount)) suite.VaultTotalSharesEqual(types.NewVaultShares( - types.NewVaultShare(acc1DepositAmount.Denom, acc1DepositAmount.Amount.ToDec()), + types.NewVaultShare(acc1DepositAmount.Denom, sdk.NewDecFromInt(acc1DepositAmount.Amount)), )) } @@ -106,7 +106,7 @@ func (suite *withdrawTestSuite) TestWithdraw_ExceedBalance() { suite.VaultTotalValuesEqual(sdk.NewCoins(depositAmount)) suite.VaultTotalSharesEqual(types.NewVaultShares( - types.NewVaultShare(depositAmount.Denom, depositAmount.Amount.ToDec()), + types.NewVaultShare(depositAmount.Denom, sdk.NewDecFromInt(depositAmount.Amount)), )) } diff --git a/x/earn/module.go b/x/earn/module.go index 32297c69..c6dd2855 100644 --- a/x/earn/module.go +++ b/x/earn/module.go @@ -4,7 +4,6 @@ import ( "context" "encoding/json" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" @@ -62,11 +61,6 @@ func (a AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry types.RegisterInterfaces(registry) } -// RegisterRESTRoutes registers REST routes for the module. -func (a AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) { - // intentionally left blank -} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the gov module. func (a AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { diff --git a/x/earn/testutil/suite.go b/x/earn/testutil/suite.go index 8e7f0970..278443e6 100644 --- a/x/earn/testutil/suite.go +++ b/x/earn/testutil/suite.go @@ -17,11 +17,11 @@ import ( savingskeeper "github.com/kava-labs/kava/x/savings/keeper" savingstypes "github.com/kava-labs/kava/x/savings/types" - "github.com/cosmos/cosmos-sdk/simapp" sdk "github.com/cosmos/cosmos-sdk/types" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" + banktestutil "github.com/cosmos/cosmos-sdk/x/bank/testutil" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -205,7 +205,7 @@ func (suite *Suite) GetEvents() sdk.Events { // AddCoinsToModule adds coins to the earn module account func (suite *Suite) AddCoinsToModule(amount sdk.Coins) { // Does not use suite.BankKeeper.MintCoins as module account would not have permission to mint - err := simapp.FundModuleAccount(suite.BankKeeper, suite.Ctx, types.ModuleName, amount) + err := banktestutil.FundModuleAccount(suite.BankKeeper, suite.Ctx, types.ModuleName, amount) suite.Require().NoError(err) } @@ -227,7 +227,7 @@ func (suite *Suite) CreateAccount(initialBalance sdk.Coins, index int) authtypes acc := ak.NewAccountWithAddress(suite.Ctx, addrs[index]) ak.SetAccount(suite.Ctx, acc) - err := simapp.FundAccount(suite.BankKeeper, suite.Ctx, acc.GetAddress(), initialBalance) + err := banktestutil.FundAccount(suite.BankKeeper, suite.Ctx, acc.GetAddress(), initialBalance) suite.Require().NoError(err) return acc @@ -240,7 +240,7 @@ func (suite *Suite) NewAccountFromAddr(addr sdk.AccAddress, balance sdk.Coins) a acc := ak.NewAccountWithAddress(suite.Ctx, addr) ak.SetAccount(suite.Ctx, acc) - err := simapp.FundAccount(suite.BankKeeper, suite.Ctx, acc.GetAddress(), balance) + err := banktestutil.FundAccount(suite.BankKeeper, suite.Ctx, acc.GetAddress(), balance) suite.Require().NoError(err) return acc diff --git a/x/earn/types/codec.go b/x/earn/types/codec.go index c4bcabcc..6cb3639f 100644 --- a/x/earn/types/codec.go +++ b/x/earn/types/codec.go @@ -7,7 +7,7 @@ import ( cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdk "github.com/cosmos/cosmos-sdk/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) // RegisterLegacyAminoCodec registers all the necessary types and interfaces for the @@ -26,7 +26,7 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { &MsgDeposit{}, &MsgWithdraw{}, ) - registry.RegisterImplementations((*govtypes.Content)(nil), + registry.RegisterImplementations((*govv1beta1.Content)(nil), &CommunityPoolDepositProposal{}, &CommunityPoolWithdrawProposal{}, ) diff --git a/x/earn/types/msg.go b/x/earn/types/msg.go index 26b3606c..0573ccb0 100644 --- a/x/earn/types/msg.go +++ b/x/earn/types/msg.go @@ -3,7 +3,7 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/x/auth/legacy/legacytx" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" ) var ( diff --git a/x/earn/types/proposal.go b/x/earn/types/proposal.go index 95800245..91dfaa37 100644 --- a/x/earn/types/proposal.go +++ b/x/earn/types/proposal.go @@ -5,7 +5,7 @@ import ( "strings" sdk "github.com/cosmos/cosmos-sdk/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) const ( @@ -17,15 +17,15 @@ const ( // Assert CommunityPoolDepositProposal implements govtypes.Content at compile-time var ( - _ govtypes.Content = &CommunityPoolDepositProposal{} - _ govtypes.Content = &CommunityPoolWithdrawProposal{} + _ govv1beta1.Content = &CommunityPoolDepositProposal{} + _ govv1beta1.Content = &CommunityPoolWithdrawProposal{} ) func init() { - govtypes.RegisterProposalType(ProposalTypeCommunityPoolDeposit) - govtypes.RegisterProposalTypeCodec(&CommunityPoolDepositProposal{}, "kava/CommunityPoolDepositProposal") - govtypes.RegisterProposalType(ProposalTypeCommunityPoolWithdraw) - govtypes.RegisterProposalTypeCodec(&CommunityPoolWithdrawProposal{}, "kava/CommunityPoolWithdrawProposal") + govv1beta1.RegisterProposalType(ProposalTypeCommunityPoolDeposit) + govv1beta1.ModuleCdc.Amino.RegisterConcrete(&CommunityPoolDepositProposal{}, "kava/CommunityPoolDepositProposal", nil) + govv1beta1.RegisterProposalType(ProposalTypeCommunityPoolWithdraw) + govv1beta1.ModuleCdc.Amino.RegisterConcrete(&CommunityPoolWithdrawProposal{}, "kava/CommunityPoolWithdrawProposal", nil) } // NewCommunityPoolDepositProposal creates a new community pool deposit proposal. @@ -65,7 +65,7 @@ func (cdp *CommunityPoolDepositProposal) String() string { // ValidateBasic stateless validation of a community pool multi-spend proposal. func (cdp *CommunityPoolDepositProposal) ValidateBasic() error { - err := govtypes.ValidateAbstract(cdp) + err := govv1beta1.ValidateAbstract(cdp) if err != nil { return err } @@ -109,7 +109,7 @@ func (cdp *CommunityPoolWithdrawProposal) String() string { // ValidateBasic stateless validation of a community pool multi-spend proposal. func (cdp *CommunityPoolWithdrawProposal) ValidateBasic() error { - err := govtypes.ValidateAbstract(cdp) + err := govv1beta1.ValidateAbstract(cdp) if err != nil { return err } diff --git a/x/evmutil/client/cli/evm.go b/x/evmutil/client/cli/evm.go index 5bd2abdf..f126249e 100644 --- a/x/evmutil/client/cli/evm.go +++ b/x/evmutil/client/cli/evm.go @@ -13,11 +13,11 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/tharsis/ethermint/crypto/hd" - "github.com/tharsis/ethermint/server/config" - etherminttypes "github.com/tharsis/ethermint/types" - evmtypes "github.com/tharsis/ethermint/x/evm/types" - feemarkettypes "github.com/tharsis/ethermint/x/feemarket/types" + "github.com/evmos/ethermint/crypto/hd" + "github.com/evmos/ethermint/server/config" + etherminttypes "github.com/evmos/ethermint/types" + evmtypes "github.com/evmos/ethermint/x/evm/types" + feemarkettypes "github.com/evmos/ethermint/x/feemarket/types" ) // CanSignEthTx returns an error if the signing key algorithm is not eth_secp256k1. @@ -27,8 +27,17 @@ func CanSignEthTx(ctx client.Context) error { return err } - if keyInfo.GetAlgo() != hd.EthSecp256k1Type { - return fmt.Errorf("from address does not support %v", hd.EthSecp256k1Type) + pubKey, err := keyInfo.GetPubKey() + if err != nil { + return err + } + + if pubKey.Type() != string(hd.EthSecp256k1Type) { + return fmt.Errorf( + "invalid from address pubkey type, expected %s but got %s", + hd.EthSecp256k1Type, + pubKey.Type(), + ) } return nil diff --git a/x/evmutil/keeper/bank_keeper.go b/x/evmutil/keeper/bank_keeper.go index 35c6b7d5..44071114 100644 --- a/x/evmutil/keeper/bank_keeper.go +++ b/x/evmutil/keeper/bank_keeper.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - evmtypes "github.com/tharsis/ethermint/x/evm/types" + evmtypes "github.com/evmos/ethermint/x/evm/types" "github.com/kava-labs/kava/x/evmutil/types" ) @@ -56,6 +56,14 @@ func (k EvmBankKeeper) GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom st return sdk.NewCoin(EvmDenom, total) } +// SendCoins transfers akava coins from a AccAddress to an AccAddress. +func (k EvmBankKeeper) SendCoins(ctx sdk.Context, senderAddr sdk.AccAddress, recipientAddr sdk.AccAddress, amt sdk.Coins) error { + // SendCoins method is not used by the evm module, but is required by the + // evmtypes.BankKeeper interface. This must be updated if the evm module + // is updated to use SendCoins. + panic("not implemented") +} + // SendCoinsFromModuleToAccount transfers akava coins from a ModuleAccount to an AccAddress. // It will panic if the module account does not exist. An error is returned if the recipient // address is black-listed or if sending the tokens fails. diff --git a/x/evmutil/keeper/bank_keeper_test.go b/x/evmutil/keeper/bank_keeper_test.go index 16b87464..94618252 100644 --- a/x/evmutil/keeper/bank_keeper_test.go +++ b/x/evmutil/keeper/bank_keeper_test.go @@ -10,7 +10,7 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" vesting "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" - evmtypes "github.com/tharsis/ethermint/x/evm/types" + evmtypes "github.com/evmos/ethermint/x/evm/types" "github.com/kava-labs/kava/x/evmutil/keeper" "github.com/kava-labs/kava/x/evmutil/testutil" diff --git a/x/evmutil/keeper/erc20.go b/x/evmutil/keeper/erc20.go index c51b5538..4a60e6e3 100644 --- a/x/evmutil/keeper/erc20.go +++ b/x/evmutil/keeper/erc20.go @@ -8,7 +8,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" - evmtypes "github.com/tharsis/ethermint/x/evm/types" + evmtypes "github.com/evmos/ethermint/x/evm/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/x/evmutil/keeper/evm.go b/x/evmutil/keeper/evm.go index 018cdfc2..56d67b21 100644 --- a/x/evmutil/keeper/evm.go +++ b/x/evmutil/keeper/evm.go @@ -25,8 +25,8 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" - "github.com/tharsis/ethermint/server/config" - evmtypes "github.com/tharsis/ethermint/x/evm/types" + "github.com/evmos/ethermint/server/config" + evmtypes "github.com/evmos/ethermint/x/evm/types" "github.com/kava-labs/kava/x/evmutil/types" ) @@ -72,7 +72,7 @@ func (k Keeper) CallEVMWithData( // To param needs to be nil to correctly apply txs to create contracts // Default common.Address value is 0x0000000000000000000000000000000000000000, not nil // which Ethermint handles differently -- erc20_test will fail - // https://github.com/tharsis/ethermint/blob/caa1c5a6c6b7ed8ba4aaf6e0b0848f6be5ba6668/x/evm/keeper/state_transition.go#L357 + // https://github.com/evmos/ethermint/blob/caa1c5a6c6b7ed8ba4aaf6e0b0848f6be5ba6668/x/evm/keeper/state_transition.go#L357 var to *common.Address if contract != nil { to = &contract.Address diff --git a/x/evmutil/keeper/evm_test.go b/x/evmutil/keeper/evm_test.go index 3b0930f9..c4fba03d 100644 --- a/x/evmutil/keeper/evm_test.go +++ b/x/evmutil/keeper/evm_test.go @@ -12,10 +12,10 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" - "github.com/tharsis/ethermint/tests" - etherminttypes "github.com/tharsis/ethermint/types" - "github.com/tharsis/ethermint/x/evm/statedb" - "github.com/tharsis/ethermint/x/evm/types" + "github.com/evmos/ethermint/tests" + etherminttypes "github.com/evmos/ethermint/types" + "github.com/evmos/ethermint/x/evm/statedb" + "github.com/evmos/ethermint/x/evm/types" "github.com/kava-labs/kava/x/evmutil/testutil" ) diff --git a/x/evmutil/keeper/keeper.go b/x/evmutil/keeper/keeper.go index c1d67598..d137cefa 100644 --- a/x/evmutil/keeper/keeper.go +++ b/x/evmutil/keeper/keeper.go @@ -4,6 +4,7 @@ import ( "fmt" "github.com/cosmos/cosmos-sdk/codec" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" @@ -15,7 +16,7 @@ import ( // This keeper stores additional data related to evm accounts. type Keeper struct { cdc codec.Codec - storeKey sdk.StoreKey + storeKey storetypes.StoreKey paramSubspace paramtypes.Subspace bankKeeper types.BankKeeper evmKeeper types.EvmKeeper @@ -25,7 +26,7 @@ type Keeper struct { // NewKeeper creates an evmutil keeper. func NewKeeper( cdc codec.Codec, - storeKey sdk.StoreKey, + storeKey storetypes.StoreKey, params paramtypes.Subspace, bk types.BankKeeper, ak types.AccountKeeper, diff --git a/x/evmutil/keeper/msg_server_test.go b/x/evmutil/keeper/msg_server_test.go index 4cc3737a..851e50c7 100644 --- a/x/evmutil/keeper/msg_server_test.go +++ b/x/evmutil/keeper/msg_server_test.go @@ -145,7 +145,7 @@ func (suite *MsgServerSuite) TestConvertERC20ToCoin() { ) suite.Require().NoError(err) - invokerCosmosAddr, err := sdk.AccAddressFromHex(invoker.String()[2:]) + invokerCosmosAddr, err := sdk.AccAddressFromHexUnsafe(invoker.String()[2:]) suite.Require().NoError(err) // create user account, otherwise `CallEVMWithData` will fail due to failing to get user account when finding its sequence. diff --git a/x/evmutil/module.go b/x/evmutil/module.go index 82441a0f..a9ceaac6 100644 --- a/x/evmutil/module.go +++ b/x/evmutil/module.go @@ -4,7 +4,6 @@ import ( "context" "encoding/json" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" @@ -69,9 +68,6 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod return gs.Validate() } -// RegisterRESTRoutes registers evmutil module's REST service handlers. -func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) {} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for evmutil module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { diff --git a/x/evmutil/testutil/suite.go b/x/evmutil/testutil/suite.go index 3c1857e4..a02dc950 100644 --- a/x/evmutil/testutil/suite.go +++ b/x/evmutil/testutil/suite.go @@ -21,6 +21,12 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" + "github.com/evmos/ethermint/crypto/ethsecp256k1" + "github.com/evmos/ethermint/server/config" + etherminttests "github.com/evmos/ethermint/tests" + etherminttypes "github.com/evmos/ethermint/types" + evmtypes "github.com/evmos/ethermint/x/evm/types" + feemarkettypes "github.com/evmos/ethermint/x/feemarket/types" "github.com/stretchr/testify/suite" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto/tmhash" @@ -28,12 +34,6 @@ import ( tmversion "github.com/tendermint/tendermint/proto/tendermint/version" tmtime "github.com/tendermint/tendermint/types/time" "github.com/tendermint/tendermint/version" - "github.com/tharsis/ethermint/crypto/ethsecp256k1" - "github.com/tharsis/ethermint/server/config" - etherminttests "github.com/tharsis/ethermint/tests" - etherminttypes "github.com/tharsis/ethermint/types" - evmtypes "github.com/tharsis/ethermint/x/evm/types" - feemarkettypes "github.com/tharsis/ethermint/x/feemarket/types" "github.com/kava-labs/kava/app" "github.com/kava-labs/kava/x/evmutil/keeper" @@ -132,7 +132,7 @@ func (suite *Suite) SetupTest() { }) // We need to set the validator as calling the EVM looks up the validator address - // https://github.com/tharsis/ethermint/blob/f21592ebfe74da7590eb42ed926dae970b2a9a3f/x/evm/keeper/state_transition.go#L487 + // https://github.com/evmos/ethermint/blob/f21592ebfe74da7590eb42ed926dae970b2a9a3f/x/evm/keeper/state_transition.go#L487 // evmkeeper.EVMConfig() will return error "failed to load evm config" if not set acc := ðerminttypes.EthAccount{ BaseAccount: authtypes.NewBaseAccount(sdk.AccAddress(suite.Address.Bytes()), nil, 0, 0), diff --git a/x/evmutil/types/contract.go b/x/evmutil/types/contract.go index 6eb815c8..bf8dc229 100644 --- a/x/evmutil/types/contract.go +++ b/x/evmutil/types/contract.go @@ -20,7 +20,7 @@ import ( "encoding/json" "github.com/ethereum/go-ethereum/common" - evmtypes "github.com/tharsis/ethermint/x/evm/types" + evmtypes "github.com/evmos/ethermint/x/evm/types" ) var ( diff --git a/x/evmutil/types/expected_keepers.go b/x/evmutil/types/expected_keepers.go index 2de33125..22017528 100644 --- a/x/evmutil/types/expected_keepers.go +++ b/x/evmutil/types/expected_keepers.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/vm" - evmtypes "github.com/tharsis/ethermint/x/evm/types" + evmtypes "github.com/evmos/ethermint/x/evm/types" ) // AccountKeeper defines the expected account keeper interface diff --git a/x/evmutil/types/msg.go b/x/evmutil/types/msg.go index 0fd123f9..e7d64cc5 100644 --- a/x/evmutil/types/msg.go +++ b/x/evmutil/types/msg.go @@ -3,7 +3,7 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/x/auth/legacy/legacytx" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" "github.com/ethereum/go-ethereum/common" ) diff --git a/x/hard/client/rest/query.go b/x/hard/client/rest/query.go deleted file mode 100644 index 56b5a897..00000000 --- a/x/hard/client/rest/query.go +++ /dev/null @@ -1,469 +0,0 @@ -package rest - -import ( - "fmt" - "net/http" - "strings" - - "github.com/gorilla/mux" - - "github.com/cosmos/cosmos-sdk/client" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/rest" - - "github.com/kava-labs/kava/x/hard/types" -) - -func registerQueryRoutes(cliCtx client.Context, r *mux.Router) { - r.HandleFunc(fmt.Sprintf("/%s/parameters", types.ModuleName), queryParamsHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/unsynced-deposits", types.ModuleName), queryUnsyncedDepositsHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/deposits", types.ModuleName), queryDepositsHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/total-deposited", types.ModuleName), queryTotalDepositedHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/accounts", types.ModuleName), queryModAccountsHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/unsynced-borrows", types.ModuleName), queryUnsyncedBorrowsHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/borrows", types.ModuleName), queryBorrowsHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/total-borrowed", types.ModuleName), queryTotalBorrowedHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/interest-rate", types.ModuleName), queryInterestRateHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/reserves", types.ModuleName), queryReservesHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/interest-factors", types.ModuleName), queryInterestFactorsHandlerFn(cliCtx)).Methods("GET") -} - -func queryParamsHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - route := fmt.Sprintf("custom/%s/%s", types.QuerierRoute, types.QueryGetParams) - - res, height, err := cliCtx.QueryWithData(route, nil) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func queryDepositsHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - _, page, limit, err := rest.ParseHTTPArgsWithLimit(r, 0) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - // Parse the query height - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - var denom string - var owner sdk.AccAddress - - if x := r.URL.Query().Get(RestDenom); len(x) != 0 { - denom = strings.TrimSpace(x) - } - - if x := r.URL.Query().Get(RestOwner); len(x) != 0 { - ownerStr := strings.ToLower(strings.TrimSpace(x)) - owner, err = sdk.AccAddressFromBech32(ownerStr) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("cannot parse address from deposit owner %s", ownerStr)) - return - } - } - - params := types.NewQueryDepositsParams(page, limit, denom, owner) - - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - route := fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryGetDeposits) - res, height, err := cliCtx.QueryWithData(route, bz) - cliCtx = cliCtx.WithHeight(height) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func queryUnsyncedDepositsHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - _, page, limit, err := rest.ParseHTTPArgsWithLimit(r, 0) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - // Parse the query height - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - var denom string - var owner sdk.AccAddress - - if x := r.URL.Query().Get(RestDenom); len(x) != 0 { - denom = strings.TrimSpace(x) - } - - if x := r.URL.Query().Get(RestOwner); len(x) != 0 { - ownerStr := strings.ToLower(strings.TrimSpace(x)) - owner, err = sdk.AccAddressFromBech32(ownerStr) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("cannot parse address from deposit owner %s", ownerStr)) - return - } - } - - params := types.NewQueryUnsyncedDepositsParams(page, limit, denom, owner) - - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - route := fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryGetUnsyncedDeposits) - res, height, err := cliCtx.QueryWithData(route, bz) - cliCtx = cliCtx.WithHeight(height) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func queryTotalDepositedHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - _, _, _, err := rest.ParseHTTPArgsWithLimit(r, 0) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - // Parse the query height - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - var denom string - - if x := r.URL.Query().Get(RestDenom); len(x) != 0 { - denom = strings.TrimSpace(x) - } - - params := types.NewQueryTotalDepositedParams(denom) - - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - route := fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryGetTotalDeposited) - res, height, err := cliCtx.QueryWithData(route, bz) - cliCtx = cliCtx.WithHeight(height) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func queryBorrowsHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - _, page, limit, err := rest.ParseHTTPArgsWithLimit(r, 0) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - // Parse the query height - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - var denom string - var owner sdk.AccAddress - - if x := r.URL.Query().Get(RestDenom); len(x) != 0 { - denom = strings.TrimSpace(x) - } - - if x := r.URL.Query().Get(RestOwner); len(x) != 0 { - ownerStr := strings.ToLower(strings.TrimSpace(x)) - owner, err = sdk.AccAddressFromBech32(ownerStr) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("cannot parse address from borrow owner %s", ownerStr)) - return - } - } - - params := types.NewQueryBorrowsParams(page, limit, owner, denom) - - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - route := fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryGetBorrows) - res, height, err := cliCtx.QueryWithData(route, bz) - cliCtx = cliCtx.WithHeight(height) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func queryUnsyncedBorrowsHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - _, page, limit, err := rest.ParseHTTPArgsWithLimit(r, 0) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - // Parse the query height - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - var denom string - var owner sdk.AccAddress - - if x := r.URL.Query().Get(RestDenom); len(x) != 0 { - denom = strings.TrimSpace(x) - } - - if x := r.URL.Query().Get(RestOwner); len(x) != 0 { - ownerStr := strings.ToLower(strings.TrimSpace(x)) - owner, err = sdk.AccAddressFromBech32(ownerStr) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("cannot parse address from borrow owner %s", ownerStr)) - return - } - } - - params := types.NewQueryUnsyncedBorrowsParams(page, limit, owner, denom) - - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - route := fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryGetUnsyncedBorrows) - res, height, err := cliCtx.QueryWithData(route, bz) - cliCtx = cliCtx.WithHeight(height) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func queryTotalBorrowedHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - _, _, _, err := rest.ParseHTTPArgsWithLimit(r, 0) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - // Parse the query height - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - var denom string - - if x := r.URL.Query().Get(RestDenom); len(x) != 0 { - denom = strings.TrimSpace(x) - } - - params := types.NewQueryTotalBorrowedParams(denom) - - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - route := fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryGetTotalBorrowed) - res, height, err := cliCtx.QueryWithData(route, bz) - cliCtx = cliCtx.WithHeight(height) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func queryInterestRateHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - _, _, _, err := rest.ParseHTTPArgsWithLimit(r, 0) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - // Parse the query height - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - var denom string - - if x := r.URL.Query().Get(RestDenom); len(x) != 0 { - denom = strings.TrimSpace(x) - } - - params := types.NewQueryInterestRateParams(denom) - - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - route := fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryGetInterestRate) - res, height, err := cliCtx.QueryWithData(route, bz) - cliCtx = cliCtx.WithHeight(height) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func queryModAccountsHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - _, page, limit, err := rest.ParseHTTPArgsWithLimit(r, 0) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - // Parse the query height - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - var name string - - if x := r.URL.Query().Get(RestName); len(x) != 0 { - name = strings.TrimSpace(x) - } - - params := types.NewQueryAccountParams(page, limit, name) - - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - route := fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryGetModuleAccounts) - res, height, err := cliCtx.QueryWithData(route, bz) - cliCtx = cliCtx.WithHeight(height) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func queryReservesHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - _, _, _, err := rest.ParseHTTPArgsWithLimit(r, 0) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - // Parse the query height - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - var denom string - - if x := r.URL.Query().Get(RestDenom); len(x) != 0 { - denom = strings.TrimSpace(x) - } - - params := types.NewQueryReservesParams(denom) - - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - route := fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryGetReserves) - res, height, err := cliCtx.QueryWithData(route, bz) - cliCtx = cliCtx.WithHeight(height) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func queryInterestFactorsHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - _, _, _, err := rest.ParseHTTPArgsWithLimit(r, 0) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - // Parse the query height - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - var denom string - - if x := r.URL.Query().Get(RestDenom); len(x) != 0 { - denom = strings.TrimSpace(x) - } - - params := types.NewQueryInterestFactorsParams(denom) - - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - route := fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryGetInterestFactors) - res, height, err := cliCtx.QueryWithData(route, bz) - cliCtx = cliCtx.WithHeight(height) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - rest.PostProcessResponse(w, cliCtx, res) - } -} diff --git a/x/hard/client/rest/rest.go b/x/hard/client/rest/rest.go deleted file mode 100644 index 42a0f8dd..00000000 --- a/x/hard/client/rest/rest.go +++ /dev/null @@ -1,59 +0,0 @@ -package rest - -import ( - "github.com/gorilla/mux" - - "github.com/cosmos/cosmos-sdk/client" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/rest" -) - -// REST variable names -// nolint -const ( - RestOwner = "owner" - RestDenom = "denom" - RestName = "name" -) - -// RegisterRoutes registers hard-related REST handlers to a router -func RegisterRoutes(cliCtx client.Context, r *mux.Router) { - registerQueryRoutes(cliCtx, r) - registerTxRoutes(cliCtx, r) -} - -// PostCreateDepositReq defines the properties of a deposit create request's body -type PostCreateDepositReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - From sdk.AccAddress `json:"from" yaml:"from"` - Amount sdk.Coins `json:"amount" yaml:"amount"` -} - -// PostCreateWithdrawReq defines the properties of a deposit withdraw request's body -type PostCreateWithdrawReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - From sdk.AccAddress `json:"from" yaml:"from"` - Amount sdk.Coins `json:"amount" yaml:"amount"` -} - -// PostBorrowReq defines the properties of a borrow request's body -type PostBorrowReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - From sdk.AccAddress `json:"from" yaml:"from"` - Amount sdk.Coins `json:"amount" yaml:"amount"` -} - -// PostRepayReq defines the properties of a repay request's body -type PostRepayReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - From sdk.AccAddress `json:"from" yaml:"from"` - Owner sdk.AccAddress `json:"owner" yaml:"owner"` - Amount sdk.Coins `json:"amount" yaml:"amount"` -} - -// PostLiquidateReq defines the properties of a liquidate request's body -type PostLiquidateReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - From sdk.AccAddress `json:"from" yaml:"from"` - Borrower sdk.AccAddress `json:"borrower" yaml:"borrower"` -} diff --git a/x/hard/client/rest/tx.go b/x/hard/client/rest/tx.go deleted file mode 100644 index 72bd7b01..00000000 --- a/x/hard/client/rest/tx.go +++ /dev/null @@ -1,132 +0,0 @@ -package rest - -import ( - "fmt" - "net/http" - - "github.com/gorilla/mux" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/tx" - "github.com/cosmos/cosmos-sdk/types/rest" - - "github.com/kava-labs/kava/x/hard/types" -) - -func registerTxRoutes(cliCtx client.Context, r *mux.Router) { - r.HandleFunc(fmt.Sprintf("/%s/deposit", types.ModuleName), postDepositHandlerFn(cliCtx)).Methods("POST") - r.HandleFunc(fmt.Sprintf("/%s/withdraw", types.ModuleName), postWithdrawHandlerFn(cliCtx)).Methods("POST") - r.HandleFunc(fmt.Sprintf("/%s/borrow", types.ModuleName), postBorrowHandlerFn(cliCtx)).Methods("POST") - r.HandleFunc(fmt.Sprintf("/%s/repay", types.ModuleName), postRepayHandlerFn(cliCtx)).Methods("POST") - r.HandleFunc(fmt.Sprintf("/%s/liquidate", types.ModuleName), postLiquidateHandlerFn(cliCtx)).Methods("POST") -} - -func postDepositHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Decode POST request body - var req PostCreateDepositReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - return - } - req.BaseReq = req.BaseReq.Sanitize() - if !req.BaseReq.ValidateBasic(w) { - return - } - - msg := types.NewMsgDeposit(req.From, req.Amount) - if err := msg.ValidateBasic(); err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - tx.WriteGeneratedTxResponse(cliCtx, w, req.BaseReq, &msg) - } -} - -func postWithdrawHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Decode POST request body - var req PostCreateWithdrawReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - return - } - req.BaseReq = req.BaseReq.Sanitize() - if !req.BaseReq.ValidateBasic(w) { - return - } - - msg := types.NewMsgWithdraw(req.From, req.Amount) - if err := msg.ValidateBasic(); err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - tx.WriteGeneratedTxResponse(cliCtx, w, req.BaseReq, &msg) - } -} - -func postBorrowHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Decode POST request body - var req PostBorrowReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - return - } - req.BaseReq = req.BaseReq.Sanitize() - if !req.BaseReq.ValidateBasic(w) { - return - } - - msg := types.NewMsgBorrow(req.From, req.Amount) - if err := msg.ValidateBasic(); err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - tx.WriteGeneratedTxResponse(cliCtx, w, req.BaseReq, &msg) - } -} - -func postRepayHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Decode POST request body - var req PostRepayReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - return - } - req.BaseReq = req.BaseReq.Sanitize() - if !req.BaseReq.ValidateBasic(w) { - return - } - - owner := req.Owner - if owner.Empty() { - owner = req.From - } - - msg := types.NewMsgRepay(req.From, owner, req.Amount) - if err := msg.ValidateBasic(); err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - tx.WriteGeneratedTxResponse(cliCtx, w, req.BaseReq, &msg) - } -} - -func postLiquidateHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Decode POST request body - var req PostLiquidateReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - return - } - req.BaseReq = req.BaseReq.Sanitize() - if !req.BaseReq.ValidateBasic(w) { - return - } - - msg := types.NewMsgLiquidate(req.From, req.Borrower) - if err := msg.ValidateBasic(); err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - tx.WriteGeneratedTxResponse(cliCtx, w, req.BaseReq, &msg) - } -} diff --git a/x/hard/keeper/borrow.go b/x/hard/keeper/borrow.go index f4fcb4b0..3f237cd9 100644 --- a/x/hard/keeper/borrow.go +++ b/x/hard/keeper/borrow.go @@ -48,7 +48,7 @@ func (k Keeper) Borrow(ctx sdk.Context, borrower sdk.AccAddress, coins sdk.Coins macc := k.accountKeeper.GetModuleAccount(ctx, types.ModuleAccountName) modAccCoins := k.bankKeeper.GetAllBalances(ctx, macc.GetAddress()) for _, coin := range coins { - _, isNegative := modAccCoins.SafeSub(sdk.NewCoins(coin)) + _, isNegative := modAccCoins.SafeSub(coin) if isNegative { return sdkerrors.Wrapf(types.ErrBorrowExceedsAvailableBalance, "the requested borrow amount of %s exceeds the total amount of %s%s available to borrow", @@ -122,7 +122,7 @@ func (k Keeper) ValidateBorrow(ctx sdk.Context, borrower sdk.AccAddress, amount if !foundReserveCoins { reserveCoins = sdk.NewCoins() } - fundsAvailableToBorrow, isNegative := hardMaccCoins.SafeSub(reserveCoins) + fundsAvailableToBorrow, isNegative := hardMaccCoins.SafeSub(reserveCoins...) if isNegative { return sdkerrors.Wrapf(types.ErrReservesExceedCash, "reserves %s > cash %s", reserveCoins, hardMaccCoins) } @@ -238,7 +238,7 @@ func (k Keeper) DecrementBorrowedCoins(ctx sdk.Context, coins sdk.Coins) error { return sdkerrors.Wrapf(types.ErrBorrowedCoinsNotFound, "cannot repay coins if no coins are currently borrowed") } - updatedBorrowedCoins, isNegative := borrowedCoins.SafeSub(coins) + updatedBorrowedCoins, isNegative := borrowedCoins.SafeSub(coins...) if isNegative { coinsToSubtract := sdk.NewCoins() for _, coin := range coins { @@ -250,7 +250,7 @@ func (k Keeper) DecrementBorrowedCoins(ctx sdk.Context, coins sdk.Coins) error { coinsToSubtract = coinsToSubtract.Add(coin) } } - updatedBorrowedCoins = borrowedCoins.Sub(coinsToSubtract) + updatedBorrowedCoins = borrowedCoins.Sub(coinsToSubtract...) } k.SetBorrowedCoins(ctx, updatedBorrowedCoins) diff --git a/x/hard/keeper/borrow_test.go b/x/hard/keeper/borrow_test.go index a0db8c78..7dc5ced0 100644 --- a/x/hard/keeper/borrow_test.go +++ b/x/hard/keeper/borrow_test.go @@ -543,7 +543,7 @@ func (suite *KeeperTestSuite) TestValidateBorrow() { modAccBalance := suite.getAccountCoins(suite.getModuleAccountAtCtx(types.ModuleAccountName, suite.ctx)) reserves, found := suite.keeper.GetTotalReserves(suite.ctx) suite.Require().True(found) - availableToBorrow := modAccBalance.Sub(reserves) + availableToBorrow := modAccBalance.Sub(reserves...) // Test borrowing one over the available amount (try to borrow from the reserves) err = suite.keeper.Borrow( diff --git a/x/hard/keeper/deposit.go b/x/hard/keeper/deposit.go index 4343f857..1715d1ac 100644 --- a/x/hard/keeper/deposit.go +++ b/x/hard/keeper/deposit.go @@ -42,7 +42,7 @@ func (k Keeper) Deposit(ctx sdk.Context, depositor sdk.AccAddress, coins sdk.Coi acc := k.accountKeeper.GetAccount(ctx, depositor) accCoins := k.bankKeeper.SpendableCoins(ctx, acc.GetAddress()) for _, coin := range coins { - _, isNegative := accCoins.SafeSub(sdk.NewCoins(coin)) + _, isNegative := accCoins.SafeSub(coin) if isNegative { return sdkerrors.Wrapf(types.ErrBorrowExceedsAvailableBalance, "insufficient funds: the requested deposit amount of %s exceeds the total available account funds of %s%s", @@ -139,7 +139,7 @@ func (k Keeper) DecrementSuppliedCoins(ctx sdk.Context, coins sdk.Coins) error { return sdkerrors.Wrapf(types.ErrSuppliedCoinsNotFound, "cannot withdraw if no coins are deposited") } - updatedSuppliedCoins, isNegative := suppliedCoins.SafeSub(coins) + updatedSuppliedCoins, isNegative := suppliedCoins.SafeSub(coins...) if isNegative { coinsToSubtract := sdk.NewCoins() for _, coin := range coins { @@ -151,7 +151,7 @@ func (k Keeper) DecrementSuppliedCoins(ctx sdk.Context, coins sdk.Coins) error { coinsToSubtract = coinsToSubtract.Add(coin) } } - updatedSuppliedCoins = suppliedCoins.Sub(coinsToSubtract) + updatedSuppliedCoins = suppliedCoins.Sub(coinsToSubtract...) } k.SetSuppliedCoins(ctx, updatedSuppliedCoins) diff --git a/x/hard/keeper/integration_test.go b/x/hard/keeper/integration_test.go index e6d7e0b1..294a1b4b 100644 --- a/x/hard/keeper/integration_test.go +++ b/x/hard/keeper/integration_test.go @@ -59,7 +59,7 @@ func NewHARDGenState(cdc codec.JSONCodec) app.GenesisState { LoanToValue: sdk.MustNewDecFromStr("0.5"), }, SpotMarketID: "busd:usd", - ConversionFactor: sdk.Int(sdk.MustNewDecFromStr("100000000")), + ConversionFactor: sdk.NewInt(100000000), InterestRateModel: types.InterestRateModel{ BaseRateAPY: sdk.MustNewDecFromStr("0"), BaseMultiplier: sdk.MustNewDecFromStr("0.5"), diff --git a/x/hard/keeper/interest.go b/x/hard/keeper/interest.go index 6f5a3449..7864e22e 100644 --- a/x/hard/keeper/interest.go +++ b/x/hard/keeper/interest.go @@ -3,6 +3,7 @@ package keeper import ( "math" + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -136,13 +137,13 @@ func (k Keeper) AccrueInterest(ctx sdk.Context, denom string) error { } totalBorrowInterestAccumulated := sdk.NewCoins(sdk.NewCoin(denom, interestBorrowAccumulated)) - reservesNew := interestBorrowAccumulated.ToDec().Mul(mm.ReserveFactor).TruncateInt() + reservesNew := sdk.NewDecFromInt(interestBorrowAccumulated).Mul(mm.ReserveFactor).TruncateInt() borrowInterestFactorNew := borrowInterestFactorPrior.Mul(borrowInterestFactor) k.SetBorrowInterestFactor(ctx, denom, borrowInterestFactorNew) // Calculate supply interest factor and update supplyInterestNew := interestBorrowAccumulated.Sub(reservesNew) - supplyInterestFactor := CalculateSupplyInterestFactor(supplyInterestNew.ToDec(), cashPrior.ToDec(), borrowedPrior.Amount.ToDec(), reservesPrior.AmountOf(denom).ToDec()) + supplyInterestFactor := CalculateSupplyInterestFactor(sdk.NewDecFromInt(supplyInterestNew), sdk.NewDecFromInt(cashPrior), sdk.NewDecFromInt(borrowedPrior.Amount), sdk.NewDecFromInt(reservesPrior.AmountOf(denom))) supplyInterestFactorNew := supplyInterestFactorPrior.Mul(supplyInterestFactor) k.SetSupplyInterestFactor(ctx, denom, supplyInterestFactorNew) @@ -194,11 +195,11 @@ func CalculateBorrowInterestFactor(perSecondInterestRate sdk.Dec, secondsElapsed scalingFactorInt := sdk.NewInt(int64(scalingFactor)) // Convert per-second interest rate to a uint scaled by 1e18 - interestMantissa := sdk.NewUintFromBigInt(perSecondInterestRate.MulInt(scalingFactorInt).RoundInt().BigInt()) + interestMantissa := sdkmath.NewUintFromBigInt(perSecondInterestRate.MulInt(scalingFactorInt).RoundInt().BigInt()) // Convert seconds elapsed to uint (*not scaled*) - secondsElapsedUint := sdk.NewUintFromBigInt(secondsElapsed.BigInt()) + secondsElapsedUint := sdkmath.NewUintFromBigInt(secondsElapsed.BigInt()) // Calculate the interest factor as a uint scaled by 1e18 - interestFactorMantissa := sdk.RelativePow(interestMantissa, secondsElapsedUint, scalingFactorUint) + interestFactorMantissa := sdkmath.RelativePow(interestMantissa, secondsElapsedUint, scalingFactorUint) // Convert interest factor to an unscaled sdk.Dec return sdk.NewDecFromBigInt(interestFactorMantissa.BigInt()).QuoInt(scalingFactorInt) diff --git a/x/hard/keeper/interest_test.go b/x/hard/keeper/interest_test.go index 1c55e267..446b0fa7 100644 --- a/x/hard/keeper/interest_test.go +++ b/x/hard/keeper/interest_test.go @@ -481,7 +481,7 @@ func (suite *InterestTestSuite) TestAPYToSPY() { "highest apy", args{ apy: sdk.MustNewDecFromStr("177"), - expectedValue: sdk.MustNewDecFromStr("1.000002441641340532"), + expectedValue: sdk.MustNewDecFromStr("1.000000164134644767"), }, false, }, @@ -1355,13 +1355,13 @@ func (suite *KeeperTestSuite) TestSupplyInterest() { newBorrowInterestFactor := keeper.CalculateBorrowInterestFactor(borrowRateSpy, sdk.NewInt(snapshot.elapsedTime)) expectedBorrowInterest := (newBorrowInterestFactor.Mul(sdk.NewDecFromInt(borrowCoinPriorAmount)).TruncateInt()).Sub(borrowCoinPriorAmount) - expectedReserves := reservesPrior.Add(sdk.NewCoin(coinDenom, sdk.NewDecFromInt(expectedBorrowInterest).Mul(tc.args.reserveFactor).TruncateInt())).Sub(reservesPrior) + expectedReserves := reservesPrior.Add(sdk.NewCoin(coinDenom, sdk.NewDecFromInt(expectedBorrowInterest).Mul(tc.args.reserveFactor).TruncateInt())).Sub(reservesPrior...) expectedTotalReserves := expectedReserves.Add(reservesPrior...) expectedBorrowInterestFactor := borrowInterestFactorPrior.Mul(newBorrowInterestFactor) expectedSupplyInterest := expectedBorrowInterest.Sub(expectedReserves.AmountOf(coinDenom)) - newSupplyInterestFactor := keeper.CalculateSupplyInterestFactor(expectedSupplyInterest.ToDec(), sdk.NewDecFromInt(cashPrior), sdk.NewDecFromInt(borrowCoinPriorAmount), sdk.NewDecFromInt(reservesPrior.AmountOf(coinDenom))) + newSupplyInterestFactor := keeper.CalculateSupplyInterestFactor(sdk.NewDecFromInt(expectedSupplyInterest), sdk.NewDecFromInt(cashPrior), sdk.NewDecFromInt(borrowCoinPriorAmount), sdk.NewDecFromInt(reservesPrior.AmountOf(coinDenom))) expectedSupplyInterestFactor := supplyInterestFactorPrior.Mul(newSupplyInterestFactor) // ------------------------------------------------------------------------------------- @@ -1404,7 +1404,7 @@ func (suite *KeeperTestSuite) TestSupplyInterest() { // Calculate percentage of supply interest profits owed to user userSupplyBefore, _ := suite.keeper.GetDeposit(snapshotCtx, tc.args.user) userSupplyCoinAmount := userSupplyBefore.Amount.AmountOf(coinDenom) - userPercentOfTotalSupplied := userSupplyCoinAmount.ToDec().Quo(supplyCoinPriorAmount.ToDec()) + userPercentOfTotalSupplied := sdk.NewDecFromInt(userSupplyCoinAmount).Quo(sdk.NewDecFromInt(supplyCoinPriorAmount)) userExpectedSupplyInterestCoin := sdk.NewCoin(coinDenom, userPercentOfTotalSupplied.MulInt(expectedSupplyInterest).TruncateInt()) // Supplying syncs user's owed supply and borrow interest diff --git a/x/hard/keeper/keeper.go b/x/hard/keeper/keeper.go index 6b621c7f..5d4fc3e2 100644 --- a/x/hard/keeper/keeper.go +++ b/x/hard/keeper/keeper.go @@ -5,6 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/store/prefix" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" @@ -13,7 +14,7 @@ import ( // Keeper keeper for the hard module type Keeper struct { - key sdk.StoreKey + key storetypes.StoreKey cdc codec.Codec paramSubspace paramtypes.Subspace accountKeeper types.AccountKeeper @@ -24,7 +25,7 @@ type Keeper struct { } // NewKeeper creates a new keeper -func NewKeeper(cdc codec.Codec, key sdk.StoreKey, paramstore paramtypes.Subspace, +func NewKeeper(cdc codec.Codec, key storetypes.StoreKey, paramstore paramtypes.Subspace, ak types.AccountKeeper, bk types.BankKeeper, pfk types.PricefeedKeeper, auk types.AuctionKeeper, ) Keeper { @@ -219,7 +220,8 @@ func (k Keeper) DeleteMoneyMarket(ctx sdk.Context, denom string) { } // IterateMoneyMarkets iterates over all money markets objects in the store and performs a callback function -// that returns both the money market and the key (denom) it's stored under +// +// that returns both the money market and the key (denom) it's stored under func (k Keeper) IterateMoneyMarkets(ctx sdk.Context, cb func(denom string, moneyMarket types.MoneyMarket) (stop bool)) { store := prefix.NewStore(ctx.KVStore(k.key), types.MoneyMarketsPrefix) iterator := sdk.KVStorePrefixIterator(store, []byte{}) diff --git a/x/hard/keeper/keeper_test.go b/x/hard/keeper/keeper_test.go index 8558c142..067eeaa6 100644 --- a/x/hard/keeper/keeper_test.go +++ b/x/hard/keeper/keeper_test.go @@ -46,35 +46,88 @@ func (suite *KeeperTestSuite) SetupTest() { } func (suite *KeeperTestSuite) TestGetSetDeleteDeposit() { - dep := types.NewDeposit(sdk.AccAddress("test"), sdk.NewCoins(sdk.NewCoin("bnb", sdk.NewInt(100))), - types.SupplyInterestFactors{types.NewSupplyInterestFactor("", sdk.MustNewDecFromStr("0"))}) + addr := suite.addrs[0] + dep := types.NewDeposit( + addr, + sdk.NewCoins(sdk.NewCoin("bnb", sdk.NewInt(100))), + types.SupplyInterestFactors{types.NewSupplyInterestFactor("bnb", sdk.MustNewDecFromStr("1.12"))}, + ) - _, f := suite.keeper.GetDeposit(suite.ctx, sdk.AccAddress("test")) + _, f := suite.keeper.GetDeposit(suite.ctx, addr) suite.Require().False(f) suite.keeper.SetDeposit(suite.ctx, dep) - testDeposit, f := suite.keeper.GetDeposit(suite.ctx, sdk.AccAddress("test")) + storedDeposit, f := suite.keeper.GetDeposit(suite.ctx, addr) suite.Require().True(f) - suite.Require().Equal(dep, testDeposit) + suite.Require().Equal(dep, storedDeposit) suite.Require().NotPanics(func() { suite.keeper.DeleteDeposit(suite.ctx, dep) }) - _, f = suite.keeper.GetDeposit(suite.ctx, sdk.AccAddress("test")) + _, f = suite.keeper.GetDeposit(suite.ctx, addr) suite.Require().False(f) } func (suite *KeeperTestSuite) TestIterateDeposits() { + var deposits types.Deposits for i := 0; i < 5; i++ { - dep := types.NewDeposit(sdk.AccAddress("test"+fmt.Sprint(i)), sdk.NewCoins(sdk.NewCoin("bnb", sdk.NewInt(100))), types.SupplyInterestFactors{}) - suite.Require().NotPanics(func() { suite.keeper.SetDeposit(suite.ctx, dep) }) + dep := types.NewDeposit( + sdk.AccAddress("test"+fmt.Sprint(i)), + sdk.NewCoins(sdk.NewCoin("bnb", sdk.NewInt(100))), + types.SupplyInterestFactors{types.NewSupplyInterestFactor("bnb", sdk.MustNewDecFromStr("1.12"))}, + ) + deposits = append(deposits, dep) + suite.keeper.SetDeposit(suite.ctx, dep) } - var deposits []types.Deposit + var storedDeposits types.Deposits suite.keeper.IterateDeposits(suite.ctx, func(d types.Deposit) bool { - deposits = append(deposits, d) + storedDeposits = append(storedDeposits, d) return false }) - suite.Require().Equal(5, len(deposits)) + suite.Require().Equal(deposits, storedDeposits) +} + +func (suite *KeeperTestSuite) TestGetSetDeleteBorrow() { + addr := suite.addrs[0] + + borrow := types.NewBorrow( + addr, + sdk.NewCoins(sdk.NewInt64Coin("bnb", 1e9)), + types.BorrowInterestFactors{types.NewBorrowInterestFactor("bnb", sdk.MustNewDecFromStr("1.12"))}, + ) + + _, f := suite.keeper.GetBorrow(suite.ctx, addr) + suite.Require().False(f) + + suite.keeper.SetBorrow(suite.ctx, borrow) + + storedBorrow, f := suite.keeper.GetBorrow(suite.ctx, addr) + suite.Require().True(f) + suite.Require().Equal(borrow, storedBorrow) + + suite.Require().NotPanics(func() { suite.keeper.DeleteBorrow(suite.ctx, borrow) }) + + _, f = suite.keeper.GetBorrow(suite.ctx, addr) + suite.Require().False(f) +} + +func (suite *KeeperTestSuite) TestIterateBorrows() { + var borrows types.Borrows + for i := 0; i < 5; i++ { + borrow := types.NewBorrow( + sdk.AccAddress("test"+fmt.Sprint(i)), + sdk.NewCoins(sdk.NewInt64Coin("bnb", 1e9)), + types.BorrowInterestFactors{types.NewBorrowInterestFactor("bnb", sdk.MustNewDecFromStr("1.12"))}, + ) + borrows = append(borrows, borrow) + suite.keeper.SetBorrow(suite.ctx, borrow) + } + var storedBorrows types.Borrows + suite.keeper.IterateBorrows(suite.ctx, func(b types.Borrow) bool { + storedBorrows = append(storedBorrows, b) + return false + }) + suite.Require().Equal(borrows, storedBorrows) } func (suite *KeeperTestSuite) TestGetSetDeleteInterestRateModel() { diff --git a/x/hard/keeper/liquidation.go b/x/hard/keeper/liquidation.go index 58b9c930..3c1f19f8 100644 --- a/x/hard/keeper/liquidation.go +++ b/x/hard/keeper/liquidation.go @@ -101,7 +101,7 @@ func (k Keeper) SeizeDeposits(ctx sdk.Context, keeper sdk.AccAddress, deposit ty } // All deposit amounts not given to keeper as rewards are eligible to be auctioned off - aucDeposits := deposit.Amount.Sub(keeperRewardCoins) + aucDeposits := deposit.Amount.Sub(keeperRewardCoins...) // Build valuation map to hold deposit coin USD valuations depositCoinValues := types.NewValuationMap() @@ -214,11 +214,11 @@ func (k Keeper) StartAuctions(ctx sdk.Context, borrower sdk.AccAddress, borrows, borrowCoinValues.SetZero(bKey) depositCoinValues.Decrement(dKey, maxLotSize) // Update deposits, borrows - borrows = borrows.Sub(sdk.NewCoins(bid)) + borrows = borrows.Sub(bid) if insufficientLotFunds { - deposits = deposits.Sub(sdk.NewCoins(sdk.NewCoin(dKey, deposits.AmountOf(dKey)))) + deposits = deposits.Sub(sdk.NewCoin(dKey, deposits.AmountOf(dKey))) } else { - deposits = deposits.Sub(sdk.NewCoins(lot)) + deposits = deposits.Sub(lot) } // Update max lot size maxLotSize = sdk.ZeroDec() @@ -265,11 +265,11 @@ func (k Keeper) StartAuctions(ctx sdk.Context, borrower sdk.AccAddress, borrows, borrowCoinValues.Decrement(bKey, maxBid) depositCoinValues.SetZero(dKey) - borrows = borrows.Sub(sdk.NewCoins(bid)) + borrows = borrows.Sub(bid) if insufficientLotFunds { - deposits = deposits.Sub(sdk.NewCoins(sdk.NewCoin(dKey, deposits.AmountOf(dKey)))) + deposits = deposits.Sub(sdk.NewCoin(dKey, deposits.AmountOf(dKey))) } else { - deposits = deposits.Sub(sdk.NewCoins(lot)) + deposits = deposits.Sub(lot) } // Update max lot size diff --git a/x/hard/keeper/repay.go b/x/hard/keeper/repay.go index 5e1cb186..b6c9de2f 100644 --- a/x/hard/keeper/repay.go +++ b/x/hard/keeper/repay.go @@ -52,7 +52,7 @@ func (k Keeper) Repay(ctx sdk.Context, sender, owner sdk.AccAddress, coins sdk.C } // Update user's borrow in store - borrow.Amount = borrow.Amount.Sub(payment) + borrow.Amount = borrow.Amount.Sub(payment...) if borrow.Amount.Empty() { k.DeleteBorrow(ctx, borrow) diff --git a/x/hard/keeper/repay_test.go b/x/hard/keeper/repay_test.go index 48f9ea21..9395ac3a 100644 --- a/x/hard/keeper/repay_test.go +++ b/x/hard/keeper/repay_test.go @@ -306,19 +306,19 @@ func (suite *KeeperTestSuite) TestRepay() { suite.Require().NoError(err) // Check repayer balance - expectedRepayerCoins := previousRepayerCoins.Sub(repaymentCoins) + expectedRepayerCoins := previousRepayerCoins.Sub(repaymentCoins...) acc := suite.getAccount(tc.args.repayer) // use IsEqual for sdk.Coins{nil} vs sdk.Coins{} suite.Require().True(expectedRepayerCoins.IsEqual(bankKeeper.GetAllBalances(suite.ctx, acc.GetAddress()))) // Check module account balance - expectedModuleCoins := tc.args.initialModuleCoins.Add(tc.args.depositCoins...).Sub(tc.args.borrowCoins).Add(repaymentCoins...) + expectedModuleCoins := tc.args.initialModuleCoins.Add(tc.args.depositCoins...).Sub(tc.args.borrowCoins...).Add(repaymentCoins...) mAcc := suite.getModuleAccount(types.ModuleAccountName) suite.Require().Equal(expectedModuleCoins, bankKeeper.GetAllBalances(suite.ctx, mAcc.GetAddress())) // Check user's borrow object borrow, foundBorrow := suite.keeper.GetBorrow(suite.ctx, tc.args.borrower) - expectedBorrowCoins := tc.args.borrowCoins.Sub(repaymentCoins) + expectedBorrowCoins := tc.args.borrowCoins.Sub(repaymentCoins...) if tc.errArgs.expectDelete { suite.Require().False(foundBorrow) @@ -335,7 +335,7 @@ func (suite *KeeperTestSuite) TestRepay() { suite.Require().Equal(previousRepayerCoins, bankKeeper.GetAllBalances(suite.ctx, acc.GetAddress())) // Check module account balance (no repay coins) - expectedModuleCoins := tc.args.initialModuleCoins.Add(tc.args.depositCoins...).Sub(tc.args.borrowCoins) + expectedModuleCoins := tc.args.initialModuleCoins.Add(tc.args.depositCoins...).Sub(tc.args.borrowCoins...) mAcc := suite.getModuleAccount(types.ModuleAccountName) suite.Require().Equal(expectedModuleCoins, bankKeeper.GetAllBalances(suite.ctx, mAcc.GetAddress())) diff --git a/x/hard/keeper/withdraw.go b/x/hard/keeper/withdraw.go index 622af15f..7e29e90e 100644 --- a/x/hard/keeper/withdraw.go +++ b/x/hard/keeper/withdraw.go @@ -38,7 +38,7 @@ func (k Keeper) Withdraw(ctx sdk.Context, depositor sdk.AccAddress, coins sdk.Co borrow = types.Borrow{} } - proposedDeposit := types.NewDeposit(deposit.Depositor, deposit.Amount.Sub(amount), types.SupplyInterestFactors{}) + proposedDeposit := types.NewDeposit(deposit.Depositor, deposit.Amount.Sub(amount...), types.SupplyInterestFactors{}) valid, err := k.IsWithinValidLtvRange(ctx, proposedDeposit, borrow) if err != nil { return err @@ -63,7 +63,7 @@ func (k Keeper) Withdraw(ctx sdk.Context, depositor sdk.AccAddress, coins sdk.Co } } - deposit.Amount = deposit.Amount.Sub(amount) + deposit.Amount = deposit.Amount.Sub(amount...) if deposit.Amount.Empty() { k.DeleteDeposit(ctx, deposit) } else { diff --git a/x/hard/module.go b/x/hard/module.go index 374690c3..1f8e77b1 100644 --- a/x/hard/module.go +++ b/x/hard/module.go @@ -4,7 +4,6 @@ import ( "context" "encoding/json" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" @@ -17,7 +16,6 @@ import ( abci "github.com/tendermint/tendermint/abci/types" "github.com/kava-labs/kava/x/hard/client/cli" - "github.com/kava-labs/kava/x/hard/client/rest" "github.com/kava-labs/kava/x/hard/keeper" "github.com/kava-labs/kava/x/hard/types" ) @@ -63,11 +61,6 @@ func (a AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry types.RegisterInterfaces(registry) } -// RegisterRESTRoutes registers REST routes for the hard module. -func (a AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) { - rest.RegisterRoutes(clientCtx, rtr) -} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the gov module. func (a AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { diff --git a/x/hard/types/borrow.go b/x/hard/types/borrow.go index c439c89d..5c395610 100644 --- a/x/hard/types/borrow.go +++ b/x/hard/types/borrow.go @@ -38,7 +38,7 @@ func (b Borrow) NormalizedBorrow() (sdk.DecCoins, error) { normalized = normalized.Add( sdk.NewDecCoinFromDec( coin.Denom, - coin.Amount.ToDec().Quo(factor), + sdk.NewDecFromInt(coin.Amount).Quo(factor), ), ) } diff --git a/x/hard/types/deposit.go b/x/hard/types/deposit.go index 8850739d..f73c4dd5 100644 --- a/x/hard/types/deposit.go +++ b/x/hard/types/deposit.go @@ -38,7 +38,7 @@ func (b Deposit) NormalizedDeposit() (sdk.DecCoins, error) { normalized = normalized.Add( sdk.NewDecCoinFromDec( coin.Denom, - coin.Amount.ToDec().Quo(factor), + sdk.NewDecFromInt(coin.Amount).Quo(factor), ), ) } diff --git a/x/incentive/client/rest/query.go b/x/incentive/client/rest/query.go deleted file mode 100644 index e1d6982d..00000000 --- a/x/incentive/client/rest/query.go +++ /dev/null @@ -1,296 +0,0 @@ -package rest - -import ( - "fmt" - "net/http" - "strconv" - "strings" - - "github.com/gorilla/mux" - - "github.com/cosmos/cosmos-sdk/client" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/rest" - - "github.com/kava-labs/kava/x/incentive/types" -) - -func registerQueryRoutes(cliCtx client.Context, r *mux.Router) { - r.HandleFunc(fmt.Sprintf("/%s/rewards", types.ModuleName), queryRewardsHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/parameters", types.ModuleName), queryParamsHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/reward-factors", types.ModuleName), queryRewardFactorsHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/apy", types.ModuleName), queryAPYsHandlerFn(cliCtx)).Methods("GET") -} - -func queryRewardsHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - _, page, limit, err := rest.ParseHTTPArgsWithLimit(r, 0) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - var owner sdk.AccAddress - if x := r.URL.Query().Get(types.RestClaimOwner); len(x) != 0 { - ownerStr := strings.ToLower(strings.TrimSpace(x)) - owner, err = sdk.AccAddressFromBech32(ownerStr) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("cannot parse address from claim owner %s", ownerStr)) - return - } - } - - var rewardType string - if x := r.URL.Query().Get(types.RestClaimType); len(x) != 0 { - rewardType = strings.ToLower(strings.TrimSpace(x)) - } - - var unsynced bool - if x := r.URL.Query().Get(types.RestUnsynced); len(x) != 0 { - unsyncedStr := strings.ToLower(strings.TrimSpace(x)) - unsynced, err = strconv.ParseBool(unsyncedStr) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("cannot parse bool from unsynced flag %s", unsyncedStr)) - return - } - } - - params := types.NewQueryRewardsParams(page, limit, owner, unsynced) - switch strings.ToLower(rewardType) { - case "hard": - executeHardRewardsQuery(w, cliCtx, params) - case "usdx_minting": - executeUSDXMintingRewardsQuery(w, cliCtx, params) - case "delegator": - executeDelegatorRewardsQuery(w, cliCtx, params) - case "swap": - executeSwapRewardsQuery(w, cliCtx, params) - case "earn": - executeEarnRewardsQuery(w, cliCtx, params) - default: - executeAllRewardQueries(w, cliCtx, params) - } - } -} - -func queryParamsHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - route := fmt.Sprintf("custom/%s/parameters", types.QuerierRoute) - - res, height, err := cliCtx.QueryWithData(route, nil) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func queryRewardFactorsHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - route := fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryGetRewardFactors) - - res, height, err := cliCtx.QueryWithData(route, nil) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func executeHardRewardsQuery(w http.ResponseWriter, cliCtx client.Context, params types.QueryRewardsParams) { - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("failed to marshal query params: %s", err)) - return - } - - res, height, err := cliCtx.QueryWithData(fmt.Sprintf("custom/incentive/%s", types.QueryGetHardRewards), bz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) -} - -func executeUSDXMintingRewardsQuery(w http.ResponseWriter, cliCtx client.Context, params types.QueryRewardsParams) { - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("failed to marshal query params: %s", err)) - return - } - - res, height, err := cliCtx.QueryWithData(fmt.Sprintf("custom/incentive/%s", types.QueryGetUSDXMintingRewards), bz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) -} - -func executeDelegatorRewardsQuery(w http.ResponseWriter, cliCtx client.Context, params types.QueryRewardsParams) { - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("failed to marshal query params: %s", err)) - return - } - - res, height, err := cliCtx.QueryWithData(fmt.Sprintf("custom/incentive/%s", types.QueryGetDelegatorRewards), bz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) -} - -func executeSwapRewardsQuery(w http.ResponseWriter, cliCtx client.Context, params types.QueryRewardsParams) { - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("failed to marshal query params: %s", err)) - return - } - - res, height, err := cliCtx.QueryWithData(fmt.Sprintf("custom/incentive/%s", types.QueryGetSwapRewards), bz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) -} - -func executeEarnRewardsQuery(w http.ResponseWriter, cliCtx client.Context, params types.QueryRewardsParams) { - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("failed to marshal query params: %s", err)) - return - } - - res, height, err := cliCtx.QueryWithData(fmt.Sprintf("custom/incentive/%s", types.QueryGetEarnRewards), bz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) -} - -func executeAllRewardQueries(w http.ResponseWriter, cliCtx client.Context, params types.QueryRewardsParams) { - paramsBz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("failed to marshal query params: %s", err)) - return - } - hardRes, _, err := cliCtx.QueryWithData(fmt.Sprintf("custom/incentive/%s", types.QueryGetHardRewards), paramsBz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - var hardClaims types.HardLiquidityProviderClaims - cliCtx.LegacyAmino.MustUnmarshalJSON(hardRes, &hardClaims) - - usdxMintingRes, _, err := cliCtx.QueryWithData(fmt.Sprintf("custom/incentive/%s", types.QueryGetUSDXMintingRewards), paramsBz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - var usdxMintingClaims types.USDXMintingClaims - cliCtx.LegacyAmino.MustUnmarshalJSON(usdxMintingRes, &usdxMintingClaims) - - delegatorRes, _, err := cliCtx.QueryWithData(fmt.Sprintf("custom/incentive/%s", types.QueryGetDelegatorRewards), paramsBz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - var delegatorClaims types.DelegatorClaims - cliCtx.LegacyAmino.MustUnmarshalJSON(delegatorRes, &delegatorClaims) - - swapRes, _, err := cliCtx.QueryWithData(fmt.Sprintf("custom/incentive/%s", types.QueryGetSwapRewards), paramsBz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - var swapClaims types.SwapClaims - cliCtx.LegacyAmino.MustUnmarshalJSON(swapRes, &swapClaims) - - earnRes, height, err := cliCtx.QueryWithData(fmt.Sprintf("custom/incentive/%s", types.QueryGetEarnRewards), paramsBz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - var earnClaims types.EarnClaims - cliCtx.LegacyAmino.MustUnmarshalJSON(earnRes, &earnClaims) - - cliCtx = cliCtx.WithHeight(height) - - type rewardResult struct { - HardClaims types.HardLiquidityProviderClaims `json:"hard_claims" yaml:"hard_claims"` - UsdxMintingClaims types.USDXMintingClaims `json:"usdx_minting_claims" yaml:"usdx_minting_claims"` - DelegatorClaims types.DelegatorClaims `json:"delegator_claims" yaml:"delegator_claims"` - SwapClaims types.SwapClaims `json:"swap_claims" yaml:"swap_claims"` - EarnClaims types.EarnClaims `json:"earn_claims" yaml:"earn_claims"` - } - - res := rewardResult{ - HardClaims: hardClaims, - UsdxMintingClaims: usdxMintingClaims, - DelegatorClaims: delegatorClaims, - SwapClaims: swapClaims, - EarnClaims: earnClaims, - } - - resBz, err := cliCtx.LegacyAmino.MarshalJSON(res) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("failed to marshal result: %s", err)) - return - } - - rest.PostProcessResponse(w, cliCtx, resBz) -} - -func queryAPYsHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - route := fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryGetAPYs) - - res, height, err := cliCtx.QueryWithData(route, nil) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) - } -} diff --git a/x/incentive/client/rest/rest.go b/x/incentive/client/rest/rest.go deleted file mode 100644 index c69982f3..00000000 --- a/x/incentive/client/rest/rest.go +++ /dev/null @@ -1,38 +0,0 @@ -package rest - -import ( - "github.com/gorilla/mux" - - "github.com/cosmos/cosmos-sdk/client" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/rest" - - "github.com/kava-labs/kava/x/incentive/types" -) - -// REST variable names -// nolint -const ( - RestDenom = "denom" -) - -// RegisterRoutes registers incentive-related REST handlers to a router -func RegisterRoutes(cliCtx client.Context, r *mux.Router) { - registerQueryRoutes(cliCtx, r) - registerTxRoutes(cliCtx, r) -} - -// PostClaimReq defines the properties of claim transaction's request body. -type PostClaimReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - Sender sdk.AccAddress `json:"sender" yaml:"sender"` - DenomsToClaim types.Selections `json:"denoms_to_claim" yaml:"denoms_to_claim"` -} - -// PostClaimReq defines the properties of claim transaction's request body. -type PostClaimVVestingReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - Sender sdk.AccAddress `json:"sender" yaml:"sender"` - Receiver sdk.AccAddress `json:"receiver" yaml:"receiver"` - DenomsToClaim types.Selections `json:"denoms_to_claim" yaml:"denoms_to_claim"` -} diff --git a/x/incentive/client/rest/tx.go b/x/incentive/client/rest/tx.go deleted file mode 100644 index 61b2da78..00000000 --- a/x/incentive/client/rest/tx.go +++ /dev/null @@ -1,86 +0,0 @@ -package rest - -import ( - "bytes" - "fmt" - "net/http" - - "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" - - "github.com/kava-labs/kava/x/incentive/types" -) - -func registerTxRoutes(cliCtx client.Context, r *mux.Router) { - r.HandleFunc("/incentive/claim-cdp", postClaimHandlerFn(cliCtx, usdxMintingGenerator)).Methods("POST") - r.HandleFunc("/incentive/claim-hard", postClaimHandlerFn(cliCtx, hardGenerator)).Methods("POST") - r.HandleFunc("/incentive/claim-delegator", postClaimHandlerFn(cliCtx, delegatorGenerator)).Methods("POST") - r.HandleFunc("/incentive/claim-swap", postClaimHandlerFn(cliCtx, swapGenerator)).Methods("POST") - r.HandleFunc("/incentive/claim-earn", postClaimHandlerFn(cliCtx, earnGenerator)).Methods("POST") -} - -func usdxMintingGenerator(req PostClaimReq) (sdk.Msg, error) { - if len(req.DenomsToClaim) != 1 { - return nil, fmt.Errorf("must only claim %s denom for usdx minting rewards, got '%s", types.USDXMintingRewardDenom, req.DenomsToClaim) - } - msg := types.NewMsgClaimUSDXMintingReward(req.Sender.String(), req.DenomsToClaim[0].MultiplierName) - return &msg, nil -} - -func hardGenerator(req PostClaimReq) (sdk.Msg, error) { - msg := types.NewMsgClaimHardReward(req.Sender.String(), req.DenomsToClaim) - return &msg, nil -} - -func delegatorGenerator(req PostClaimReq) (sdk.Msg, error) { - msg := types.NewMsgClaimDelegatorReward(req.Sender.String(), req.DenomsToClaim) - return &msg, nil -} - -func swapGenerator(req PostClaimReq) (sdk.Msg, error) { - msg := types.NewMsgClaimSwapReward(req.Sender.String(), req.DenomsToClaim) - return &msg, nil -} - -func earnGenerator(req PostClaimReq) (sdk.Msg, error) { - msg := types.NewMsgClaimEarnReward(req.Sender.String(), req.DenomsToClaim) - return &msg, nil -} - -func postClaimHandlerFn(cliCtx client.Context, msgGenerator func(req PostClaimReq) (sdk.Msg, error)) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var requestBody PostClaimReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &requestBody) { - return - } - - requestBody.BaseReq = requestBody.BaseReq.Sanitize() - if !requestBody.BaseReq.ValidateBasic(w) { - return - } - - fromAddr, err := sdk.AccAddressFromBech32(requestBody.BaseReq.From) - if rest.CheckBadRequestError(w, err) { - return - } - - if !bytes.Equal(fromAddr, requestBody.Sender) { - rest.WriteErrorResponse(w, http.StatusUnauthorized, fmt.Sprintf("expected: %s, got: %s", fromAddr, requestBody.Sender)) - return - } - - msg, err := msgGenerator(requestBody) - if rest.CheckBadRequestError(w, err) { - return - } - if rest.CheckBadRequestError(w, msg.ValidateBasic()) { - return - } - - tx.WriteGeneratedTxResponse(cliCtx, w, requestBody.BaseReq, msg) - } -} diff --git a/x/incentive/genesis_test.go b/x/incentive/genesis_test.go index 887c8ea0..f7d3c84f 100644 --- a/x/incentive/genesis_test.go +++ b/x/incentive/genesis_test.go @@ -280,11 +280,16 @@ func (suite *GenesisTestSuite) TestExportedGenesisMatchesImported() { // Incentive init genesis reads from the cdp keeper to check params are ok. So it needs to be initialized first. // Then the cdp keeper reads from pricefeed keeper to check its params are ok. So it also need initialization. - tApp.InitializeFromGenesisStates( + tApp = tApp.InitializeFromGenesisStates( NewCDPGenStateMulti(tApp.AppCodec()), NewPricefeedGenStateMultiFromTime(tApp.AppCodec(), genesisTime), ) + // Clear genesis validator and genesis delegator incentive state to start empty. + ik := tApp.GetIncentiveKeeper() + suite.app.DeleteGenesisValidator(suite.T(), suite.ctx) + ik.DeleteDelegatorClaim(ctx, tApp.GenesisAddrs[0]) + incentive.InitGenesis( ctx, tApp.GetIncentiveKeeper(), diff --git a/x/incentive/keeper/claim.go b/x/incentive/keeper/claim.go index ef75f93a..5f4fcb94 100644 --- a/x/incentive/keeper/claim.go +++ b/x/incentive/keeper/claim.go @@ -31,7 +31,7 @@ func (k Keeper) ClaimUSDXMintingReward(ctx sdk.Context, owner, receiver sdk.AccA return err } - rewardAmount := claim.Reward.Amount.ToDec().Mul(multiplier.Factor).RoundInt() + rewardAmount := sdk.NewDecFromInt(claim.Reward.Amount).Mul(multiplier.Factor).RoundInt() if rewardAmount.IsZero() { return types.ErrZeroClaim } @@ -80,7 +80,7 @@ func (k Keeper) ClaimHardReward(ctx sdk.Context, owner, receiver sdk.AccAddress, amt := syncedClaim.Reward.AmountOf(denom) claimingCoins := sdk.NewCoins(sdk.NewCoin(denom, amt)) - rewardCoins := sdk.NewCoins(sdk.NewCoin(denom, amt.ToDec().Mul(multiplier.Factor).RoundInt())) + rewardCoins := sdk.NewCoins(sdk.NewCoin(denom, sdk.NewDecFromInt(amt).Mul(multiplier.Factor).RoundInt())) if rewardCoins.IsZero() { return types.ErrZeroClaim } @@ -92,7 +92,7 @@ func (k Keeper) ClaimHardReward(ctx sdk.Context, owner, receiver sdk.AccAddress, } // remove claimed coins (NOT reward coins) - syncedClaim.Reward = syncedClaim.Reward.Sub(claimingCoins) + syncedClaim.Reward = syncedClaim.Reward.Sub(claimingCoins...) k.SetHardLiquidityProviderClaim(ctx, syncedClaim) ctx.EventManager().EmitEvent( @@ -133,7 +133,7 @@ func (k Keeper) ClaimDelegatorReward(ctx sdk.Context, owner, receiver sdk.AccAdd amt := syncedClaim.Reward.AmountOf(denom) claimingCoins := sdk.NewCoins(sdk.NewCoin(denom, amt)) - rewardCoins := sdk.NewCoins(sdk.NewCoin(denom, amt.ToDec().Mul(multiplier.Factor).RoundInt())) + rewardCoins := sdk.NewCoins(sdk.NewCoin(denom, sdk.NewDecFromInt(amt).Mul(multiplier.Factor).RoundInt())) if rewardCoins.IsZero() { return types.ErrZeroClaim } @@ -146,7 +146,7 @@ func (k Keeper) ClaimDelegatorReward(ctx sdk.Context, owner, receiver sdk.AccAdd } // remove claimed coins (NOT reward coins) - syncedClaim.Reward = syncedClaim.Reward.Sub(claimingCoins) + syncedClaim.Reward = syncedClaim.Reward.Sub(claimingCoins...) k.SetDelegatorClaim(ctx, syncedClaim) ctx.EventManager().EmitEvent( @@ -182,7 +182,7 @@ func (k Keeper) ClaimSwapReward(ctx sdk.Context, owner, receiver sdk.AccAddress, amt := syncedClaim.Reward.AmountOf(denom) claimingCoins := sdk.NewCoins(sdk.NewCoin(denom, amt)) - rewardCoins := sdk.NewCoins(sdk.NewCoin(denom, amt.ToDec().Mul(multiplier.Factor).RoundInt())) + rewardCoins := sdk.NewCoins(sdk.NewCoin(denom, sdk.NewDecFromInt(amt).Mul(multiplier.Factor).RoundInt())) if rewardCoins.IsZero() { return types.ErrZeroClaim } @@ -194,7 +194,7 @@ func (k Keeper) ClaimSwapReward(ctx sdk.Context, owner, receiver sdk.AccAddress, } // remove claimed coins (NOT reward coins) - syncedClaim.Reward = syncedClaim.Reward.Sub(claimingCoins) + syncedClaim.Reward = syncedClaim.Reward.Sub(claimingCoins...) k.SetSwapClaim(ctx, syncedClaim) ctx.EventManager().EmitEvent( @@ -231,7 +231,7 @@ func (k Keeper) ClaimSavingsReward(ctx sdk.Context, owner, receiver sdk.AccAddre amt := syncedClaim.Reward.AmountOf(denom) claimingCoins := sdk.NewCoins(sdk.NewCoin(denom, amt)) - rewardCoins := sdk.NewCoins(sdk.NewCoin(denom, amt.ToDec().Mul(multiplier.Factor).RoundInt())) + rewardCoins := sdk.NewCoins(sdk.NewCoin(denom, sdk.NewDecFromInt(amt).Mul(multiplier.Factor).RoundInt())) if rewardCoins.IsZero() { return types.ErrZeroClaim } @@ -243,7 +243,7 @@ func (k Keeper) ClaimSavingsReward(ctx sdk.Context, owner, receiver sdk.AccAddre } // remove claimed coins (NOT reward coins) - syncedClaim.Reward = syncedClaim.Reward.Sub(claimingCoins) + syncedClaim.Reward = syncedClaim.Reward.Sub(claimingCoins...) k.SetSavingsClaim(ctx, syncedClaim) ctx.EventManager().EmitEvent( @@ -279,7 +279,7 @@ func (k Keeper) ClaimEarnReward(ctx sdk.Context, owner, receiver sdk.AccAddress, amt := syncedClaim.Reward.AmountOf(denom) claimingCoins := sdk.NewCoins(sdk.NewCoin(denom, amt)) - rewardCoins := sdk.NewCoins(sdk.NewCoin(denom, amt.ToDec().Mul(multiplier.Factor).RoundInt())) + rewardCoins := sdk.NewCoins(sdk.NewCoin(denom, sdk.NewDecFromInt(amt).Mul(multiplier.Factor).RoundInt())) if rewardCoins.IsZero() { return types.ErrZeroClaim } @@ -291,7 +291,7 @@ func (k Keeper) ClaimEarnReward(ctx sdk.Context, owner, receiver sdk.AccAddress, } // remove claimed coins (NOT reward coins) - syncedClaim.Reward = syncedClaim.Reward.Sub(claimingCoins) + syncedClaim.Reward = syncedClaim.Reward.Sub(claimingCoins...) k.SetEarnClaim(ctx, syncedClaim) ctx.EventManager().EmitEvent( diff --git a/x/incentive/keeper/grpc_query_test.go b/x/incentive/keeper/grpc_query_test.go index ec6b4759..77af8efd 100644 --- a/x/incentive/keeper/grpc_query_test.go +++ b/x/incentive/keeper/grpc_query_test.go @@ -222,6 +222,15 @@ func (suite *grpcQueryTestSuite) SetupTest() { NewCDPGenStateMulti(cdc), NewPricefeedGenStateMultiFromTime(cdc, suite.genesisTime), ) + + suite.tApp.DeleteGenesisValidator(suite.T(), suite.ctx) + claims := suite.keeper.GetAllDelegatorClaims(suite.ctx) + for _, claim := range claims { + // Delete the InitGenesis validator's claim + if !claim.Owner.Equals(suite.addrs[2]) { + suite.keeper.DeleteDelegatorClaim(suite.ctx, claim.Owner) + } + } } func (suite *grpcQueryTestSuite) TestGrpcQueryParams() { diff --git a/x/incentive/keeper/hooks.go b/x/incentive/keeper/hooks.go index a7cfc6ec..c5b17477 100644 --- a/x/incentive/keeper/hooks.go +++ b/x/incentive/keeper/hooks.go @@ -95,67 +95,84 @@ When delegated tokens (to bonded validators) are changed: */ // BeforeDelegationCreated runs before a delegation is created -func (h Hooks) BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) { +func (h Hooks) BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error { // Add a claim if one doesn't exist, otherwise sync the existing. h.k.InitializeDelegatorReward(ctx, delAddr) + + return nil } // BeforeDelegationSharesModified runs before an existing delegation is modified -func (h Hooks) BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) { +func (h Hooks) BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error { // Sync rewards based on total delegated to bonded validators. h.k.SynchronizeDelegatorRewards(ctx, delAddr, nil, false) + + return nil } // BeforeValidatorSlashed is called before a validator is slashed // Validator status is not updated when Slash or Jail is called -func (h Hooks) BeforeValidatorSlashed(ctx sdk.Context, valAddr sdk.ValAddress, fraction sdk.Dec) { +func (h Hooks) BeforeValidatorSlashed(ctx sdk.Context, valAddr sdk.ValAddress, fraction sdk.Dec) error { // Sync all claims for users delegated to this validator. // For each claim, sync based on the total delegated to bonded validators. for _, delegation := range h.k.stakingKeeper.GetValidatorDelegations(ctx, valAddr) { h.k.SynchronizeDelegatorRewards(ctx, delegation.GetDelegatorAddr(), nil, false) } + + return nil } // AfterValidatorBeginUnbonding is called after a validator begins unbonding // Validator status is set to Unbonding prior to hook running -func (h Hooks) AfterValidatorBeginUnbonding(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) { +func (h Hooks) AfterValidatorBeginUnbonding(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error { // Sync all claims for users delegated to this validator. // For each claim, sync based on the total delegated to bonded validators, and also delegations to valAddr. // valAddr's status has just been set to Unbonding, but we want to include delegations to it in the sync. for _, delegation := range h.k.stakingKeeper.GetValidatorDelegations(ctx, valAddr) { h.k.SynchronizeDelegatorRewards(ctx, delegation.GetDelegatorAddr(), valAddr, true) } + + return nil } // AfterValidatorBonded is called after a validator is bonded // Validator status is set to Bonded prior to hook running -func (h Hooks) AfterValidatorBonded(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) { +func (h Hooks) AfterValidatorBonded(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error { // Sync all claims for users delegated to this validator. // For each claim, sync based on the total delegated to bonded validators, except for delegations to valAddr. // valAddr's status has just been set to Bonded, but we don't want to include delegations to it in the sync for _, delegation := range h.k.stakingKeeper.GetValidatorDelegations(ctx, valAddr) { h.k.SynchronizeDelegatorRewards(ctx, delegation.GetDelegatorAddr(), valAddr, false) } + + return nil } // NOTE: following hooks are just implemented to ensure StakingHooks interface compliance // AfterDelegationModified runs after a delegation is modified -func (h Hooks) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) { +func (h Hooks) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error { + return nil } // BeforeDelegationRemoved runs directly before a delegation is deleted. BeforeDelegationSharesModified is run prior to this. -func (h Hooks) BeforeDelegationRemoved(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) { +func (h Hooks) BeforeDelegationRemoved(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error { + return nil } // AfterValidatorCreated runs after a validator is created -func (h Hooks) AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress) {} +func (h Hooks) AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress) error { + return nil +} // BeforeValidatorModified runs before a validator is modified -func (h Hooks) BeforeValidatorModified(ctx sdk.Context, valAddr sdk.ValAddress) {} +func (h Hooks) BeforeValidatorModified(ctx sdk.Context, valAddr sdk.ValAddress) error { + return nil +} // AfterValidatorRemoved runs after a validator is removed -func (h Hooks) AfterValidatorRemoved(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) { +func (h Hooks) AfterValidatorRemoved(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error { + return nil } // ------------------- Swap Module Hooks ------------------- diff --git a/x/incentive/keeper/keeper.go b/x/incentive/keeper/keeper.go index dd9e9e06..8571aa86 100644 --- a/x/incentive/keeper/keeper.go +++ b/x/incentive/keeper/keeper.go @@ -5,6 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/store/prefix" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/kava-labs/kava/x/incentive/types" @@ -13,7 +14,7 @@ import ( // Keeper keeper for the incentive module type Keeper struct { cdc codec.Codec - key sdk.StoreKey + key storetypes.StoreKey paramSubspace types.ParamSubspace accountKeeper types.AccountKeeper bankKeeper types.BankKeeper @@ -33,7 +34,7 @@ type Keeper struct { // NewKeeper creates a new keeper func NewKeeper( - cdc codec.Codec, key sdk.StoreKey, paramstore types.ParamSubspace, bk types.BankKeeper, + cdc codec.Codec, key storetypes.StoreKey, paramstore types.ParamSubspace, bk types.BankKeeper, cdpk types.CdpKeeper, hk types.HardKeeper, ak types.AccountKeeper, stk types.StakingKeeper, swpk types.SwapKeeper, svk types.SavingsKeeper, lqk types.LiquidKeeper, ek types.EarnKeeper, mk types.MintKeeper, dk types.DistrKeeper, pfk types.PricefeedKeeper, diff --git a/x/incentive/keeper/msg_server_delegator_test.go b/x/incentive/keeper/msg_server_delegator_test.go index a81ce6fc..11729c60 100644 --- a/x/incentive/keeper/msg_server_delegator_test.go +++ b/x/incentive/keeper/msg_server_delegator_test.go @@ -26,6 +26,10 @@ func (suite *HandlerTestSuite) TestPayoutDelegatorClaimMultiDenom() { suite.NoError( suite.DeliverMsgCreateValidator(sdk.ValAddress(userAddr), c("ukava", 1e9)), ) + + // Delete genesis validator to not influence rewards + suite.App.DeleteGenesisValidator(suite.T(), suite.Ctx) + // new block required to bond validator suite.NextBlockAfter(7 * time.Second) // Now the delegation is bonded, accumulate some delegator rewards @@ -73,6 +77,10 @@ func (suite *HandlerTestSuite) TestPayoutDelegatorClaimSingleDenom() { suite.NoError( suite.DeliverMsgCreateValidator(sdk.ValAddress(userAddr), c("ukava", 1e9)), ) + + // Delete genesis validator to not influence rewards + suite.App.DeleteGenesisValidator(suite.T(), suite.Ctx) + // new block required to bond validator suite.NextBlockAfter(7 * time.Second) // Now the delegation is bonded, accumulate some delegator rewards diff --git a/x/incentive/keeper/msg_server_earn_test.go b/x/incentive/keeper/msg_server_earn_test.go index aab483f5..daf9018f 100644 --- a/x/incentive/keeper/msg_server_earn_test.go +++ b/x/incentive/keeper/msg_server_earn_test.go @@ -9,6 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/distribution" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" "github.com/cosmos/cosmos-sdk/x/mint" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" earntypes "github.com/kava-labs/kava/x/earn/types" "github.com/kava-labs/kava/x/incentive" "github.com/kava-labs/kava/x/incentive/testutil" @@ -141,6 +142,7 @@ func (suite *HandlerTestSuite) TestEarnLiquidClaim() { mint.BeginBlocker( suite.Ctx, suite.App.GetMintKeeper(), + minttypes.DefaultInflationCalculationFn, ) // Distribute to validators, block needs votes distribution.BeginBlocker( @@ -212,10 +214,24 @@ func (suite *HandlerTestSuite) TestEarnLiquidClaim() { AmountOf("ukava"). Mul(sdk.NewDec(99)). Quo(sdk.NewDec(100)). - TruncateInt() - suite.BalanceEquals(userAddr2, preClaimBal2.Add(sdk.NewCoin("ukava", stakingRewards2))) + RoundInt() - suite.Equal(delegationRewards.AmountOf("ukava").TruncateInt(), stakingRewards1.Add(stakingRewards2)) + suite.BalanceInEpsilon( + userAddr2, + preClaimBal2.Add(sdk.NewCoin("ukava", stakingRewards2)), + // Highest precision to allow 1ukava margin of error + // 820778117815 vs 820778117814 + 1e-11, + ) + + suite.InEpsilonf( + delegationRewards.AmountOf("ukava").RoundInt().Int64(), + stakingRewards1.Add(stakingRewards2).Int64(), + 1e-11, + "expected rewards should add up to staking rewards within a margin of error (%v vs %v)", + delegationRewards.AmountOf("ukava").RoundInt().Int64(), + stakingRewards1.Add(stakingRewards2).Int64(), + ) // Check that claimed coins have been removed from a claim's reward suite.EarnRewardEquals(userAddr1, cs()) diff --git a/x/incentive/keeper/querier.go b/x/incentive/keeper/querier.go index f94352ee..39e1076d 100644 --- a/x/incentive/keeper/querier.go +++ b/x/incentive/keeper/querier.go @@ -432,8 +432,8 @@ func GetStakingAPR(ctx sdk.Context, k Keeper, params types.Params) (sdk.Dec, err // Staking APR = (Inflation Rate * (1 - Community Tax)) / (Bonded Tokens / Circulating Supply) stakingAPR := inflationRate. Mul(sdk.OneDec().Sub(communityTax)). - Quo(bondedTokens.ToDec(). - Quo(circulatingSupply.Amount.ToDec())) + Quo(sdk.NewDecFromInt(bondedTokens). + Quo(sdk.NewDecFromInt(circulatingSupply.Amount))) // Get incentive APR bkavaRewardPeriod, found := params.EarnRewardPeriods.GetMultiRewardPeriod(liquidtypes.DefaultDerivativeDenom) @@ -500,7 +500,7 @@ func GetAPYFromMultiRewardPeriod( } // Total USD value of the collateral type total supply - totalSupplyUSDValue := totalSupply.ToDec().Mul(collateralUSDValue.Price) + totalSupplyUSDValue := sdk.NewDecFromInt(totalSupply).Mul(collateralUSDValue.Price) totalUSDRewardsPerSecond := sdk.ZeroDec() @@ -514,7 +514,7 @@ func GetAPYFromMultiRewardPeriod( return sdk.ZeroDec(), fmt.Errorf("failed to get price for RewardsPerSecond asset %s: %w", reward.Denom, err) } - rewardPerSecond := reward.Amount.ToDec().Mul(rewardDenomUSDValue.Price) + rewardPerSecond := sdk.NewDecFromInt(reward.Amount).Mul(rewardDenomUSDValue.Price) totalUSDRewardsPerSecond = totalUSDRewardsPerSecond.Add(rewardPerSecond) } diff --git a/x/incentive/keeper/rewards_borrow.go b/x/incentive/keeper/rewards_borrow.go index a4edb690..7ac24b07 100644 --- a/x/incentive/keeper/rewards_borrow.go +++ b/x/incentive/keeper/rewards_borrow.go @@ -60,7 +60,7 @@ func (k Keeper) getHardBorrowTotalSourceShares(ctx sdk.Context, denom string) sd } // return borrowed/factor to get the "pre interest" value of the current total borrowed - return totalBorrowed.ToDec().Quo(interestFactor) + return sdk.NewDecFromInt(totalBorrowed).Quo(interestFactor) } // InitializeHardBorrowReward initializes the borrow-side of a hard liquidity provider claim diff --git a/x/incentive/keeper/rewards_delegator.go b/x/incentive/keeper/rewards_delegator.go index c8926abe..77d58a17 100644 --- a/x/incentive/keeper/rewards_delegator.go +++ b/x/incentive/keeper/rewards_delegator.go @@ -40,7 +40,7 @@ func (k Keeper) AccumulateDelegatorRewards(ctx sdk.Context, rewardPeriod types.M func (k Keeper) getDelegatorTotalSourceShares(ctx sdk.Context, denom string) sdk.Dec { totalBonded := k.stakingKeeper.TotalBondedTokens(ctx) - return totalBonded.ToDec() + return sdk.NewDecFromInt(totalBonded) } // InitializeDelegatorReward initializes the reward index of a delegator claim diff --git a/x/incentive/keeper/rewards_delegator_sync_test.go b/x/incentive/keeper/rewards_delegator_sync_test.go index 7666eba2..829aacae 100644 --- a/x/incentive/keeper/rewards_delegator_sync_test.go +++ b/x/incentive/keeper/rewards_delegator_sync_test.go @@ -247,7 +247,7 @@ func unslashedBondedValidator(address sdk.ValAddress) stakingtypes.Validator { // Set the tokens and shares equal so then // a _delegator's_ token amount is equal to their shares amount Tokens: i(1e12), - DelegatorShares: i(1e12).ToDec(), + DelegatorShares: sdk.NewDec(1e12), } } @@ -259,7 +259,7 @@ func unslashedNotBondedValidator(address sdk.ValAddress) stakingtypes.Validator // Set the tokens and shares equal so then // a _delegator's_ token amount is equal to their shares amount Tokens: i(1e12), - DelegatorShares: i(1e12).ToDec(), + DelegatorShares: sdk.NewDec(1e12), } } diff --git a/x/incentive/keeper/rewards_delegator_test.go b/x/incentive/keeper/rewards_delegator_test.go index 79ad9c8f..bb2802ad 100644 --- a/x/incentive/keeper/rewards_delegator_test.go +++ b/x/incentive/keeper/rewards_delegator_test.go @@ -142,6 +142,9 @@ func (suite *DelegatorRewardsTestSuite) TestAccumulateDelegatorRewards() { err = suite.deliverMsgDelegate(suite.ctx, suite.addrs[0], suite.validatorAddrs[0], tc.args.delegation) suite.Require().NoError(err) + // Delete genesis validator to not influence rewards + suite.app.DeleteGenesisValidator(suite.T(), suite.ctx) + staking.EndBlocker(suite.ctx, suite.stakingKeeper) // Set up chain context at future time @@ -241,6 +244,9 @@ func (suite *DelegatorRewardsTestSuite) TestSynchronizeDelegatorReward() { suite.Require().NoError(err) staking.EndBlocker(suite.ctx, suite.stakingKeeper) + // Delete genesis validator to not influence rewards + suite.app.DeleteGenesisValidator(suite.T(), suite.ctx) + // Delegator delegates err = suite.deliverMsgDelegate(suite.ctx, suite.addrs[0], suite.validatorAddrs[0], tc.args.delegation) suite.Require().NoError(err) @@ -364,6 +370,9 @@ func (suite *DelegatorRewardsTestSuite) TestSimulateDelegatorRewardSynchronizati err = suite.deliverMsgDelegate(suite.ctx, suite.addrs[0], suite.validatorAddrs[0], tc.args.delegation) suite.Require().NoError(err) + // Delete genesis validator to not influence rewards + suite.app.DeleteGenesisValidator(suite.T(), suite.ctx) + staking.EndBlocker(suite.ctx, suite.stakingKeeper) // Check that Staking hooks initialized a DelegatorClaim @@ -422,8 +431,8 @@ func (suite *DelegatorRewardsTestSuite) deliverMsgCreateValidator(ctx sdk.Contex return err } - handleStakingMsg := staking.NewHandler(suite.stakingKeeper) - _, err = handleStakingMsg(ctx, msg) + msgServer := stakingkeeper.NewMsgServerImpl(suite.stakingKeeper) + _, err = msgServer.CreateValidator(sdk.WrapSDKContext(suite.ctx), msg) return err } @@ -434,8 +443,8 @@ func (suite *DelegatorRewardsTestSuite) deliverMsgDelegate(ctx sdk.Context, dele amount, ) - handleStakingMsg := staking.NewHandler(suite.stakingKeeper) - _, err := handleStakingMsg(ctx, msg) + msgServer := stakingkeeper.NewMsgServerImpl(suite.stakingKeeper) + _, err := msgServer.Delegate(sdk.WrapSDKContext(suite.ctx), msg) return err } @@ -446,8 +455,9 @@ func (suite *DelegatorRewardsTestSuite) deliverMsgRedelegate(ctx sdk.Context, de destinationValidator, amount, ) - handleStakingMsg := staking.NewHandler(suite.stakingKeeper) - _, err := handleStakingMsg(ctx, msg) + + msgServer := stakingkeeper.NewMsgServerImpl(suite.stakingKeeper) + _, err := msgServer.BeginRedelegate(sdk.WrapSDKContext(suite.ctx), msg) return err } @@ -749,6 +759,9 @@ func (suite *DelegatorRewardsTestSuite) TestRedelegationSyncsClaim() { err = suite.deliverMsgCreateValidator(suite.ctx, suite.validatorAddrs[1], c(bondDenom, 5_000_000)) suite.Require().NoError(err) + // Delete genesis validator to not influence rewards + suite.app.DeleteGenesisValidator(suite.T(), suite.ctx) + // Delegatefrom the test user. This will initialize their incentive claim. err = suite.deliverMsgDelegate(suite.ctx, suite.addrs[0], suite.validatorAddrs[0], c(bondDenom, 1_000_000)) suite.Require().NoError(err) diff --git a/x/incentive/keeper/rewards_earn.go b/x/incentive/keeper/rewards_earn.go index 34dd8c46..11f92ff7 100644 --- a/x/incentive/keeper/rewards_earn.go +++ b/x/incentive/keeper/rewards_earn.go @@ -50,9 +50,9 @@ func GetProportionalRewardsPerSecond( } for _, rewardCoin := range rewardPeriod.RewardsPerSecond { - scaledAmount := rewardCoin.Amount.ToDec(). - Mul(singleBkavaSupply.ToDec()). - Quo(totalBkavaSupply.ToDec()) + scaledAmount := sdk.NewDecFromInt(rewardCoin.Amount). + Mul(sdk.NewDecFromInt(singleBkavaSupply)). + Quo(sdk.NewDecFromInt(totalBkavaSupply)) newRate = newRate.Add(sdk.NewDecCoinFromDec(rewardCoin.Denom, scaledAmount)) } @@ -179,7 +179,18 @@ func (k Keeper) collectDerivativeStakingRewards(ctx sdk.Context, collateralType // otherwise there's no validator or delegation yet rewards = nil } - return sdk.NewDecCoinsFromCoins(rewards...) + + // Bug with NewDecCoinsFromCoins when calling passing 0 amount Coin, see + // https://github.com/cosmos/cosmos-sdk/pull/12903 + // Fix is in Cosmos-SDK v0.47.0 + var decCoins sdk.DecCoins + for _, coin := range rewards { + if coin.IsValid() { + decCoins = append(decCoins, sdk.NewDecCoinFromCoin(coin)) + } + } + + return decCoins } func (k Keeper) collectPerSecondRewards( diff --git a/x/incentive/keeper/rewards_earn_accum_integration_test.go b/x/incentive/keeper/rewards_earn_accum_integration_test.go index 51e3dfa0..df7d7282 100644 --- a/x/incentive/keeper/rewards_earn_accum_integration_test.go +++ b/x/incentive/keeper/rewards_earn_accum_integration_test.go @@ -168,15 +168,13 @@ func (suite *AccumulateEarnRewardsIntegrationTests) TestStateUpdatedWhenBlockTim suite.StoredEarnTimeEquals(derivative0.Denom, suite.Ctx.BlockTime()) suite.StoredEarnTimeEquals(derivative1.Denom, suite.Ctx.BlockTime()) - stakingRewardIndexes0 := validatorRewards[suite.valAddrs[0].String()]. - AmountOf("ukava"). - ToDec(). - Quo(derivative0.Amount.ToDec()) + stakingRewardIndexes0 := sdk.NewDecFromInt(validatorRewards[suite.valAddrs[0].String()]. + AmountOf("ukava")). + Quo(sdk.NewDecFromInt(derivative0.Amount)) - stakingRewardIndexes1 := validatorRewards[suite.valAddrs[1].String()]. - AmountOf("ukava"). - ToDec(). - Quo(derivative1.Amount.ToDec()) + stakingRewardIndexes1 := sdk.NewDecFromInt(validatorRewards[suite.valAddrs[1].String()]. + AmountOf("ukava")). + Quo(sdk.NewDecFromInt(derivative1.Amount)) suite.StoredEarnIndexesEqual(derivative0.Denom, types.RewardIndexes{ { @@ -295,15 +293,13 @@ func (suite *AccumulateEarnRewardsIntegrationTests) TestStateUpdatedWhenBlockTim suite.StoredEarnTimeEquals(derivative1.Denom, suite.Ctx.BlockTime()) // Divided by deposit amounts, not bank supply amounts - stakingRewardIndexes0 := validatorRewards[suite.valAddrs[0].String()]. - AmountOf("ukava"). - ToDec(). - Quo(depositAmount0.Amount.ToDec()) + stakingRewardIndexes0 := sdk.NewDecFromInt(validatorRewards[suite.valAddrs[0].String()]. + AmountOf("ukava")). + Quo(sdk.NewDecFromInt(depositAmount0.Amount)) - stakingRewardIndexes1 := validatorRewards[suite.valAddrs[1].String()]. - AmountOf("ukava"). - ToDec(). - Quo(depositAmount1.Amount.ToDec()) + stakingRewardIndexes1 := sdk.NewDecFromInt(validatorRewards[suite.valAddrs[1].String()]. + AmountOf("ukava")). + Quo(sdk.NewDecFromInt(depositAmount1.Amount)) // Slightly increased rewards due to less bkava deposited suite.StoredEarnIndexesEqual(derivative0.Denom, types.RewardIndexes{ @@ -536,15 +532,13 @@ func (suite *AccumulateEarnRewardsIntegrationTests) TestStateAddedWhenStateDoesN validatorRewards0, _ := suite.GetBeginBlockClaimedStakingRewards(resBeginBlock) - firstStakingRewardIndexes0 := validatorRewards0[suite.valAddrs[0].String()]. - AmountOf("ukava"). - ToDec(). - Quo(derivative0.Amount.ToDec()) + firstStakingRewardIndexes0 := sdk.NewDecFromInt(validatorRewards0[suite.valAddrs[0].String()]. + AmountOf("ukava")). + Quo(sdk.NewDecFromInt(derivative0.Amount)) - firstStakingRewardIndexes1 := validatorRewards0[suite.valAddrs[1].String()]. - AmountOf("ukava"). - ToDec(). - Quo(derivative1.Amount.ToDec()) + firstStakingRewardIndexes1 := sdk.NewDecFromInt(validatorRewards0[suite.valAddrs[1].String()]. + AmountOf("ukava")). + Quo(sdk.NewDecFromInt(derivative1.Amount)) // After the first accumulation only the current block time should be stored. // The indexes will be empty as no time has passed since the previous block because it didn't exist. @@ -590,15 +584,13 @@ func (suite *AccumulateEarnRewardsIntegrationTests) TestStateAddedWhenStateDoesN validatorRewards1, _ := suite.GetBeginBlockClaimedStakingRewards(resBeginBlock) - secondStakingRewardIndexes0 := validatorRewards1[suite.valAddrs[0].String()]. - AmountOf("ukava"). - ToDec(). - Quo(derivative0.Amount.ToDec()) + secondStakingRewardIndexes0 := sdk.NewDecFromInt(validatorRewards1[suite.valAddrs[0].String()]. + AmountOf("ukava")). + Quo(sdk.NewDecFromInt(derivative0.Amount)) - secondStakingRewardIndexes1 := validatorRewards1[suite.valAddrs[1].String()]. - AmountOf("ukava"). - ToDec(). - Quo(derivative1.Amount.ToDec()) + secondStakingRewardIndexes1 := sdk.NewDecFromInt(validatorRewards1[suite.valAddrs[1].String()]. + AmountOf("ukava")). + Quo(sdk.NewDecFromInt(derivative1.Amount)) // Second accumulation has both staking rewards and incentive rewards // ukava incentive rewards: 3600 * 1000 / (2 * 1000000) == 1.8 diff --git a/x/incentive/keeper/rewards_earn_accum_test.go b/x/incentive/keeper/rewards_earn_accum_test.go index 29ea56d1..c83e47ed 100644 --- a/x/incentive/keeper/rewards_earn_accum_test.go +++ b/x/incentive/keeper/rewards_earn_accum_test.go @@ -4,6 +4,7 @@ import ( "testing" "time" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/suite" earntypes "github.com/kava-labs/kava/x/earn/types" @@ -260,10 +261,10 @@ func (suite *AccumulateEarnRewardsTests) TestStateUpdatedWhenBlockTimeHasIncreas { CollateralType: "ukava", RewardFactor: d("4.154285714285714286"). // base incentive - Add(vaultDenom1Supply.ToDec(). // staking rewards - QuoInt64(10). - MulInt64(3600). - Quo(vault1Shares), + Add(sdk.NewDecFromInt(vaultDenom1Supply). // staking rewards + QuoInt64(10). + MulInt64(3600). + Quo(vault1Shares), ), }, }) @@ -291,7 +292,7 @@ func (suite *AccumulateEarnRewardsTests) TestStateUpdatedWhenBlockTimeHasIncreas { CollateralType: "ukava", RewardFactor: d("7.24"). - Add(vaultDenom2Supply.ToDec(). + Add(sdk.NewDecFromInt(vaultDenom2Supply). QuoInt64(10). MulInt64(3600). Quo(vault2Shares), diff --git a/x/incentive/keeper/rewards_earn_staking_integration_test.go b/x/incentive/keeper/rewards_earn_staking_integration_test.go index f909bc42..a7e14d33 100644 --- a/x/incentive/keeper/rewards_earn_staking_integration_test.go +++ b/x/incentive/keeper/rewards_earn_staking_integration_test.go @@ -166,15 +166,13 @@ func (suite *EarnStakingRewardsIntegrationTestSuite) TestStakingRewardsDistribut // Total staking rewards / total source shares (**deposited in earn** not total minted) // types.RewardIndexes.Quo() uses Dec.Quo() which uses bankers rounding. // So we need to use Dec.Quo() to also round vs Dec.QuoInt() which truncates - expectedIndexes1 := validatorRewards[suite.valAddrs[0].String()]. - AmountOf("ukava"). - ToDec(). - Quo(userDepositAmount0.ToDec()) + expectedIndexes1 := sdk.NewDecFromInt(validatorRewards[suite.valAddrs[0].String()]. + AmountOf("ukava")). + Quo(sdk.NewDecFromInt(userDepositAmount0)) - expectedIndexes2 := validatorRewards[suite.valAddrs[1].String()]. - AmountOf("ukava"). - ToDec(). - Quo(userDepositAmount1.ToDec()) + expectedIndexes2 := sdk.NewDecFromInt(validatorRewards[suite.valAddrs[1].String()]. + AmountOf("ukava")). + Quo(sdk.NewDecFromInt(userDepositAmount1)) // Only contains staking rewards suite.StoredEarnIndexesEqual(vaultDenom1, types.RewardIndexes{ diff --git a/x/incentive/keeper/rewards_earn_staking_test.go b/x/incentive/keeper/rewards_earn_staking_test.go index c4fdc62b..5df7ed17 100644 --- a/x/incentive/keeper/rewards_earn_staking_test.go +++ b/x/incentive/keeper/rewards_earn_staking_test.go @@ -3,6 +3,7 @@ package keeper_test import ( "time" + sdk "github.com/cosmos/cosmos-sdk/types" earntypes "github.com/kava-labs/kava/x/earn/types" "github.com/kava-labs/kava/x/incentive/types" ) @@ -83,7 +84,7 @@ func (suite *AccumulateEarnRewardsTests) TestStakingRewardsDistributed() { { CollateralType: "ukava", RewardFactor: initialVault1RewardFactor. - Add(vaultDenom1Supply.ToDec(). + Add(sdk.NewDecFromInt(vaultDenom1Supply). QuoInt64(10). MulInt64(3600). Quo(vault1Shares)), @@ -94,7 +95,7 @@ func (suite *AccumulateEarnRewardsTests) TestStakingRewardsDistributed() { { CollateralType: "ukava", RewardFactor: initialVault2RewardFactor. - Add(vaultDenom2Supply.ToDec(). + Add(sdk.NewDecFromInt(vaultDenom2Supply). QuoInt64(10). MulInt64(3600). Quo(vault2Shares)), diff --git a/x/incentive/keeper/rewards_savings.go b/x/incentive/keeper/rewards_savings.go index 517647a8..1b843bdf 100644 --- a/x/incentive/keeper/rewards_savings.go +++ b/x/incentive/keeper/rewards_savings.go @@ -27,7 +27,7 @@ func (k Keeper) AccumulateSavingsRewards(ctx sdk.Context, rewardPeriod types.Mul maccCoins := k.bankKeeper.GetAllBalances(ctx, savingsMacc.GetAddress()) denomBalance := maccCoins.AmountOf(rewardPeriod.CollateralType) - acc.Accumulate(rewardPeriod, denomBalance.ToDec(), ctx.BlockTime()) + acc.Accumulate(rewardPeriod, sdk.NewDecFromInt(denomBalance), ctx.BlockTime()) k.SetSavingsRewardAccrualTime(ctx, rewardPeriod.CollateralType, acc.PreviousAccumulationTime) @@ -78,7 +78,7 @@ func (k Keeper) SynchronizeSavingsReward(ctx sdk.Context, deposit savingstypes.D // Existing denoms have their reward indexes + reward amount synced existingDenoms := setDifference(getDenoms(deposit.Amount), incomingDenoms) for _, denom := range existingDenoms { - claim = k.synchronizeSingleSavingsReward(ctx, claim, denom, deposit.Amount.AmountOf(denom).ToDec()) + claim = k.synchronizeSingleSavingsReward(ctx, claim, denom, sdk.NewDecFromInt(deposit.Amount.AmountOf(denom))) } k.SetSavingsClaim(ctx, claim) @@ -133,7 +133,7 @@ func (k Keeper) GetSynchronizedSavingsClaim(ctx sdk.Context, owner sdk.AccAddres } for _, coin := range deposit.Amount { - claim = k.synchronizeSingleSavingsReward(ctx, claim, coin.Denom, coin.Amount.ToDec()) + claim = k.synchronizeSingleSavingsReward(ctx, claim, coin.Denom, sdk.NewDecFromInt(coin.Amount)) } return claim, true diff --git a/x/incentive/keeper/rewards_supply.go b/x/incentive/keeper/rewards_supply.go index 734ef85f..bc97694b 100644 --- a/x/incentive/keeper/rewards_supply.go +++ b/x/incentive/keeper/rewards_supply.go @@ -53,7 +53,7 @@ func (k Keeper) getHardSupplyTotalSourceShares(ctx sdk.Context, denom string) sd } // return supplied/factor to get the "pre interest" value of the current total supplied - return totalSupplied.ToDec().Quo(interestFactor) + return sdk.NewDecFromInt(totalSupplied).Quo(interestFactor) } // InitializeHardSupplyReward initializes the supply-side of a hard liquidity provider claim @@ -219,7 +219,7 @@ func (k Keeper) SimulateHardSynchronization(ctx sdk.Context, claim types.HardLiq if !found { continue } - newRewardsAmount := rewardsAccumulatedFactor.Mul(deposit.Amount.AmountOf(ri.CollateralType).ToDec()).RoundInt() + newRewardsAmount := rewardsAccumulatedFactor.Mul(sdk.NewDecFromInt(deposit.Amount.AmountOf(ri.CollateralType))).RoundInt() if newRewardsAmount.IsZero() || newRewardsAmount.IsNegative() { continue } @@ -269,7 +269,7 @@ func (k Keeper) SimulateHardSynchronization(ctx sdk.Context, claim types.HardLiq if !found { continue } - newRewardsAmount := rewardsAccumulatedFactor.Mul(borrow.Amount.AmountOf(ri.CollateralType).ToDec()).RoundInt() + newRewardsAmount := rewardsAccumulatedFactor.Mul(sdk.NewDecFromInt(borrow.Amount.AmountOf(ri.CollateralType))).RoundInt() if newRewardsAmount.IsZero() || newRewardsAmount.IsNegative() { continue } diff --git a/x/incentive/keeper/rewards_swap.go b/x/incentive/keeper/rewards_swap.go index 2a1fb508..85b68de1 100644 --- a/x/incentive/keeper/rewards_swap.go +++ b/x/incentive/keeper/rewards_swap.go @@ -41,7 +41,7 @@ func (k Keeper) getSwapTotalSourceShares(ctx sdk.Context, poolID string) sdk.Dec if !found { totalShares = sdk.ZeroInt() } - return totalShares.ToDec() + return sdk.NewDecFromInt(totalShares) } // InitializeSwapReward creates a new claim with zero rewards and indexes matching the global indexes. @@ -94,7 +94,7 @@ func (k *Keeper) synchronizeSwapReward(ctx sdk.Context, claim types.SwapClaim, p userRewardIndexes = types.RewardIndexes{} } - newRewards, err := k.CalculateRewards(userRewardIndexes, globalRewardIndexes, shares.ToDec()) + newRewards, err := k.CalculateRewards(userRewardIndexes, globalRewardIndexes, sdk.NewDecFromInt(shares)) if err != nil { // Global reward factors should never decrease, as it would lead to a negative update to claim.Rewards. // This panics if a global reward factor decreases or disappears between the old and new indexes. diff --git a/x/incentive/keeper/rewards_usdx.go b/x/incentive/keeper/rewards_usdx.go index c5d5a78f..ada24147 100644 --- a/x/incentive/keeper/rewards_usdx.go +++ b/x/incentive/keeper/rewards_usdx.go @@ -51,7 +51,7 @@ func (k Keeper) getUSDXTotalSourceShares(ctx sdk.Context, collateralType string) cdpFactor = sdk.OneDec() } // return debt/factor to get the "pre interest" value of the current total debt - return totalPrincipal.ToDec().Quo(cdpFactor) + return sdk.NewDecFromInt(totalPrincipal).Quo(cdpFactor) } // InitializeUSDXMintingClaim creates or updates a claim such that no new rewards are accrued, but any existing rewards are not lost. @@ -158,7 +158,7 @@ func (k Keeper) SimulateUSDXMintingSynchronization(ctx sdk.Context, claim types. if !found { continue } - newRewardsAmount := rewardsAccumulatedFactor.Mul(cdp.GetTotalPrincipal().Amount.ToDec()).RoundInt() + newRewardsAmount := rewardsAccumulatedFactor.Mul(sdk.NewDecFromInt(cdp.GetTotalPrincipal().Amount)).RoundInt() if newRewardsAmount.IsZero() { continue } diff --git a/x/incentive/keeper/rewards_usdx_unit_test.go b/x/incentive/keeper/rewards_usdx_unit_test.go index 3f1a23aa..d1ae2437 100644 --- a/x/incentive/keeper/rewards_usdx_unit_test.go +++ b/x/incentive/keeper/rewards_usdx_unit_test.go @@ -272,7 +272,7 @@ func (builder CDPBuilder) WithSourceShares(shares int64) CDPBuilder { principal := sdk.NewInt(shares).Mul(factor) builder.Principal = sdk.NewCoin(cdptypes.DefaultStableDenom, principal) - builder.InterestFactor = factor.ToDec() + builder.InterestFactor = sdk.NewDecFromInt(factor) return builder } diff --git a/x/incentive/keeper/unit_test.go b/x/incentive/keeper/unit_test.go index a7db3b47..95dad647 100644 --- a/x/incentive/keeper/unit_test.go +++ b/x/incentive/keeper/unit_test.go @@ -7,6 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/store" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" @@ -27,12 +28,12 @@ import ( ) // NewTestContext sets up a basic context with an in-memory db -func NewTestContext(requiredStoreKeys ...sdk.StoreKey) sdk.Context { +func NewTestContext(requiredStoreKeys ...storetypes.StoreKey) sdk.Context { memDB := db.NewMemDB() cms := store.NewCommitMultiStore(memDB) for _, key := range requiredStoreKeys { - cms.MountStoreWithDB(key, sdk.StoreTypeIAVL, nil) + cms.MountStoreWithDB(key, storetypes.StoreTypeIAVL, nil) } if err := cms.LoadLatestVersion(); err != nil { @@ -50,7 +51,7 @@ type unitTester struct { ctx sdk.Context cdc codec.Codec - incentiveStoreKey sdk.StoreKey + incentiveStoreKey storetypes.StoreKey } func (suite *unitTester) SetupSuite() { @@ -141,7 +142,7 @@ func (suite *unitTester) storeEarnClaim(claim types.EarnClaim) { type TestKeeperBuilder struct { cdc codec.Codec - key sdk.StoreKey + key storetypes.StoreKey paramSubspace types.ParamSubspace accountKeeper types.AccountKeeper bankKeeper types.BankKeeper diff --git a/x/incentive/module.go b/x/incentive/module.go index 6da80f70..b98e7661 100644 --- a/x/incentive/module.go +++ b/x/incentive/module.go @@ -4,7 +4,6 @@ import ( "context" "encoding/json" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" @@ -17,7 +16,6 @@ import ( abci "github.com/tendermint/tendermint/abci/types" "github.com/kava-labs/kava/x/incentive/client/cli" - "github.com/kava-labs/kava/x/incentive/client/rest" "github.com/kava-labs/kava/x/incentive/keeper" "github.com/kava-labs/kava/x/incentive/types" ) @@ -62,11 +60,6 @@ func (a AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry types.RegisterInterfaces(registry) } -// RegisterRESTRoutes registers REST routes for the incentive module. -func (a AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) { - rest.RegisterRoutes(clientCtx, rtr) -} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the incentive module. func (a AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { diff --git a/x/incentive/types/claims_test.go b/x/incentive/types/claims_test.go index 0e147e2f..ae0fb588 100644 --- a/x/incentive/types/claims_test.go +++ b/x/incentive/types/claims_test.go @@ -334,7 +334,14 @@ func TestRewardIndexes(t *testing.T) { for _, tc := range testcases { t.Run(tc.name, func(t *testing.T) { - require.Equal(t, tc.expected, tc.rewardIndexes.Mul(tc.multiplier)) + // require.Equal() fails with zero values abs: and abs: {} + + for i := range tc.rewardIndexes { + require.True(t, + tc.expected[i].RewardFactor. + Equal(tc.rewardIndexes[i].RewardFactor.Mul(tc.multiplier)), + ) + } }) } }) diff --git a/x/incentive/types/msg.go b/x/incentive/types/msg.go index bcaa1b66..78b8cd00 100644 --- a/x/incentive/types/msg.go +++ b/x/incentive/types/msg.go @@ -3,7 +3,7 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/x/auth/legacy/legacytx" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" ) const MaxDenomsToClaim = 1000 diff --git a/x/incentive/types/params.go b/x/incentive/types/params.go index 05184a7f..decf2376 100644 --- a/x/incentive/types/params.go +++ b/x/incentive/types/params.go @@ -207,6 +207,11 @@ func (rp RewardPeriod) Validate() error { if !rp.RewardsPerSecond.IsValid() { return fmt.Errorf("invalid reward amount: %s", rp.RewardsPerSecond) } + + if rp.RewardsPerSecond.Amount.IsZero() { + return fmt.Errorf("reward amount cannot be zero: %v", rp.RewardsPerSecond) + } + if strings.TrimSpace(rp.CollateralType) == "" { return fmt.Errorf("reward period collateral type cannot be blank: %v", rp) } @@ -257,6 +262,8 @@ func (mrp MultiRewardPeriod) Validate() error { // This is needed to ensure that the begin blocker accumulation does not panic. return fmt.Errorf("end period time %s cannot be before start time %s", mrp.End, mrp.Start) } + + // This also ensures there are no 0 amount coins. if !mrp.RewardsPerSecond.IsValid() { return fmt.Errorf("invalid reward amount: %s", mrp.RewardsPerSecond) } diff --git a/x/incentive/types/params_test.go b/x/incentive/types/params_test.go index 187a4c47..1a921e51 100644 --- a/x/incentive/types/params_test.go +++ b/x/incentive/types/params_test.go @@ -26,6 +26,14 @@ var rewardPeriodWithInvalidRewardsPerSecond = types.NewRewardPeriod( sdk.Coin{Denom: "INVALID!@#😫", Amount: sdk.ZeroInt()}, ) +var rewardPeriodWithZeroRewardsPerSecond = types.NewRewardPeriod( + true, + "bnb", + time.Date(2020, 10, 15, 14, 0, 0, 0, time.UTC), + time.Date(2024, 10, 15, 14, 0, 0, 0, time.UTC), + sdk.Coin{Denom: "ukava", Amount: sdk.ZeroInt()}, +) + var rewardMultiPeriodWithInvalidRewardsPerSecond = types.NewMultiRewardPeriod( true, "bnb", @@ -34,6 +42,14 @@ var rewardMultiPeriodWithInvalidRewardsPerSecond = types.NewMultiRewardPeriod( sdk.Coins{sdk.Coin{Denom: "INVALID!@#😫", Amount: sdk.ZeroInt()}}, ) +var rewardMultiPeriodWithZeroRewardsPerSecond = types.NewMultiRewardPeriod( + true, + "bnb", + time.Date(2020, 10, 15, 14, 0, 0, 0, time.UTC), + time.Date(2024, 10, 15, 14, 0, 0, 0, time.UTC), + sdk.Coins{sdk.Coin{Denom: "zero", Amount: sdk.ZeroInt()}}, +) + var validMultiRewardPeriod = types.NewMultiRewardPeriod( true, "bnb", @@ -217,6 +233,44 @@ func (suite *ParamTestSuite) TestParamValidation() { contains: "expected non-negative lockup", }, }, + { + "invalid zero amount multi rewards per second", + types.Params{ + USDXMintingRewardPeriods: types.DefaultRewardPeriods, + HardSupplyRewardPeriods: types.MultiRewardPeriods{ + rewardMultiPeriodWithZeroRewardsPerSecond, + }, + HardBorrowRewardPeriods: types.DefaultMultiRewardPeriods, + DelegatorRewardPeriods: types.DefaultMultiRewardPeriods, + SwapRewardPeriods: types.DefaultMultiRewardPeriods, + SavingsRewardPeriods: types.DefaultMultiRewardPeriods, + ClaimMultipliers: types.DefaultMultipliers, + ClaimEnd: time.Date(2025, 10, 15, 14, 0, 0, 0, time.UTC), + }, + errArgs{ + expectPass: false, + contains: "invalid reward amount: 0zero", + }, + }, + { + "invalid zero amount single rewards per second", + types.Params{ + USDXMintingRewardPeriods: types.RewardPeriods{ + rewardPeriodWithZeroRewardsPerSecond, + }, + HardSupplyRewardPeriods: types.DefaultMultiRewardPeriods, + HardBorrowRewardPeriods: types.DefaultMultiRewardPeriods, + DelegatorRewardPeriods: types.DefaultMultiRewardPeriods, + SwapRewardPeriods: types.DefaultMultiRewardPeriods, + SavingsRewardPeriods: types.DefaultMultiRewardPeriods, + ClaimMultipliers: types.DefaultMultipliers, + ClaimEnd: time.Date(2025, 10, 15, 14, 0, 0, 0, time.UTC), + }, + errArgs{ + expectPass: false, + contains: "reward amount cannot be zero: 0ukava", + }, + }, } for _, tc := range testCases { diff --git a/x/issuance/client/rest/query.go b/x/issuance/client/rest/query.go deleted file mode 100644 index c2c0ec8f..00000000 --- a/x/issuance/client/rest/query.go +++ /dev/null @@ -1,35 +0,0 @@ -package rest - -import ( - "fmt" - "net/http" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/types/rest" - "github.com/gorilla/mux" - - "github.com/kava-labs/kava/x/issuance/types" -) - -// define routes that get registered by the main application -func registerQueryRoutes(cliCtx client.Context, r *mux.Router) { - r.HandleFunc(fmt.Sprintf("/%s/parameters", types.ModuleName), queryParamsHandlerFn(cliCtx)).Methods("GET") -} - -func queryParamsHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - res, height, err := cliCtx.QueryWithData(fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryGetParams), nil) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) - } -} diff --git a/x/issuance/client/rest/rest.go b/x/issuance/client/rest/rest.go deleted file mode 100644 index 25fe8131..00000000 --- a/x/issuance/client/rest/rest.go +++ /dev/null @@ -1,49 +0,0 @@ -package rest - -import ( - "github.com/gorilla/mux" - - "github.com/cosmos/cosmos-sdk/client" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/rest" -) - -// RegisterRoutes - Central function to define routes that get registered by the main application -func RegisterRoutes(cliCtx client.Context, r *mux.Router) { - registerQueryRoutes(cliCtx, r) - registerTxRoutes(cliCtx, r) -} - -// PostIssueReq defines the properties of an issue token request's body -type PostIssueReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - Tokens sdk.Coin `json:"tokens" yaml:"tokens"` - Receiver sdk.AccAddress `json:"receiver" yaml:"receiver"` -} - -// PostRedeemReq defines the properties of a redeem token request's body -type PostRedeemReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - Tokens sdk.Coin `json:"tokens" yaml:"tokens"` -} - -// PostBlockAddressReq defines the properties of a block address request's body -type PostBlockAddressReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - Address sdk.AccAddress `json:"blocked_address" yaml:"blocked_address"` - Denom string `json:"denom" yaml:"denom"` -} - -// PostUnblockAddressReq defines the properties of a unblock address request's body -type PostUnblockAddressReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - Address sdk.AccAddress `json:"blocked_address" yaml:"blocked_address"` - Denom string `json:"denom" yaml:"denom"` -} - -// PostPauseReq defines the properties of a pause request's body -type PostPauseReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - Denom string `json:"denom" yaml:"denom"` - Status bool `json:"status" yaml:"status"` -} diff --git a/x/issuance/client/rest/tx.go b/x/issuance/client/rest/tx.go deleted file mode 100644 index 246a4cb3..00000000 --- a/x/issuance/client/rest/tx.go +++ /dev/null @@ -1,181 +0,0 @@ -package rest - -import ( - "fmt" - "net/http" - - "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" - "github.com/gorilla/mux" - - "github.com/kava-labs/kava/x/issuance/types" -) - -func registerTxRoutes(cliCtx client.Context, r *mux.Router) { - r.HandleFunc(fmt.Sprintf("/%s/issue", types.ModuleName), postIssueTokensHandlerFn(cliCtx)).Methods("POST") - r.HandleFunc(fmt.Sprintf("/%s/redeem", types.ModuleName), postRedeemTokensHandlerFn(cliCtx)).Methods("POST") - r.HandleFunc(fmt.Sprintf("/%s/block", types.ModuleName), postBlockAddressHandlerFn(cliCtx)).Methods("POST") - r.HandleFunc(fmt.Sprintf("/%s/unblock", types.ModuleName), postUnblockAddressHandlerFn(cliCtx)).Methods("POST") - r.HandleFunc(fmt.Sprintf("/%s/pause", types.ModuleName), postPauseHandlerFn(cliCtx)).Methods("POST") -} - -func postIssueTokensHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var requestBody PostIssueReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &requestBody) { - return - } - - baseReq := requestBody.BaseReq.Sanitize() - if !baseReq.ValidateBasic(w) { - return - } - - fromAddr, err := sdk.AccAddressFromBech32(requestBody.BaseReq.From) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - msg := types.NewMsgIssueTokens( - fromAddr.String(), - requestBody.Tokens, - requestBody.Receiver.String(), - ) - if err := msg.ValidateBasic(); err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - tx.WriteGeneratedTxResponse(cliCtx, w, baseReq, msg) - } -} - -func postRedeemTokensHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var requestBody PostRedeemReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &requestBody) { - return - } - - baseReq := requestBody.BaseReq.Sanitize() - if !baseReq.ValidateBasic(w) { - return - } - - fromAddr, err := sdk.AccAddressFromBech32(requestBody.BaseReq.From) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - msg := types.NewMsgRedeemTokens( - fromAddr.String(), - requestBody.Tokens, - ) - if err := msg.ValidateBasic(); err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - tx.WriteGeneratedTxResponse(cliCtx, w, baseReq, msg) - } -} - -func postBlockAddressHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var requestBody PostBlockAddressReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &requestBody) { - return - } - - baseReq := requestBody.BaseReq.Sanitize() - if !baseReq.ValidateBasic(w) { - return - } - - fromAddr, err := sdk.AccAddressFromBech32(requestBody.BaseReq.From) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - msg := types.NewMsgBlockAddress( - fromAddr.String(), - requestBody.Denom, - requestBody.Address.String(), - ) - if err := msg.ValidateBasic(); err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - tx.WriteGeneratedTxResponse(cliCtx, w, baseReq, msg) - } -} - -func postUnblockAddressHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var requestBody PostUnblockAddressReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &requestBody) { - return - } - - baseReq := requestBody.BaseReq.Sanitize() - if !baseReq.ValidateBasic(w) { - return - } - - fromAddr, err := sdk.AccAddressFromBech32(requestBody.BaseReq.From) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - msg := types.NewMsgUnblockAddress( - fromAddr.String(), - requestBody.Denom, - requestBody.Address.String(), - ) - if err := msg.ValidateBasic(); err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - tx.WriteGeneratedTxResponse(cliCtx, w, baseReq, msg) - } -} - -func postPauseHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var requestBody PostPauseReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &requestBody) { - return - } - - baseReq := requestBody.BaseReq.Sanitize() - if !baseReq.ValidateBasic(w) { - return - } - - fromAddr, err := sdk.AccAddressFromBech32(requestBody.BaseReq.From) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - msg := types.NewMsgSetPauseStatus( - fromAddr.String(), - requestBody.Denom, - requestBody.Status, - ) - if err := msg.ValidateBasic(); err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - tx.WriteGeneratedTxResponse(cliCtx, w, baseReq, msg) - } -} diff --git a/x/issuance/keeper/issuance_test.go b/x/issuance/keeper/issuance_test.go index 02c147db..5d41e127 100644 --- a/x/issuance/keeper/issuance_test.go +++ b/x/issuance/keeper/issuance_test.go @@ -397,7 +397,7 @@ func (suite *KeeperTestSuite) TestRedeemTokens() { suite.Require().NoError(err) initialSupply := sdk.NewCoins(tc.args.redeemTokens) moduleAccount := suite.getModuleAccount(types.ModuleAccountName) - suite.Require().Equal(sdk.NewCoins(initialSupply.Sub(sdk.NewCoins(tc.args.redeemTokens))...), sdk.NewCoins(suite.getBalance(moduleAccount.GetAddress(), tc.args.redeemTokens.Denom))) + suite.Require().Equal(sdk.NewCoins(initialSupply.Sub(tc.args.redeemTokens)...), sdk.NewCoins(suite.getBalance(moduleAccount.GetAddress(), tc.args.redeemTokens.Denom))) } else { suite.Require().Error(err) suite.Require().True(strings.Contains(err.Error(), tc.errArgs.contains)) diff --git a/x/issuance/keeper/keeper.go b/x/issuance/keeper/keeper.go index 26d477bc..c4680db9 100644 --- a/x/issuance/keeper/keeper.go +++ b/x/issuance/keeper/keeper.go @@ -5,6 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/store/prefix" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" @@ -13,7 +14,7 @@ import ( // Keeper keeper for the issuance module type Keeper struct { - key sdk.StoreKey + key storetypes.StoreKey cdc codec.Codec paramSubspace paramtypes.Subspace accountKeeper types.AccountKeeper @@ -21,7 +22,7 @@ type Keeper struct { } // NewKeeper returns a new keeper -func NewKeeper(cdc codec.Codec, key sdk.StoreKey, paramstore paramtypes.Subspace, ak types.AccountKeeper, bk types.BankKeeper) Keeper { +func NewKeeper(cdc codec.Codec, key storetypes.StoreKey, paramstore paramtypes.Subspace, ak types.AccountKeeper, bk types.BankKeeper) Keeper { if !paramstore.HasKeyTable() { paramstore = paramstore.WithKeyTable(types.ParamKeyTable()) } diff --git a/x/issuance/module.go b/x/issuance/module.go index 525ddfb8..2dee05fd 100644 --- a/x/issuance/module.go +++ b/x/issuance/module.go @@ -4,7 +4,6 @@ import ( "context" "encoding/json" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" @@ -17,7 +16,6 @@ import ( abci "github.com/tendermint/tendermint/abci/types" "github.com/kava-labs/kava/x/issuance/client/cli" - "github.com/kava-labs/kava/x/issuance/client/rest" "github.com/kava-labs/kava/x/issuance/keeper" "github.com/kava-labs/kava/x/issuance/types" ) @@ -62,11 +60,6 @@ func (a AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry types.RegisterInterfaces(registry) } -// RegisterRESTRoutes registers REST routes for the swap module. -func (a AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) { - rest.RegisterRoutes(clientCtx, rtr) -} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the gov module. func (a AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) diff --git a/x/issuance/types/msg_test.go b/x/issuance/types/msg_test.go index 76dafa37..853b6402 100644 --- a/x/issuance/types/msg_test.go +++ b/x/issuance/types/msg_test.go @@ -82,7 +82,7 @@ func (suite *MsgTestSuite) TestMsgIssueTokens() { "invalid tokens", args{ sender: suite.addrs[0], - tokens: sdk.Coin{Denom: "In:val:id", Amount: sdk.NewInt(100)}, + tokens: sdk.Coin{Denom: "In~val~id", Amount: sdk.NewInt(100)}, receiver: suite.addrs[1], }, errArgs{ @@ -145,7 +145,7 @@ func (suite *MsgTestSuite) TestMsgRedeemTokens() { "invalid tokens", args{ sender: suite.addrs[0], - tokens: sdk.Coin{Denom: "In:val:id", Amount: sdk.NewInt(100)}, + tokens: sdk.Coin{Denom: "In~val~id", Amount: sdk.NewInt(100)}, }, errArgs{ expectPass: false, diff --git a/x/kavadist/client/cli/tx.go b/x/kavadist/client/cli/tx.go index 7035cca0..b226d27f 100644 --- a/x/kavadist/client/cli/tx.go +++ b/x/kavadist/client/cli/tx.go @@ -9,7 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/tx" "github.com/cosmos/cosmos-sdk/version" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/kava-labs/kava/x/kavadist/types" ) @@ -75,7 +75,7 @@ Where proposal.json contains: from := clientCtx.GetFromAddress() content := types.NewCommunityPoolMultiSpendProposal(proposal.Title, proposal.Description, proposal.RecipientList) - msg, err := govtypes.NewMsgSubmitProposal(content, proposal.Deposit, from) + msg, err := govv1beta1.NewMsgSubmitProposal(content, proposal.Deposit, from) if err != nil { return err } diff --git a/x/kavadist/client/proposal_handler.go b/x/kavadist/client/proposal_handler.go index 5cc1ae75..cadeaa21 100644 --- a/x/kavadist/client/proposal_handler.go +++ b/x/kavadist/client/proposal_handler.go @@ -4,10 +4,9 @@ import ( govclient "github.com/cosmos/cosmos-sdk/x/gov/client" "github.com/kava-labs/kava/x/kavadist/client/cli" - "github.com/kava-labs/kava/x/kavadist/client/rest" ) // community-pool multi-spend proposal handler var ( - ProposalHandler = govclient.NewProposalHandler(cli.GetCmdSubmitProposal, rest.ProposalRESTHandler) + ProposalHandler = govclient.NewProposalHandler(cli.GetCmdSubmitProposal) ) diff --git a/x/kavadist/client/rest/query.go b/x/kavadist/client/rest/query.go deleted file mode 100644 index 835febae..00000000 --- a/x/kavadist/client/rest/query.go +++ /dev/null @@ -1,37 +0,0 @@ -package rest - -import ( - "fmt" - "net/http" - - "github.com/gorilla/mux" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/types/rest" - - "github.com/kava-labs/kava/x/kavadist/types" -) - -func registerQueryRoutes(cliCtx client.Context, r *mux.Router) { - r.HandleFunc(fmt.Sprintf("/%s/parameters", types.ModuleName), queryParamsHandlerFn(cliCtx)).Methods("GET") -} - -func queryParamsHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - route := fmt.Sprintf("custom/%s/%s", types.QuerierRoute, types.QueryGetParams) - - res, height, err := cliCtx.QueryWithData(route, nil) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) - } -} diff --git a/x/kavadist/client/rest/rest.go b/x/kavadist/client/rest/rest.go deleted file mode 100644 index 4ca748cf..00000000 --- a/x/kavadist/client/rest/rest.go +++ /dev/null @@ -1,52 +0,0 @@ -package rest - -import ( - "net/http" - - "github.com/gorilla/mux" - - "github.com/cosmos/cosmos-sdk/client" - clientrest "github.com/cosmos/cosmos-sdk/client/rest" - "github.com/cosmos/cosmos-sdk/client/tx" - "github.com/cosmos/cosmos-sdk/types/rest" - govrest "github.com/cosmos/cosmos-sdk/x/gov/client/rest" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - - "github.com/kava-labs/kava/x/kavadist/types" -) - -// RegisterRoutes registers kavadist-related REST handlers to a router -func RegisterRoutes(cliCtx client.Context, rtr *mux.Router) { - r := clientrest.WithHTTPDeprecationHeaders(rtr) - registerQueryRoutes(cliCtx, r) -} - -// ProposalRESTHandler returns a ProposalRESTHandler that exposes the community pool multi-spend REST handler with a given sub-route. -func ProposalRESTHandler(cliCtx client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: types.ProposalTypeCommunityPoolMultiSpend, - Handler: postProposalHandlerFn(cliCtx), - } -} - -func postProposalHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req CommunityPoolMultiSpendProposalReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - return - } - req.BaseReq = req.BaseReq.Sanitize() - if !req.BaseReq.ValidateBasic(w) { - return - } - content := types.NewCommunityPoolMultiSpendProposal(req.Title, req.Description, req.RecipientList) - msg, err := govtypes.NewMsgSubmitProposal(content, req.Deposit, req.Proposer) - if rest.CheckBadRequestError(w, err) { - return - } - if rest.CheckBadRequestError(w, msg.ValidateBasic()) { - return - } - tx.WriteGeneratedTxResponse(cliCtx, w, req.BaseReq, msg) - } -} diff --git a/x/kavadist/client/rest/utils.go b/x/kavadist/client/rest/utils.go deleted file mode 100644 index 3ce0934e..00000000 --- a/x/kavadist/client/rest/utils.go +++ /dev/null @@ -1,21 +0,0 @@ -package rest - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/rest" - - "github.com/kava-labs/kava/x/kavadist/types" -) - -type ( - // CommunityPoolMultiSpendProposalReq defines a community pool multi-spend proposal request body. - CommunityPoolMultiSpendProposalReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - - Title string `json:"title" yaml:"title"` - Description string `json:"description" yaml:"description"` - RecipientList []types.MultiSpendRecipient `json:"recipient_list" yaml:"recipient_list"` - Deposit sdk.Coins `json:"deposit" yaml:"deposit"` - Proposer sdk.AccAddress `json:"proposer" yaml:"proposer"` - } -) diff --git a/x/kavadist/handler.go b/x/kavadist/handler.go index e689d55c..f2e9ef3b 100644 --- a/x/kavadist/handler.go +++ b/x/kavadist/handler.go @@ -3,15 +3,15 @@ package kavadist import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/kava-labs/kava/x/kavadist/keeper" "github.com/kava-labs/kava/x/kavadist/types" ) // NewCommunityPoolMultiSpendProposalHandler -func NewCommunityPoolMultiSpendProposalHandler(k keeper.Keeper) govtypes.Handler { - return func(ctx sdk.Context, content govtypes.Content) error { +func NewCommunityPoolMultiSpendProposalHandler(k keeper.Keeper) govv1beta1.Handler { + return func(ctx sdk.Context, content govv1beta1.Content) error { switch c := content.(type) { case *types.CommunityPoolMultiSpendProposal: return keeper.HandleCommunityPoolMultiSpendProposal(ctx, k, c) diff --git a/x/kavadist/keeper/infrastructure.go b/x/kavadist/keeper/infrastructure.go index 4aa065be..8250f22a 100644 --- a/x/kavadist/keeper/infrastructure.go +++ b/x/kavadist/keeper/infrastructure.go @@ -76,7 +76,7 @@ func (k Keeper) distributeInfrastructureCoins(ctx sdk.Context, partnerRewards ty coinsToDistribute = updatedCoins } for _, cr := range coreRewards { - coinsToSend := sdk.NewCoin(types.GovDenom, coinsToDistribute.Amount.ToDec().Mul(cr.Weight).RoundInt()) + coinsToSend := sdk.NewCoin(types.GovDenom, sdk.NewDecFromInt(coinsToDistribute.Amount).Mul(cr.Weight).RoundInt()) // TODO check balance, log if insufficient and return rather than error err := k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, cr.Address, sdk.NewCoins(coinsToSend)) if err != nil { diff --git a/x/kavadist/keeper/keeper.go b/x/kavadist/keeper/keeper.go index 191a2156..cc324c53 100644 --- a/x/kavadist/keeper/keeper.go +++ b/x/kavadist/keeper/keeper.go @@ -5,6 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/store/prefix" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" @@ -13,7 +14,7 @@ import ( // Keeper keeper for the cdp module type Keeper struct { - key sdk.StoreKey + key storetypes.StoreKey cdc codec.BinaryCodec paramSubspace paramtypes.Subspace bankKeeper types.BankKeeper @@ -25,7 +26,7 @@ type Keeper struct { // NewKeeper creates a new keeper func NewKeeper( - cdc codec.BinaryCodec, key sdk.StoreKey, paramstore paramtypes.Subspace, bk types.BankKeeper, ak types.AccountKeeper, + cdc codec.BinaryCodec, key storetypes.StoreKey, paramstore paramtypes.Subspace, bk types.BankKeeper, ak types.AccountKeeper, dk types.DistKeeper, blacklistedAddrs map[string]bool, ) Keeper { if !paramstore.HasKeyTable() { diff --git a/x/kavadist/keeper/mint.go b/x/kavadist/keeper/mint.go index 51838c51..323cd640 100644 --- a/x/kavadist/keeper/mint.go +++ b/x/kavadist/keeper/mint.go @@ -3,6 +3,7 @@ package keeper import ( "time" + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/kava-labs/kava/x/kavadist/types" @@ -85,12 +86,12 @@ func (k Keeper) mintInflationaryCoins(ctx sdk.Context, inflationRate sdk.Dec, ti // used to scale accumulator calculations by 10^18 scalar := sdk.NewInt(1000000000000000000) // convert inflation rate to integer - inflationInt := sdk.NewUintFromBigInt(inflationRate.Mul(sdk.NewDecFromInt(scalar)).TruncateInt().BigInt()) - timePeriodsUint := sdk.NewUintFromBigInt(timePeriods.BigInt()) - scalarUint := sdk.NewUintFromBigInt(scalar.BigInt()) + inflationInt := sdkmath.NewUintFromBigInt(inflationRate.Mul(sdk.NewDecFromInt(scalar)).TruncateInt().BigInt()) + timePeriodsUint := sdkmath.NewUintFromBigInt(timePeriods.BigInt()) + scalarUint := sdkmath.NewUintFromBigInt(scalar.BigInt()) // calculate the multiplier (amount to multiply the total supply by to achieve the desired inflation) // multiply the result by 10^-18 because RelativePow returns the result scaled by 10^18 - accumulator := sdk.NewDecFromBigInt(sdk.RelativePow(inflationInt, timePeriodsUint, scalarUint).BigInt()).Mul(sdk.SmallestDec()) + accumulator := sdk.NewDecFromBigInt(sdkmath.RelativePow(inflationInt, timePeriodsUint, scalarUint).BigInt()).Mul(sdk.SmallestDec()) // calculate the number of coins to mint amountToMint := (sdk.NewDecFromInt(totalSupply.Amount).Mul(accumulator)).Sub(sdk.NewDecFromInt(totalSupply.Amount)).TruncateInt() if amountToMint.IsZero() { diff --git a/x/kavadist/keeper/mint_test.go b/x/kavadist/keeper/mint_test.go index cc3b4288..33243fd4 100644 --- a/x/kavadist/keeper/mint_test.go +++ b/x/kavadist/keeper/mint_test.go @@ -91,7 +91,6 @@ func (suite *keeperTestSuite) TestMintNotActive() { } func (suite *keeperTestSuite) TestInfraMinting() { - type args struct { startTime time.Time endTime time.Time @@ -150,14 +149,29 @@ func (suite *keeperTestSuite) TestInfraMinting() { suite.Require().NotPanics(func() { suite.Keeper.SetPreviousBlockTime(ctx, tc.args.startTime) }) + + // Delete initial genesis tokens to start with a clean slate + suite.App.DeleteGenesisValidator(suite.T(), suite.Ctx) + suite.App.DeleteGenesisValidatorCoins(suite.T(), suite.Ctx) + ctx = suite.Ctx.WithBlockTime(tc.args.endTime) err := suite.Keeper.MintPeriodInflation(ctx) suite.Require().NoError(err) + finalSupply := suite.BankKeeper.GetSupply(ctx, types.GovDenom) - marginHigh := tc.args.expectedFinalSupply.Amount.ToDec().Mul(sdk.OneDec().Add(tc.args.marginOfError)) - marginLow := tc.args.expectedFinalSupply.Amount.ToDec().Mul(sdk.OneDec().Sub(tc.args.marginOfError)) - suite.Require().True(finalSupply.Amount.ToDec().LTE(marginHigh)) - suite.Require().True(finalSupply.Amount.ToDec().GTE(marginLow)) + marginHigh := sdk.NewDecFromInt(tc.args.expectedFinalSupply.Amount).Mul(sdk.OneDec().Add(tc.args.marginOfError)) + marginLow := sdk.NewDecFromInt(tc.args.expectedFinalSupply.Amount).Mul(sdk.OneDec().Sub(tc.args.marginOfError)) + suite.Require().Truef( + sdk.NewDecFromInt(finalSupply.Amount).LTE(marginHigh), + "final supply %s is not <= %s high margin", + finalSupply.Amount.String(), + marginHigh.String(), + ) + suite.Require().Truef( + sdk.NewDecFromInt(finalSupply.Amount).GTE(marginLow), + "final supply %s is not >= %s low margin", + finalSupply.Amount.String(), + ) } @@ -212,15 +226,20 @@ func (suite *keeperTestSuite) TestInfraPayoutCore() { suite.Require().NotPanics(func() { suite.Keeper.SetPreviousBlockTime(ctx, tc.args.startTime) }) + + // Delete initial genesis tokens to start with a clean slate + suite.App.DeleteGenesisValidator(suite.T(), suite.Ctx) + suite.App.DeleteGenesisValidatorCoins(suite.T(), suite.Ctx) + initialBalance := suite.BankKeeper.GetBalance(ctx, suite.Addrs[0], types.GovDenom) ctx = suite.Ctx.WithBlockTime(tc.args.endTime) err := suite.Keeper.MintPeriodInflation(ctx) suite.Require().NoError(err) finalSupply := suite.BankKeeper.GetSupply(ctx, types.GovDenom) - marginHigh := tc.args.expectedFinalSupply.Amount.ToDec().Mul(sdk.OneDec().Add(tc.args.marginOfError)) - marginLow := tc.args.expectedFinalSupply.Amount.ToDec().Mul(sdk.OneDec().Sub(tc.args.marginOfError)) - suite.Require().True(finalSupply.Amount.ToDec().LTE(marginHigh)) - suite.Require().True(finalSupply.Amount.ToDec().GTE(marginLow)) + marginHigh := sdk.NewDecFromInt(tc.args.expectedFinalSupply.Amount).Mul(sdk.OneDec().Add(tc.args.marginOfError)) + marginLow := sdk.NewDecFromInt(tc.args.expectedFinalSupply.Amount).Mul(sdk.OneDec().Sub(tc.args.marginOfError)) + suite.Require().True(sdk.NewDecFromInt(finalSupply.Amount).LTE(marginHigh)) + suite.Require().True(sdk.NewDecFromInt(finalSupply.Amount).GTE(marginLow)) finalBalance := suite.BankKeeper.GetBalance(ctx, suite.Addrs[0], types.GovDenom) suite.Require().Equal(tc.args.expectedBalanceIncrease, finalBalance.Sub(initialBalance)) @@ -278,15 +297,20 @@ func (suite *keeperTestSuite) TestInfraPayoutPartner() { suite.Require().NotPanics(func() { suite.Keeper.SetPreviousBlockTime(ctx, tc.args.startTime) }) + + // Delete initial genesis tokens to start with a clean slate + suite.App.DeleteGenesisValidator(suite.T(), suite.Ctx) + suite.App.DeleteGenesisValidatorCoins(suite.T(), suite.Ctx) + initialBalance := suite.BankKeeper.GetBalance(ctx, suite.Addrs[0], types.GovDenom) ctx = suite.Ctx.WithBlockTime(tc.args.endTime) err := suite.Keeper.MintPeriodInflation(ctx) suite.Require().NoError(err) finalSupply := suite.BankKeeper.GetSupply(ctx, types.GovDenom) - marginHigh := tc.args.expectedFinalSupply.Amount.ToDec().Mul(sdk.OneDec().Add(tc.args.marginOfError)) - marginLow := tc.args.expectedFinalSupply.Amount.ToDec().Mul(sdk.OneDec().Sub(tc.args.marginOfError)) - suite.Require().True(finalSupply.Amount.ToDec().LTE(marginHigh)) - suite.Require().True(finalSupply.Amount.ToDec().GTE(marginLow)) + marginHigh := sdk.NewDecFromInt(tc.args.expectedFinalSupply.Amount).Mul(sdk.OneDec().Add(tc.args.marginOfError)) + marginLow := sdk.NewDecFromInt(tc.args.expectedFinalSupply.Amount).Mul(sdk.OneDec().Sub(tc.args.marginOfError)) + suite.Require().True(sdk.NewDecFromInt(finalSupply.Amount).LTE(marginHigh)) + suite.Require().True(sdk.NewDecFromInt(finalSupply.Amount).GTE(marginLow)) finalBalance := suite.BankKeeper.GetBalance(ctx, suite.Addrs[0], types.GovDenom) suite.Require().Equal(tc.args.expectedBalanceIncrease, finalBalance.Sub(initialBalance)) @@ -361,14 +385,19 @@ func (suite *keeperTestSuite) TestInfraPayoutE2E() { suite.Require().NotPanics(func() { suite.Keeper.SetPreviousBlockTime(ctx, tc.args.startTime) }) + + // Delete initial genesis tokens to start with a clean slate + suite.App.DeleteGenesisValidator(suite.T(), suite.Ctx) + suite.App.DeleteGenesisValidatorCoins(suite.T(), suite.Ctx) + ctx = suite.Ctx.WithBlockTime(tc.args.endTime) err := suite.Keeper.MintPeriodInflation(ctx) suite.Require().NoError(err) finalSupply := suite.BankKeeper.GetSupply(ctx, types.GovDenom) - marginHigh := tc.args.expectedFinalSupply.Amount.ToDec().Mul(sdk.OneDec().Add(tc.args.marginOfError)) - marginLow := tc.args.expectedFinalSupply.Amount.ToDec().Mul(sdk.OneDec().Sub(tc.args.marginOfError)) - suite.Require().True(finalSupply.Amount.ToDec().LTE(marginHigh)) - suite.Require().True(finalSupply.Amount.ToDec().GTE(marginLow)) + marginHigh := sdk.NewDecFromInt(tc.args.expectedFinalSupply.Amount).Mul(sdk.OneDec().Add(tc.args.marginOfError)) + marginLow := sdk.NewDecFromInt(tc.args.expectedFinalSupply.Amount).Mul(sdk.OneDec().Sub(tc.args.marginOfError)) + suite.Require().True(sdk.NewDecFromInt(finalSupply.Amount).LTE(marginHigh)) + suite.Require().True(sdk.NewDecFromInt(finalSupply.Amount).GTE(marginLow)) for _, bal := range tc.args.expectedBalances { finalBalance := suite.BankKeeper.GetAllBalances(ctx, bal.address) diff --git a/x/kavadist/legacy/v0_15/types.go b/x/kavadist/legacy/v0_15/types.go deleted file mode 100644 index 42c1a3bc..00000000 --- a/x/kavadist/legacy/v0_15/types.go +++ /dev/null @@ -1,125 +0,0 @@ -package v0_15 - -import ( - "fmt" - "strings" - "time" - - "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" - - v036gov "github.com/cosmos/cosmos-sdk/x/gov/legacy/v036" -) - -const ( - // ModuleName name that will be used throughout the module - ModuleName = "kavadist" - - // RouterKey Top level router key - RouterKey = ModuleName - - // ProposalTypeCommunityPoolMultiSpend defines the type for a CommunityPoolMultiSpendProposal - ProposalTypeCommunityPoolMultiSpend = "CommunityPoolMultiSpend" -) - -// GenesisState is the state that must be provided at genesis. -type GenesisState struct { - Params Params `json:"params" yaml:"params"` - PreviousBlockTime time.Time `json:"previous_block_time" yaml:"previous_block_time"` -} - -// Params governance parameters for kavadist module -type Params struct { - Active bool `json:"active" yaml:"active"` - Periods Periods `json:"periods" yaml:"periods"` -} - -// Periods array of Period -type Periods []Period - -// Period stores the specified start and end dates, and the inflation, expressed as a decimal representing the yearly APR of KAVA tokens that will be minted during that period -type Period struct { - Start time.Time `json:"start" yaml:"start"` // example "2020-03-01T15:20:00Z" - End time.Time `json:"end" yaml:"end"` // example "2020-06-01T15:20:00Z" - Inflation sdk.Dec `json:"inflation" yaml:"inflation"` // example "1.000000003022265980" - 10% inflation -} - -var _ v036gov.Content = CommunityPoolMultiSpendProposal{} - -// CommunityPoolMultiSpendProposal spends from the community pool by sending to one or more addresses -type CommunityPoolMultiSpendProposal struct { - Title string `json:"title" yaml:"title"` - Description string `json:"description" yaml:"description"` - RecipientList MultiSpendRecipients `json:"recipient_list" yaml:"recipient_list"` -} - -// GetTitle returns the title of a community pool multi-spend proposal. -func (csp CommunityPoolMultiSpendProposal) GetTitle() string { return csp.Title } - -// GetDescription returns the description of a community pool multi-spend proposal. -func (csp CommunityPoolMultiSpendProposal) GetDescription() string { return csp.Description } - -// GetDescription returns the routing key of a community pool multi-spend proposal. -func (csp CommunityPoolMultiSpendProposal) ProposalRoute() string { return RouterKey } - -// ProposalType returns the type of a community pool multi-spend proposal. -func (csp CommunityPoolMultiSpendProposal) ProposalType() string { - return ProposalTypeCommunityPoolMultiSpend -} - -// ValidateBasic stateless validation of a community pool multi-spend proposal. -func (csp CommunityPoolMultiSpendProposal) ValidateBasic() error { - err := v036gov.ValidateAbstract(csp) - if err != nil { - return err - } - if err := csp.RecipientList.Validate(); err != nil { - return err - } - return nil -} - -// String implements fmt.Stringer -func (csp CommunityPoolMultiSpendProposal) String() string { - var b strings.Builder - b.WriteString(fmt.Sprintf(`Community Pool Multi Spend Proposal: - Title: %s - Description: %s - Recipient List: %s -`, csp.Title, csp.Description, csp.RecipientList)) - return b.String() -} - -// MultiSpendRecipients slice of MultiSpendRecipient -type MultiSpendRecipients []MultiSpendRecipient - -// Validate stateless validation of MultiSpendRecipients -func (msrs MultiSpendRecipients) Validate() error { - for _, msr := range msrs { - if err := msr.Validate(); err != nil { - return err - } - } - return nil -} - -// MultiSpendRecipient defines a recipient and the amount of coins they are receiving -type MultiSpendRecipient struct { - Address sdk.AccAddress `json:"address" yaml:"address"` - Amount sdk.Coins `json:"amount" yaml:"amount"` -} - -// Validate stateless validation of MultiSpendRecipient -func (msr MultiSpendRecipient) Validate() error { - if !msr.Amount.IsValid() { - return fmt.Errorf("invalid community pool multi-spend proposal amount") - } - if msr.Address.Empty() { - return fmt.Errorf("invalid community pool multi-spend proposal recipient") - } - return nil -} - -func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - cdc.RegisterConcrete(CommunityPoolMultiSpendProposal{}, "kava/CommunityPoolMultiSpendProposal", nil) -} diff --git a/x/kavadist/legacy/v0_16/migrate.go b/x/kavadist/legacy/v0_16/migrate.go deleted file mode 100644 index 37adcc45..00000000 --- a/x/kavadist/legacy/v0_16/migrate.go +++ /dev/null @@ -1,29 +0,0 @@ -package v0_16 - -import ( - v015kavadist "github.com/kava-labs/kava/x/kavadist/legacy/v0_15" - v016kavadist "github.com/kava-labs/kava/x/kavadist/types" -) - -func migrateParams(oldParams v015kavadist.Params) v016kavadist.Params { - periods := make([]v016kavadist.Period, len(oldParams.Periods)) - for i, oldPeriod := range oldParams.Periods { - periods[i] = v016kavadist.Period{ - Start: oldPeriod.Start, - End: oldPeriod.End, - Inflation: oldPeriod.Inflation, - } - } - return v016kavadist.Params{ - Periods: periods, - Active: oldParams.Active, - } -} - -// Migrate converts v0.15 kavadist state and returns it in v0.16 format -func Migrate(oldState v015kavadist.GenesisState) *v016kavadist.GenesisState { - return &v016kavadist.GenesisState{ - Params: migrateParams(oldState.Params), - PreviousBlockTime: oldState.PreviousBlockTime, - } -} diff --git a/x/kavadist/module.go b/x/kavadist/module.go index a199f146..7e2f913b 100644 --- a/x/kavadist/module.go +++ b/x/kavadist/module.go @@ -6,7 +6,6 @@ import ( "fmt" "math/rand" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" @@ -20,7 +19,6 @@ import ( simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/kava-labs/kava/x/kavadist/client/cli" - "github.com/kava-labs/kava/x/kavadist/client/rest" "github.com/kava-labs/kava/x/kavadist/keeper" "github.com/kava-labs/kava/x/kavadist/simulation" "github.com/kava-labs/kava/x/kavadist/types" @@ -72,11 +70,6 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod return genState.Validate() } -// RegisterRESTRoutes registers kavadist module's REST service handlers. -func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) { - rest.RegisterRoutes(clientCtx, rtr) -} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for kavadist module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) diff --git a/x/kavadist/testutil/suite.go b/x/kavadist/testutil/suite.go index f999c3cc..02a61174 100644 --- a/x/kavadist/testutil/suite.go +++ b/x/kavadist/testutil/suite.go @@ -55,8 +55,7 @@ func (suite *Suite) SetupTest() { params := types.NewParams(true, testPeriods, types.DefaultInfraParams) moduleGs := types.ModuleCdc.MustMarshalJSON(types.NewGenesisState(params, types.DefaultPreviousBlockTime)) gs := app.GenesisState{types.ModuleName: moduleGs} - tApp.InitializeFromGenesisStates(authGS, gs) - suite.App = tApp + suite.App = tApp.InitializeFromGenesisStates(authGS, gs) suite.Ctx = ctx suite.Addrs = addrs suite.Keeper = tApp.GetKavadistKeeper() diff --git a/x/kavadist/types/codec.go b/x/kavadist/types/codec.go index f7b8a5c8..2b878420 100644 --- a/x/kavadist/types/codec.go +++ b/x/kavadist/types/codec.go @@ -4,7 +4,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) // RegisterLegacyAminoCodec registers the necessary kavadist interfaces and concrete types @@ -15,7 +15,7 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { registry.RegisterImplementations( - (*govtypes.Content)(nil), + (*govv1beta1.Content)(nil), &CommunityPoolMultiSpendProposal{}, ) } diff --git a/x/kavadist/types/proposal.go b/x/kavadist/types/proposal.go index fc0fafbe..ad6892ba 100644 --- a/x/kavadist/types/proposal.go +++ b/x/kavadist/types/proposal.go @@ -5,7 +5,7 @@ import ( "strings" sdk "github.com/cosmos/cosmos-sdk/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) const ( @@ -14,11 +14,11 @@ const ( ) // Assert CommunityPoolMultiSpendProposal implements govtypes.Content at compile-time -var _ govtypes.Content = CommunityPoolMultiSpendProposal{} +var _ govv1beta1.Content = CommunityPoolMultiSpendProposal{} func init() { - govtypes.RegisterProposalType(ProposalTypeCommunityPoolMultiSpend) - govtypes.RegisterProposalTypeCodec(CommunityPoolMultiSpendProposal{}, "kava/CommunityPoolMultiSpendProposal") + govv1beta1.RegisterProposalType(ProposalTypeCommunityPoolMultiSpend) + govv1beta1.ModuleCdc.Amino.RegisterConcrete(CommunityPoolMultiSpendProposal{}, "kava/CommunityPoolMultiSpendProposal", nil) } // NewCommunityPoolMultiSpendProposal creates a new community pool multi-spend proposal. @@ -46,7 +46,7 @@ func (csp CommunityPoolMultiSpendProposal) ProposalType() string { // ValidateBasic stateless validation of a community pool multi-spend proposal. func (csp CommunityPoolMultiSpendProposal) ValidateBasic() error { - err := govtypes.ValidateAbstract(csp) + err := govv1beta1.ValidateAbstract(csp) if err != nil { return err } diff --git a/x/liquid/keeper/derivative.go b/x/liquid/keeper/derivative.go index ccb20074..1eebe132 100644 --- a/x/liquid/keeper/derivative.go +++ b/x/liquid/keeper/derivative.go @@ -77,7 +77,7 @@ func (k Keeper) BurnDerivative(ctx sdk.Context, delegatorAddr sdk.AccAddress, va } modAcc := k.accountKeeper.GetModuleAccount(ctx, types.ModuleAccountName) - shares := amount.Amount.ToDec() + shares := sdk.NewDecFromInt(amount.Amount) receivedShares, err := k.TransferDelegation(ctx, valAddr, modAcc.GetAddress(), delegatorAddr, shares) if err != nil { return sdk.Dec{}, err @@ -128,7 +128,7 @@ func (k Keeper) GetStakedTokensForDerivatives(ctx sdk.Context, coins sdk.Coins) } // bkava is 1:1 to delegation shares - valTokens := validator.TokensFromSharesTruncated(coin.Amount.ToDec()) + valTokens := validator.TokensFromSharesTruncated(sdk.NewDecFromInt(coin.Amount)) total = total.Add(valTokens.TruncateInt()) } diff --git a/x/liquid/keeper/derivative_test.go b/x/liquid/keeper/derivative_test.go index e4fb748a..bb5b36f5 100644 --- a/x/liquid/keeper/derivative_test.go +++ b/x/liquid/keeper/derivative_test.go @@ -95,9 +95,9 @@ func (suite *KeeperTestSuite) TestBurnDerivative() { suite.AccountBalanceEqual(user, sdk.NewCoins(tc.balance.Sub(tc.burnAmount))) suite.AccountBalanceEqual(moduleAccAddress, modBalance) // ensure derivatives are burned, and not in module account - sharesTransferred := tc.burnAmount.Amount.ToDec() + sharesTransferred := sdk.NewDecFromInt(tc.burnAmount.Amount) suite.DelegationSharesEqual(valAddr, user, sharesTransferred) - suite.DelegationSharesEqual(valAddr, moduleAccAddress, tc.moduleDelegation.ToDec().Sub(sharesTransferred)) + suite.DelegationSharesEqual(valAddr, moduleAccAddress, sdk.NewDecFromInt(tc.moduleDelegation).Sub(sharesTransferred)) suite.EventsContains(suite.Ctx.EventManager().Events(), sdk.NewEvent( types.EventTypeBurnDerivative, @@ -303,7 +303,7 @@ func (suite *KeeperTestSuite) TestMintDerivative() { suite.DelegationSharesEqual(valAddr, delegator, tc.expectedSharesRemaining) suite.DelegationSharesEqual(valAddr, moduleAccAddress, tc.expectedSharesAdded) - sharesTransferred := initialBalance.ToDec().Sub(tc.expectedSharesRemaining) + sharesTransferred := sdk.NewDecFromInt(initialBalance).Sub(tc.expectedSharesRemaining) suite.EventsContains(suite.Ctx.EventManager().Events(), sdk.NewEvent( types.EventTypeMintDerivative, sdk.NewAttribute(types.AttributeKeyDelegator, delegator.String()), diff --git a/x/liquid/keeper/staking_test.go b/x/liquid/keeper/staking_test.go index 8ab495ee..70e50805 100644 --- a/x/liquid/keeper/staking_test.go +++ b/x/liquid/keeper/staking_test.go @@ -339,7 +339,7 @@ func (suite *KeeperTestSuite) TestTransferDelegation_CompliesWithMinSelfDelegati _, err = suite.Keeper.TransferDelegation(suite.Ctx, valAddr, valAccAddr, toDelegator, d("0.000000000000000001")) suite.ErrorIs(err, types.ErrSelfDelegationBelowMinimum) - suite.DelegationSharesEqual(valAddr, valAccAddr, delegation.Amount.ToDec()) + suite.DelegationSharesEqual(valAddr, valAccAddr, sdk.NewDecFromInt(delegation.Amount)) } func (suite *KeeperTestSuite) TestTransferDelegation_CanTransferVested() { diff --git a/x/liquid/module.go b/x/liquid/module.go index 0f80b0d7..b7766c7b 100644 --- a/x/liquid/module.go +++ b/x/liquid/module.go @@ -4,7 +4,6 @@ import ( "context" "encoding/json" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" @@ -54,9 +53,6 @@ func (a AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry types.RegisterInterfaces(registry) } -// RegisterRESTRoutes registers REST routes for the module. -func (a AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router) {} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module. func (a AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { diff --git a/x/liquid/types/msg.go b/x/liquid/types/msg.go index 8b37ac22..531a7dde 100644 --- a/x/liquid/types/msg.go +++ b/x/liquid/types/msg.go @@ -3,7 +3,7 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/x/auth/legacy/legacytx" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" ) const ( diff --git a/x/pricefeed/client/rest/query.go b/x/pricefeed/client/rest/query.go deleted file mode 100644 index 30143583..00000000 --- a/x/pricefeed/client/rest/query.go +++ /dev/null @@ -1,161 +0,0 @@ -package rest - -import ( - "fmt" - "net/http" - - "github.com/gorilla/mux" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/types/rest" - - "github.com/kava-labs/kava/x/pricefeed/types" -) - -// define routes that get registered by the main application -func registerQueryRoutes(cliCtx client.Context, r *mux.Router) { - r.HandleFunc(fmt.Sprintf("/%s/parameters", types.ModuleName), queryParamsHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/markets", types.ModuleName), queryMarketsHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/oracles/{%s}", types.ModuleName, RestMarketID), queryOraclesHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/rawprices/{%s}", types.ModuleName, RestMarketID), queryRawPricesHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/price/{%s}", types.ModuleName, RestMarketID), queryPriceHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/prices", types.ModuleName), queryPricesHandlerFn(cliCtx)).Methods("GET") -} - -func queryRawPricesHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Parse the query height - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - vars := mux.Vars(r) - paramMarketID := vars[RestMarketID] - queryRawPricesParams := types.NewQueryWithMarketIDParams(paramMarketID) - - bz, err := cliCtx.LegacyAmino.MarshalJSON(queryRawPricesParams) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - res, height, err := cliCtx.QueryWithData(fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryRawPrices), bz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusNotFound, err.Error()) - return - } - - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func queryPriceHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Parse the query height - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - vars := mux.Vars(r) - paramMarketID := vars[RestMarketID] - queryPriceParams := types.NewQueryWithMarketIDParams(paramMarketID) - - bz, err := cliCtx.LegacyAmino.MarshalJSON(queryPriceParams) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - res, height, err := cliCtx.QueryWithData(fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryPrice), bz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func queryPricesHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Parse the query height - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - res, height, err := cliCtx.QueryWithData(fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryPrices), nil) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func queryMarketsHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Parse the query height - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - res, height, err := cliCtx.QueryWithData(fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryMarkets), nil) - if err != nil { - rest.WriteErrorResponse(w, http.StatusNotFound, err.Error()) - return - } - - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func queryOraclesHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Parse the query height - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - vars := mux.Vars(r) - paramMarketID := vars[RestMarketID] - queryOraclesParams := types.NewQueryWithMarketIDParams(paramMarketID) - - bz, err := cliCtx.LegacyAmino.MarshalJSON(queryOraclesParams) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - res, height, err := cliCtx.QueryWithData(fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryOracles), bz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusNotFound, err.Error()) - return - } - - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func queryParamsHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Parse the query height - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - res, height, err := cliCtx.QueryWithData(fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryGetParams), nil) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) - } -} diff --git a/x/pricefeed/client/rest/rest.go b/x/pricefeed/client/rest/rest.go deleted file mode 100644 index 79e81a27..00000000 --- a/x/pricefeed/client/rest/rest.go +++ /dev/null @@ -1,26 +0,0 @@ -package rest - -import ( - "github.com/gorilla/mux" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/types/rest" -) - -const ( - RestMarketID = "market_id" -) - -// PostPriceReq defines the properties of a PostPrice request's body. -type PostPriceReq struct { - BaseReq rest.BaseReq `json:"base_req"` - MarketID string `json:"market_id"` - Price string `json:"price"` - Expiry string `json:"expiry"` -} - -// RegisterRoutes - Central function to define routes that get registered by the main application -func RegisterRoutes(cliCtx client.Context, r *mux.Router) { - registerQueryRoutes(cliCtx, r) - registerTxRoutes(cliCtx, r) -} diff --git a/x/pricefeed/client/rest/tx.go b/x/pricefeed/client/rest/tx.go deleted file mode 100644 index e29a08c3..00000000 --- a/x/pricefeed/client/rest/tx.go +++ /dev/null @@ -1,70 +0,0 @@ -package rest - -import ( - "fmt" - "net/http" - "strconv" - "time" - - "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" - "github.com/gorilla/mux" - tmtime "github.com/tendermint/tendermint/types/time" - - "github.com/kava-labs/kava/x/pricefeed/types" -) - -func registerTxRoutes(cliCtx client.Context, r *mux.Router) { - r.HandleFunc(fmt.Sprintf("/%s/postprice", types.ModuleName), postPriceHandlerFn(cliCtx)).Methods("POST") -} - -func postPriceHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - var req PostPriceReq - - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - rest.WriteErrorResponse(w, http.StatusBadRequest, "failed to parse request") - return - } - - baseReq := req.BaseReq.Sanitize() - if !baseReq.ValidateBasic(w) { - return - } - - addr, err := sdk.AccAddressFromBech32(baseReq.From) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - price, err := sdk.NewDecFromStr(req.Price) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - expiryInt, err := strconv.ParseInt(req.Expiry, 10, 64) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("invalid expiry %s: %s", req.Expiry, err)) - return - } - - if expiryInt > types.MaxExpiry { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("invalid expiry; got %d, max: %d", expiryInt, types.MaxExpiry)) - return - } - - expiry := tmtime.Canonical(time.Unix(expiryInt, 0)) - - msg := types.NewMsgPostPrice(addr.String(), req.MarketID, price, expiry) - if err = msg.ValidateBasic(); err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - tx.WriteGeneratedTxResponse(cliCtx, w, baseReq, msg) - } -} diff --git a/x/pricefeed/keeper/keeper.go b/x/pricefeed/keeper/keeper.go index ee580c5e..a81868b5 100644 --- a/x/pricefeed/keeper/keeper.go +++ b/x/pricefeed/keeper/keeper.go @@ -8,6 +8,7 @@ import ( "github.com/tendermint/tendermint/libs/log" "github.com/cosmos/cosmos-sdk/codec" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" @@ -18,7 +19,7 @@ import ( // Keeper struct for pricefeed module type Keeper struct { // key used to access the stores from Context - key sdk.StoreKey + key storetypes.StoreKey // Codec for binary encoding/decoding cdc codec.Codec // The reference to the Paramstore to get and set pricefeed specific params @@ -27,7 +28,7 @@ type Keeper struct { // NewKeeper returns a new keeper for the pricefeed module. func NewKeeper( - cdc codec.Codec, key sdk.StoreKey, paramstore paramtypes.Subspace, + cdc codec.Codec, key storetypes.StoreKey, paramstore paramtypes.Subspace, ) Keeper { if !paramstore.HasKeyTable() { paramstore = paramstore.WithKeyTable(types.ParamKeyTable()) diff --git a/x/pricefeed/module.go b/x/pricefeed/module.go index 65272138..d12d4f64 100644 --- a/x/pricefeed/module.go +++ b/x/pricefeed/module.go @@ -4,7 +4,6 @@ import ( "context" "encoding/json" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" @@ -18,7 +17,6 @@ import ( abci "github.com/tendermint/tendermint/abci/types" "github.com/kava-labs/kava/x/pricefeed/client/cli" - "github.com/kava-labs/kava/x/pricefeed/client/rest" "github.com/kava-labs/kava/x/pricefeed/keeper" "github.com/kava-labs/kava/x/pricefeed/types" ) @@ -63,11 +61,6 @@ func (a AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry types.RegisterInterfaces(registry) } -// RegisterRESTRoutes registers REST routes for the swap module. -func (a AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) { - rest.RegisterRoutes(clientCtx, rtr) -} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the gov module. func (a AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { diff --git a/x/pricefeed/types/market_test.go b/x/pricefeed/types/market_test.go index 54bc3973..7a329190 100644 --- a/x/pricefeed/types/market_test.go +++ b/x/pricefeed/types/market_test.go @@ -54,7 +54,7 @@ func TestMarketValidate(t *testing.T) { MarketID: "market", BaseAsset: "xrp", // Denoms can be uppercase in v0.44 - QuoteAsset: "BNB.", + QuoteAsset: "BNB~", }, false, }, diff --git a/x/router/keeper/msg_server_test.go b/x/router/keeper/msg_server_test.go index 8e3d4950..e998cc75 100644 --- a/x/router/keeper/msg_server_test.go +++ b/x/router/keeper/msg_server_test.go @@ -71,7 +71,7 @@ func (suite *msgServerTestSuite) TestDelegateMintDeposit_Events() { sdk.NewAttribute(sdk.AttributeKeySender, user.String()), ), ) - expectedShares := msg.Amount.Amount.ToDec() // no slashes so shares equal staked tokens + expectedShares := sdk.NewDecFromInt(msg.Amount.Amount) // no slashes so shares equal staked tokens suite.EventsContains(suite.Ctx.EventManager().Events(), sdk.NewEvent( stakingtypes.EventTypeDelegate, diff --git a/x/router/module.go b/x/router/module.go index 500c1d87..eebd4ed5 100644 --- a/x/router/module.go +++ b/x/router/module.go @@ -8,7 +8,6 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" @@ -51,9 +50,6 @@ func (a AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry types.RegisterInterfaces(registry) } -// RegisterRESTRoutes registers REST routes for the module. -func (a AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router) {} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module. func (a AppModuleBasic) RegisterGRPCGatewayRoutes(_ client.Context, _ *runtime.ServeMux) { } diff --git a/x/router/types/msg.go b/x/router/types/msg.go index e0e7104e..15de98ae 100644 --- a/x/router/types/msg.go +++ b/x/router/types/msg.go @@ -3,7 +3,7 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/x/auth/legacy/legacytx" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" ) const ( diff --git a/x/savings/keeper/keeper.go b/x/savings/keeper/keeper.go index 828ef398..63a70a25 100644 --- a/x/savings/keeper/keeper.go +++ b/x/savings/keeper/keeper.go @@ -5,6 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/store/prefix" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/tendermint/tendermint/libs/log" @@ -14,7 +15,7 @@ import ( // Keeper struct for savings module type Keeper struct { - key sdk.StoreKey + key storetypes.StoreKey cdc codec.Codec paramSubspace paramtypes.Subspace accountKeeper types.AccountKeeper @@ -25,7 +26,7 @@ type Keeper struct { // NewKeeper returns a new keeper for the savings module. func NewKeeper( - cdc codec.Codec, key sdk.StoreKey, paramstore paramtypes.Subspace, + cdc codec.Codec, key storetypes.StoreKey, paramstore paramtypes.Subspace, ak types.AccountKeeper, bk types.BankKeeper, lk types.LiquidKeeper, ) Keeper { if !paramstore.HasKeyTable() { diff --git a/x/savings/keeper/withdraw.go b/x/savings/keeper/withdraw.go index 311ba84a..bde8c6ff 100644 --- a/x/savings/keeper/withdraw.go +++ b/x/savings/keeper/withdraw.go @@ -26,7 +26,7 @@ func (k Keeper) Withdraw(ctx sdk.Context, depositor sdk.AccAddress, coins sdk.Co return err } - deposit.Amount = deposit.Amount.Sub(amount) + deposit.Amount = deposit.Amount.Sub(amount...) if deposit.Amount.Empty() { k.DeleteDeposit(ctx, deposit) } else { diff --git a/x/savings/module.go b/x/savings/module.go index 4904a6a7..87dfeb8c 100644 --- a/x/savings/module.go +++ b/x/savings/module.go @@ -4,7 +4,6 @@ import ( "context" "encoding/json" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" @@ -62,11 +61,6 @@ func (a AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry types.RegisterInterfaces(registry) } -// RegisterRESTRoutes registers REST routes for the module. -func (a AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) { - // intentionally left blank -} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the gov module. func (a AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { diff --git a/x/swap/client/rest/query.go b/x/swap/client/rest/query.go deleted file mode 100644 index c5b8a6f0..00000000 --- a/x/swap/client/rest/query.go +++ /dev/null @@ -1,150 +0,0 @@ -package rest - -import ( - "fmt" - "net/http" - "strings" - - "github.com/gorilla/mux" - - "github.com/cosmos/cosmos-sdk/client" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/rest" - - "github.com/kava-labs/kava/x/swap/types" -) - -func registerQueryRoutes(cliCtx client.Context, r *mux.Router) { - r.HandleFunc(fmt.Sprintf("/%s/parameters", types.ModuleName), queryParamsHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/deposits", types.ModuleName), queryDepositsHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/pool", types.ModuleName), queryPoolHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/pools", types.ModuleName), queryPoolsHandlerFn(cliCtx)).Methods("GET") -} - -func queryParamsHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - route := fmt.Sprintf("custom/%s/%s", types.QuerierRoute, types.QueryGetParams) - - res, height, err := cliCtx.QueryWithData(route, nil) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func queryDepositsHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - var owner sdk.AccAddress - var pool string - - _, page, limit, err := rest.ParseHTTPArgsWithLimit(r, 0) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - if x := r.URL.Query().Get(RestPool); len(x) != 0 { - pool = strings.TrimSpace(x) - } - - if x := r.URL.Query().Get(RestOwner); len(x) != 0 { - ownerStr := strings.ToLower(strings.TrimSpace(x)) - shareOwner, err := sdk.AccAddressFromBech32(ownerStr) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("cannot parse address from owner %s", ownerStr)) - return - } - owner = shareOwner - } - - params := types.NewQueryDepositsParams(page, limit, owner, pool) - - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - route := fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryGetDeposits) - res, height, err := cliCtx.QueryWithData(route, bz) - cliCtx = cliCtx.WithHeight(height) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func queryPoolHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Parse the query height - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - var poolName string - - if x := r.URL.Query().Get(RestPool); len(x) != 0 { - poolName = strings.TrimSpace(x) - } - if len(poolName) == 0 { - rest.WriteErrorResponse(w, http.StatusBadRequest, "must specify pool param") - return - } - - params := types.NewQueryPoolParams(poolName) - - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - route := fmt.Sprintf("custom/%s/%s", types.ModuleName, types.QueryGetPool) - res, height, err := cliCtx.QueryWithData(route, bz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) - } -} - -func queryPoolsHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Parse the query height - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - route := fmt.Sprintf("custom/%s/%s", types.QuerierRoute, types.QueryGetPools) - - res, height, err := cliCtx.QueryWithData(route, nil) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - cliCtx = cliCtx.WithHeight(height) - rest.PostProcessResponse(w, cliCtx, res) - } -} diff --git a/x/swap/client/rest/rest.go b/x/swap/client/rest/rest.go deleted file mode 100644 index e364cf89..00000000 --- a/x/swap/client/rest/rest.go +++ /dev/null @@ -1,62 +0,0 @@ -package rest - -import ( - "github.com/gorilla/mux" - - "github.com/cosmos/cosmos-sdk/client" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/rest" -) - -// REST variable names -// nolint -const ( - RestPool = "pool" - RestOwner = "owner" -) - -// RegisterRoutes registers swap-related REST handlers to a router -func RegisterRoutes(cliCtx client.Context, r *mux.Router) { - registerQueryRoutes(cliCtx, r) - registerTxRoutes(cliCtx, r) -} - -// PostCreateDepositReq defines the properties of a deposit create request's body -type PostCreateDepositReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - From sdk.AccAddress `json:"from" yaml:"from"` - TokenA sdk.Coin `json:"token_a" yaml:"token_a"` - TokenB sdk.Coin `json:"token_b" yaml:"token_b"` - Slippage sdk.Dec `json:"slippage" yaml:"slippage"` - Deadline int64 `json:"deadline" yaml:"deadline"` -} - -// PostCreateWithdrawReq defines the properties of a withdraw create request's body -type PostCreateWithdrawReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - From sdk.AccAddress `json:"from" yaml:"from"` - Shares sdk.Int `json:"shares" yaml:"shares"` - MinTokenA sdk.Coin `json:"token_a" yaml:"token_a"` - MinTokenB sdk.Coin `json:"token_b" yaml:"token_b"` - Deadline int64 `json:"deadline" yaml:"deadline"` -} - -// PostCreateSwapExactForTokensReq trades an exact coinA for coinB -type PostCreateSwapExactForTokensReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - Requester sdk.AccAddress `json:"requester" yaml:"requester"` - ExactTokenA sdk.Coin `json:"exact_token_a" yaml:"exact_token_a"` - TokenB sdk.Coin `json:"token_b" yaml:"token_b"` - Slippage sdk.Dec `json:"slippage" yaml:"slippage"` - Deadline int64 `json:"deadline" yaml:"deadline"` -} - -// PostCreateSwapForExactTokensReq trades an exact coinA for coinB -type PostCreateSwapForExactTokensReq struct { - BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` - Requester sdk.AccAddress `json:"requester" yaml:"requester"` - TokenA sdk.Coin `json:"exact_token_a" yaml:"exact_token_a"` - ExactTokenB sdk.Coin `json:"token_b" yaml:"token_b"` - Slippage sdk.Dec `json:"slippage" yaml:"slippage"` - Deadline int64 `json:"deadline" yaml:"deadline"` -} diff --git a/x/swap/client/rest/tx.go b/x/swap/client/rest/tx.go deleted file mode 100644 index fb078986..00000000 --- a/x/swap/client/rest/tx.go +++ /dev/null @@ -1,106 +0,0 @@ -package rest - -import ( - "fmt" - "net/http" - - "github.com/gorilla/mux" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/tx" - "github.com/cosmos/cosmos-sdk/types/rest" - - "github.com/kava-labs/kava/x/swap/types" -) - -func registerTxRoutes(cliCtx client.Context, r *mux.Router) { - r.HandleFunc(fmt.Sprintf("/%s/deposit", types.ModuleName), postDepositHandlerFn(cliCtx)).Methods("POST") - r.HandleFunc(fmt.Sprintf("/%s/withdraw", types.ModuleName), postWithdrawHandlerFn(cliCtx)).Methods("POST") - r.HandleFunc(fmt.Sprintf("/%s/swapExactForTokens", types.ModuleName), postSwapExactForTokensHandlerFn(cliCtx)).Methods("POST") - r.HandleFunc(fmt.Sprintf("/%s/swapForExactTokens", types.ModuleName), postSwapForExactTokensHandlerFn(cliCtx)).Methods("POST") -} - -func postDepositHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Decode POST request body - var req PostCreateDepositReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - return - } - req.BaseReq = req.BaseReq.Sanitize() - if !req.BaseReq.ValidateBasic(w) { - return - } - - msg := types.NewMsgDeposit(req.From.String(), req.TokenA, req.TokenB, req.Slippage, req.Deadline) - if err := msg.ValidateBasic(); err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - tx.WriteGeneratedTxResponse(cliCtx, w, req.BaseReq, msg) - } -} - -func postWithdrawHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Decode POST request body - var req PostCreateWithdrawReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - return - } - req.BaseReq = req.BaseReq.Sanitize() - if !req.BaseReq.ValidateBasic(w) { - return - } - - msg := types.NewMsgWithdraw(req.From.String(), req.Shares, req.MinTokenA, req.MinTokenA, req.Deadline) - if err := msg.ValidateBasic(); err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - tx.WriteGeneratedTxResponse(cliCtx, w, req.BaseReq, msg) - } -} - -func postSwapExactForTokensHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Decode POST request body - var req PostCreateSwapExactForTokensReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - return - } - req.BaseReq = req.BaseReq.Sanitize() - if !req.BaseReq.ValidateBasic(w) { - return - } - - msg := types.NewMsgSwapExactForTokens(req.Requester.String(), req.ExactTokenA, req.TokenB, req.Slippage, req.Deadline) - if err := msg.ValidateBasic(); err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - tx.WriteGeneratedTxResponse(cliCtx, w, req.BaseReq, msg) - } -} - -func postSwapForExactTokensHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - // Decode POST request body - var req PostCreateSwapForExactTokensReq - if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { - return - } - req.BaseReq = req.BaseReq.Sanitize() - if !req.BaseReq.ValidateBasic(w) { - return - } - - msg := types.NewMsgSwapForExactTokens(req.Requester.String(), req.TokenA, req.ExactTokenB, req.Slippage, req.Deadline) - if err := msg.ValidateBasic(); err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - tx.WriteGeneratedTxResponse(cliCtx, w, req.BaseReq, msg) - } -} diff --git a/x/swap/keeper/deposit.go b/x/swap/keeper/deposit.go index 57578c60..4471abb3 100644 --- a/x/swap/keeper/deposit.go +++ b/x/swap/keeper/deposit.go @@ -67,8 +67,8 @@ func (k Keeper) Deposit(ctx sdk.Context, depositor sdk.AccAddress, coinA sdk.Coi } maxPercentPriceChange := sdk.MaxDec( - desiredAmount.AmountOf(coinA.Denom).ToDec().Quo(depositAmount.AmountOf(coinA.Denom).ToDec()), - desiredAmount.AmountOf(coinB.Denom).ToDec().Quo(depositAmount.AmountOf(coinB.Denom).ToDec()), + sdk.NewDecFromInt(desiredAmount.AmountOf(coinA.Denom)).Quo(sdk.NewDecFromInt(depositAmount.AmountOf(coinA.Denom))), + sdk.NewDecFromInt(desiredAmount.AmountOf(coinB.Denom)).Quo(sdk.NewDecFromInt(depositAmount.AmountOf(coinB.Denom))), ) slippage := maxPercentPriceChange.Sub(sdk.OneDec()) diff --git a/x/swap/keeper/deposit_test.go b/x/swap/keeper/deposit_test.go index ddb9f4fe..1d56b1e9 100644 --- a/x/swap/keeper/deposit_test.go +++ b/x/swap/keeper/deposit_test.go @@ -206,7 +206,7 @@ func (suite *keeperTestSuite) TestDeposit_PoolExists() { sdk.NewCoin("usdx", sdk.NewInt(4999998)), ) - suite.AccountBalanceEqual(depositor.GetAddress(), balance.Sub(expectedDeposit)) + suite.AccountBalanceEqual(depositor.GetAddress(), balance.Sub(expectedDeposit...)) suite.ModuleAccountBalanceEqual(reserves.Add(expectedDeposit...)) suite.PoolLiquidityEqual(reserves.Add(expectedDeposit...)) suite.PoolShareValueEqual(depositor, pool, expectedShareValue) diff --git a/x/swap/keeper/keeper.go b/x/swap/keeper/keeper.go index 829c6aa5..db444cee 100644 --- a/x/swap/keeper/keeper.go +++ b/x/swap/keeper/keeper.go @@ -5,9 +5,9 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/store/prefix" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/kava-labs/kava/x/swap/types" @@ -15,7 +15,7 @@ import ( // Keeper keeper for the swap module type Keeper struct { - key sdk.StoreKey + key storetypes.StoreKey cdc codec.Codec paramSubspace paramtypes.Subspace hooks types.SwapHooks @@ -26,7 +26,7 @@ type Keeper struct { // NewKeeper creates a new keeper func NewKeeper( cdc codec.Codec, - key sdk.StoreKey, + key storetypes.StoreKey, paramstore paramtypes.Subspace, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, diff --git a/x/swap/keeper/msg_server_test.go b/x/swap/keeper/msg_server_test.go index b7d7b81a..320d1295 100644 --- a/x/swap/keeper/msg_server_test.go +++ b/x/swap/keeper/msg_server_test.go @@ -142,7 +142,7 @@ func (suite *msgServerTestSuite) TestDeposit_ExistingPool() { ) // Use sdk.NewCoins to remove zero coins, otherwise it will compare sdk.Coins(nil) with sdk.Coins{} - suite.AccountBalanceEqual(depositor.GetAddress(), sdk.NewCoins(balance.Sub(expectedDeposit)...)) + suite.AccountBalanceEqual(depositor.GetAddress(), sdk.NewCoins(balance.Sub(expectedDeposit...)...)) suite.ModuleAccountBalanceEqual(reserves.Add(expectedDeposit...)) suite.PoolLiquidityEqual(reserves.Add(expectedDeposit...)) suite.PoolShareValueEqual(depositor, pool, expectedShareValue) @@ -282,9 +282,9 @@ func (suite *msgServerTestSuite) TestWithdraw_PartialShares() { expectedCoinsReceived := sdk.NewCoins(minTokenA, minTokenB) suite.AccountBalanceEqual(depositor.GetAddress(), expectedCoinsReceived) - suite.ModuleAccountBalanceEqual(reserves.Sub(expectedCoinsReceived)) - suite.PoolLiquidityEqual(reserves.Sub(expectedCoinsReceived)) - suite.PoolShareValueEqual(depositor, types.NewAllowedPool("ukava", "usdx"), reserves.Sub(expectedCoinsReceived)) + suite.ModuleAccountBalanceEqual(reserves.Sub(expectedCoinsReceived...)) + suite.PoolLiquidityEqual(reserves.Sub(expectedCoinsReceived...)) + suite.PoolShareValueEqual(depositor, types.NewAllowedPool("ukava", "usdx"), reserves.Sub(expectedCoinsReceived...)) suite.EventsContains(suite.GetEvents(), sdk.NewEvent( sdk.EventTypeMessage, @@ -388,9 +388,9 @@ func (suite *msgServerTestSuite) TestSwapExactForTokens() { expectedSwapOutput := sdk.NewCoin("usdx", sdk.NewInt(4980034)) - suite.AccountBalanceEqual(requester.GetAddress(), balance.Sub(sdk.NewCoins(swapInput)).Add(expectedSwapOutput)) - suite.ModuleAccountBalanceEqual(reserves.Add(swapInput).Sub(sdk.NewCoins(expectedSwapOutput))) - suite.PoolLiquidityEqual(reserves.Add(swapInput).Sub(sdk.NewCoins(expectedSwapOutput))) + suite.AccountBalanceEqual(requester.GetAddress(), balance.Sub(swapInput).Add(expectedSwapOutput)) + suite.ModuleAccountBalanceEqual(reserves.Add(swapInput).Sub(expectedSwapOutput)) + suite.PoolLiquidityEqual(reserves.Add(swapInput).Sub(expectedSwapOutput)) suite.EventsContains(suite.GetEvents(), sdk.NewEvent( sdk.EventTypeMessage, @@ -501,9 +501,9 @@ func (suite *msgServerTestSuite) TestSwapForExactTokens() { expectedSwapInput := sdk.NewCoin("ukava", sdk.NewInt(1004015)) - suite.AccountBalanceEqual(requester.GetAddress(), balance.Sub(sdk.NewCoins(expectedSwapInput)).Add(swapOutput)) - suite.ModuleAccountBalanceEqual(reserves.Add(expectedSwapInput).Sub(sdk.NewCoins(swapOutput))) - suite.PoolLiquidityEqual(reserves.Add(expectedSwapInput).Sub(sdk.NewCoins(swapOutput))) + suite.AccountBalanceEqual(requester.GetAddress(), balance.Sub(expectedSwapInput).Add(swapOutput)) + suite.ModuleAccountBalanceEqual(reserves.Add(expectedSwapInput).Sub(swapOutput)) + suite.PoolLiquidityEqual(reserves.Add(expectedSwapInput).Sub(swapOutput)) suite.EventsContains(suite.GetEvents(), sdk.NewEvent( sdk.EventTypeMessage, diff --git a/x/swap/keeper/swap.go b/x/swap/keeper/swap.go index 128e9dd4..fa2514ce 100644 --- a/x/swap/keeper/swap.go +++ b/x/swap/keeper/swap.go @@ -21,7 +21,7 @@ func (k *Keeper) SwapExactForTokens(ctx sdk.Context, requester sdk.AccAddress, e return sdkerrors.Wrapf(types.ErrInsufficientLiquidity, "swap output rounds to zero, increase input amount") } - priceChange := swapOutput.Amount.ToDec().Quo(coinB.Amount.ToDec()) + priceChange := sdk.NewDecFromInt(swapOutput.Amount).Quo(sdk.NewDecFromInt(coinB.Amount)) if err := k.assertSlippageWithinLimit(priceChange, slippageLimit); err != nil { return err } @@ -49,7 +49,7 @@ func (k *Keeper) SwapForExactTokens(ctx sdk.Context, requester sdk.AccAddress, c swapInput, feePaid := pool.SwapWithExactOutput(exactCoinB, k.GetSwapFee(ctx)) - priceChange := coinA.Amount.ToDec().Quo(swapInput.Sub(feePaid).Amount.ToDec()) + priceChange := sdk.NewDecFromInt(coinA.Amount).Quo(sdk.NewDecFromInt(swapInput.Sub(feePaid).Amount)) if err := k.assertSlippageWithinLimit(priceChange, slippageLimit); err != nil { return err } diff --git a/x/swap/keeper/swap_test.go b/x/swap/keeper/swap_test.go index 64799386..8dcb80c8 100644 --- a/x/swap/keeper/swap_test.go +++ b/x/swap/keeper/swap_test.go @@ -35,9 +35,9 @@ func (suite *keeperTestSuite) TestSwapExactForTokens() { expectedOutput := sdk.NewCoin("usdx", sdk.NewInt(4982529)) - suite.AccountBalanceEqual(requester.GetAddress(), balance.Sub(sdk.NewCoins(coinA)).Add(expectedOutput)) - suite.ModuleAccountBalanceEqual(reserves.Add(coinA).Sub(sdk.NewCoins(expectedOutput))) - suite.PoolLiquidityEqual(reserves.Add(coinA).Sub(sdk.NewCoins(expectedOutput))) + suite.AccountBalanceEqual(requester.GetAddress(), balance.Sub(coinA).Add(expectedOutput)) + suite.ModuleAccountBalanceEqual(reserves.Add(coinA).Sub(expectedOutput)) + suite.PoolLiquidityEqual(reserves.Add(coinA).Sub(expectedOutput)) suite.EventsContains(suite.Ctx.EventManager().Events(), sdk.NewEvent( types.EventTypeSwapTrade, @@ -342,9 +342,9 @@ func (suite *keeperTestSuite) TestSwapForExactTokens() { expectedInput := sdk.NewCoin("ukava", sdk.NewInt(1003511)) - suite.AccountBalanceEqual(requester.GetAddress(), balance.Sub(sdk.NewCoins(expectedInput)).Add(coinB)) - suite.ModuleAccountBalanceEqual(reserves.Add(expectedInput).Sub(sdk.NewCoins(coinB))) - suite.PoolLiquidityEqual(reserves.Add(expectedInput).Sub(sdk.NewCoins(coinB))) + suite.AccountBalanceEqual(requester.GetAddress(), balance.Sub(expectedInput).Add(coinB)) + suite.ModuleAccountBalanceEqual(reserves.Add(expectedInput).Sub(coinB)) + suite.PoolLiquidityEqual(reserves.Add(expectedInput).Sub(coinB)) suite.EventsContains(suite.Ctx.EventManager().Events(), sdk.NewEvent( types.EventTypeSwapTrade, diff --git a/x/swap/module.go b/x/swap/module.go index d30413f5..25232f6d 100644 --- a/x/swap/module.go +++ b/x/swap/module.go @@ -9,13 +9,11 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" "github.com/kava-labs/kava/x/swap/client/cli" - "github.com/kava-labs/kava/x/swap/client/rest" "github.com/kava-labs/kava/x/swap/keeper" "github.com/kava-labs/kava/x/swap/types" ) @@ -60,11 +58,6 @@ func (a AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry types.RegisterInterfaces(registry) } -// RegisterRESTRoutes registers REST routes for the swap module. -func (a AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) { - rest.RegisterRoutes(clientCtx, rtr) -} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the gov module. func (a AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { diff --git a/x/swap/types/base_pool.go b/x/swap/types/base_pool.go index db71eda5..2ce29099 100644 --- a/x/swap/types/base_pool.go +++ b/x/swap/types/base_pool.go @@ -251,7 +251,7 @@ func (p *BasePool) calculateOutputForExactInput(in, inReserves, outReserves sdk. p.assertSwapInputIsValid(in) p.assertFeeIsValid(fee) - inAfterFee := in.ToDec().Mul(sdk.OneDec().Sub(fee)).TruncateInt() + inAfterFee := sdk.NewDecFromInt(in).Mul(sdk.OneDec().Sub(fee)).TruncateInt() var result big.Int result.Mul(outReserves.BigInt(), inAfterFee.BigInt()) @@ -310,7 +310,7 @@ func (p *BasePool) calculateInputForExactOutput(out, outReserves, inReserves sdk inWithoutFee = inWithoutFee.Add(sdk.OneInt()) } - in := inWithoutFee.ToDec().Quo(sdk.OneDec().Sub(fee)).Ceil().TruncateInt() + in := sdk.NewDecFromInt(inWithoutFee).Quo(sdk.OneDec().Sub(fee)).Ceil().TruncateInt() feeValue := in.Sub(inWithoutFee) return in, feeValue diff --git a/x/swap/types/params.go b/x/swap/types/params.go index 4cb8222b..6cd67964 100644 --- a/x/swap/types/params.go +++ b/x/swap/types/params.go @@ -2,6 +2,7 @@ package types import ( "fmt" + "strings" sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" @@ -104,6 +105,16 @@ func (p AllowedPool) Validate() error { return err } + // Ensure there is no colon in the token denoms as they are used as separators + // and is now valid in Cosmos denoms. + if strings.Contains(p.TokenA, ":") { + return fmt.Errorf("tokenA cannot have colons in the denom: %s", p.TokenA) + } + + if strings.Contains(p.TokenB, ":") { + return fmt.Errorf("tokenB cannot have colons in the denom: %s", p.TokenB) + } + if p.TokenA == p.TokenB { return fmt.Errorf( "pool cannot have two tokens of the same type, received '%s' and '%s'", diff --git a/x/swap/types/params_test.go b/x/swap/types/params_test.go index 2f15328b..50598166 100644 --- a/x/swap/types/params_test.go +++ b/x/swap/types/params_test.go @@ -267,6 +267,16 @@ func TestAllowedPool_Validation(t *testing.T) { allowedPool: types.NewAllowedPool("ukava", "UKAVA"), expectedErr: "invalid token order: 'UKAVA' must come before 'ukava'", }, + { + name: "invalid token a with colon", + allowedPool: types.NewAllowedPool("test:denom", "ukava"), + expectedErr: "tokenA cannot have colons in the denom: test:denom", + }, + { + name: "invalid token b with colon", + allowedPool: types.NewAllowedPool("ukava", "u:kava"), + expectedErr: "tokenB cannot have colons in the denom: u:kava", + }, } for _, tc := range testCases { diff --git a/x/validator-vesting/client/rest/query.go b/x/validator-vesting/client/rest/query.go deleted file mode 100644 index d7d65aa6..00000000 --- a/x/validator-vesting/client/rest/query.go +++ /dev/null @@ -1,315 +0,0 @@ -package rest - -import ( - "encoding/json" - "fmt" - "net/http" - - "github.com/gorilla/mux" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/types/rest" - - "github.com/kava-labs/kava/x/validator-vesting/types" -) - -func registerQueryRoutes(cliCtx client.Context, r *mux.Router) { - r.HandleFunc(fmt.Sprintf("/%s/circulatingsupply", types.QueryPath), getCirculatingSupplyHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/totalsupply", types.QueryPath), getTotalSupplyHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/circulatingsupplyhard", types.QueryPath), getCirculatingSupplyHARDHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/circulatingsupplyusdx", types.QueryPath), getCirculatingSupplyUSDXHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/circulatingsupplyswp", types.QueryPath), getCirculatingSupplySWPHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/totalsupplyhard", types.QueryPath), getTotalSupplyHARDHandlerFn(cliCtx)).Methods("GET") - r.HandleFunc(fmt.Sprintf("/%s/totalsupplyusdx", types.QueryPath), getTotalSupplyUSDXHandlerFn(cliCtx)).Methods("GET") -} - -func getTotalSupplyHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - _, page, limit, err := rest.ParseHTTPArgsWithLimit(r, 0) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - params := types.NewBaseQueryParams(page, limit) - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("failed to marshal query params: %s", err)) - return - } - - route := fmt.Sprintf("custom/%s/%s", types.QuerierRoute, types.QueryTotalSupply) - res, _, err := cliCtx.QueryWithData(route, bz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - var totalSupply int64 - err = cliCtx.LegacyAmino.UnmarshalJSON(res, &totalSupply) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - resBytes, err := json.Marshal(totalSupply) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - w.Write(resBytes) - } -} - -func getCirculatingSupplyHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - _, page, limit, err := rest.ParseHTTPArgsWithLimit(r, 0) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - params := types.NewBaseQueryParams(page, limit) - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("failed to marshal query params: %s", err)) - return - } - - route := fmt.Sprintf("custom/%s/%s", types.QuerierRoute, types.QueryCirculatingSupply) - res, _, err := cliCtx.QueryWithData(route, bz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - var circSupply int64 - err = cliCtx.LegacyAmino.UnmarshalJSON(res, &circSupply) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - resBytes, err := json.Marshal(circSupply) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - w.Write(resBytes) - } -} - -func getCirculatingSupplyHARDHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - _, page, limit, err := rest.ParseHTTPArgsWithLimit(r, 0) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - params := types.NewBaseQueryParams(page, limit) - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("failed to marshal query params: %s", err)) - return - } - - route := fmt.Sprintf("custom/%s/%s", types.QuerierRoute, types.QueryCirculatingSupplyHARD) - res, _, err := cliCtx.QueryWithData(route, bz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - var circSupply int64 - err = cliCtx.LegacyAmino.UnmarshalJSON(res, &circSupply) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - resBytes, err := json.Marshal(circSupply) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - w.Write(resBytes) - } -} - -func getCirculatingSupplyUSDXHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - _, page, limit, err := rest.ParseHTTPArgsWithLimit(r, 0) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - params := types.NewBaseQueryParams(page, limit) - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("failed to marshal query params: %s", err)) - return - } - - route := fmt.Sprintf("custom/%s/%s", types.QuerierRoute, types.QueryCirculatingSupplyUSDX) - res, _, err := cliCtx.QueryWithData(route, bz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - var circSupply int64 - err = cliCtx.LegacyAmino.UnmarshalJSON(res, &circSupply) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - resBytes, err := json.Marshal(circSupply) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - w.Write(resBytes) - } -} - -func getCirculatingSupplySWPHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - _, page, limit, err := rest.ParseHTTPArgsWithLimit(r, 0) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - params := types.NewBaseQueryParams(page, limit) - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("failed to marshal query params: %s", err)) - return - } - - route := fmt.Sprintf("custom/%s/%s", types.QuerierRoute, types.QueryCirculatingSupplySWP) - res, _, err := cliCtx.QueryWithData(route, bz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - - var circSupply int64 - err = cliCtx.LegacyAmino.UnmarshalJSON(res, &circSupply) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - resBytes, err := json.Marshal(circSupply) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - w.Write(resBytes) - } -} - -func getTotalSupplyHARDHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - _, page, limit, err := rest.ParseHTTPArgsWithLimit(r, 0) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - params := types.NewBaseQueryParams(page, limit) - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("failed to marshal query params: %s", err)) - return - } - - route := fmt.Sprintf("custom/%s/%s", types.QuerierRoute, types.QueryTotalSupplyHARD) - res, _, err := cliCtx.QueryWithData(route, bz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - var totalSupply int64 - err = cliCtx.LegacyAmino.UnmarshalJSON(res, &totalSupply) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - resBytes, err := json.Marshal(totalSupply) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - w.Write(resBytes) - } -} - -func getTotalSupplyUSDXHandlerFn(cliCtx client.Context) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - _, page, limit, err := rest.ParseHTTPArgsWithLimit(r, 0) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - - cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, cliCtx, r) - if !ok { - return - } - - params := types.NewBaseQueryParams(page, limit) - bz, err := cliCtx.LegacyAmino.MarshalJSON(params) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("failed to marshal query params: %s", err)) - return - } - - route := fmt.Sprintf("custom/%s/%s", types.QuerierRoute, types.QueryTotalSupplyUSDX) - res, _, err := cliCtx.QueryWithData(route, bz) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - var totalSupply int64 - err = cliCtx.LegacyAmino.UnmarshalJSON(res, &totalSupply) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - resBytes, err := json.Marshal(totalSupply) - if err != nil { - rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) - return - } - w.Write(resBytes) - } -} diff --git a/x/validator-vesting/client/rest/rest.go b/x/validator-vesting/client/rest/rest.go deleted file mode 100644 index ccbcb92a..00000000 --- a/x/validator-vesting/client/rest/rest.go +++ /dev/null @@ -1,14 +0,0 @@ -package rest - -import ( - "github.com/gorilla/mux" - - "github.com/cosmos/cosmos-sdk/client" - clientrest "github.com/cosmos/cosmos-sdk/client/rest" -) - -// RegisterRoutes registers kavadist-related REST handlers to a router -func RegisterRoutes(cliCtx client.Context, rtr *mux.Router) { - r := clientrest.WithHTTPDeprecationHeaders(rtr) - registerQueryRoutes(cliCtx, r) -} diff --git a/x/validator-vesting/legacy/v0_15/keys.go b/x/validator-vesting/legacy/v0_15/keys.go deleted file mode 100644 index 29ca2a47..00000000 --- a/x/validator-vesting/legacy/v0_15/keys.go +++ /dev/null @@ -1,31 +0,0 @@ -package v0_15 - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" -) - -const ( - // ModuleName name used throughout module - ModuleName = "validatorvesting" - - // StoreKey to be used when creating the KVStore - StoreKey = ModuleName - - // QuerierRoute should be set to module name - QuerierRoute = ModuleName - - // QueryPath shortened name for public API (cli and REST) - QueryPath = "vesting" -) - -var ( - // BlocktimeKey key for the time of the previous block - BlocktimeKey = []byte{0x00} - // ValidatorVestingAccountPrefix store prefix for validator vesting accounts - ValidatorVestingAccountPrefix = []byte{0x01} -) - -// ValidatorVestingAccountKey returns the account address bytes prefixed by ValidatorVestingAccountPrefix -func ValidatorVestingAccountKey(addr sdk.AccAddress) []byte { - return append(ValidatorVestingAccountPrefix, addr.Bytes()...) -} diff --git a/x/validator-vesting/legacy/v0_15/types.go b/x/validator-vesting/legacy/v0_15/types.go deleted file mode 100644 index 6683daa7..00000000 --- a/x/validator-vesting/legacy/v0_15/types.go +++ /dev/null @@ -1,108 +0,0 @@ -package v0_15 - -import ( - "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/codec/legacy" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - sdk "github.com/cosmos/cosmos-sdk/types" - v039auth "github.com/cosmos/cosmos-sdk/x/auth/legacy/v039" -) - -// ValidatorVestingAccount implements the VestingAccount interface. It -// conditionally vests by unlocking coins during each specified period, provided -// that the validator address has validated at least **SigningThreshold** blocks during -// the previous vesting period. The signing threshold takes values 0 to 100 are represents the -// percentage of blocks that must be signed each period for the vesting to complete successfully. -// If the validator has not signed at least the threshold percentage of blocks during a period, -// the coins are returned to the return address, or burned if the return address is null. -type ValidatorVestingAccount struct { - *v039auth.PeriodicVestingAccount - ValidatorAddress sdk.ConsAddress `json:"validator_address" yaml:"validator_address"` - ReturnAddress sdk.AccAddress `json:"return_address" yaml:"return_address"` - SigningThreshold int64 `json:"signing_threshold" yaml:"signing_threshold"` - CurrentPeriodProgress CurrentPeriodProgress `json:"current_period_progress" yaml:"current_period_progress"` - VestingPeriodProgress []VestingProgress `json:"vesting_period_progress" yaml:"vesting_period_progress"` - DebtAfterFailedVesting sdk.Coins `json:"debt_after_failed_vesting" yaml:"debt_after_failed_vesting"` -} - -type validatorVestingAccountJSON struct { - Address sdk.AccAddress `json:"address" yaml:"address"` - Coins sdk.Coins `json:"coins" yaml:"coins"` - PubKey cryptotypes.PubKey `json:"public_key" yaml:"public_key"` - AccountNumber uint64 `json:"account_number" yaml:"account_number"` - Sequence uint64 `json:"sequence" yaml:"sequence"` - OriginalVesting sdk.Coins `json:"original_vesting" yaml:"original_vesting"` - DelegatedFree sdk.Coins `json:"delegated_free" yaml:"delegated_free"` - DelegatedVesting sdk.Coins `json:"delegated_vesting" yaml:"delegated_vesting"` - EndTime int64 `json:"end_time" yaml:"end_time"` - - // non-base vesting account fields - StartTime int64 `json:"start_time" yaml:"start_time"` - VestingPeriods v039auth.Periods `json:"vesting_periods" yaml:"vesting_periods"` - ValidatorAddress sdk.ConsAddress `json:"validator_address" yaml:"validator_address"` - ReturnAddress sdk.AccAddress `json:"return_address" yaml:"return_address"` - SigningThreshold int64 `json:"signing_threshold" yaml:"signing_threshold"` - CurrentPeriodProgress CurrentPeriodProgress `json:"current_period_progress" yaml:"current_period_progress"` - VestingPeriodProgress []VestingProgress `json:"vesting_period_progress" yaml:"vesting_period_progress"` - DebtAfterFailedVesting sdk.Coins `json:"debt_after_failed_vesting" yaml:"debt_after_failed_vesting"` -} - -// NewPeriodicVestingAccountRaw creates a new PeriodicVestingAccount object from BaseVestingAccount -func NewPeriodicVestingAccountRaw(bva *v039auth.BaseVestingAccount, startTime int64, periods v039auth.Periods) *v039auth.PeriodicVestingAccount { - return &v039auth.PeriodicVestingAccount{ - BaseVestingAccount: bva, - StartTime: startTime, - VestingPeriods: periods, - } -} - -// UnmarshalJSON unmarshals raw JSON bytes into a ValidatorVestingAccount. -func (vva *ValidatorVestingAccount) UnmarshalJSON(bz []byte) error { - var alias validatorVestingAccountJSON - if err := legacy.Cdc.UnmarshalJSON(bz, &alias); err != nil { - return err - } - - ba := v039auth.NewBaseAccount(alias.Address, alias.Coins, alias.PubKey, alias.AccountNumber, alias.Sequence) - bva := &v039auth.BaseVestingAccount{ - BaseAccount: ba, - OriginalVesting: alias.OriginalVesting, - DelegatedFree: alias.DelegatedFree, - DelegatedVesting: alias.DelegatedVesting, - EndTime: alias.EndTime, - } - pva := NewPeriodicVestingAccountRaw(bva, alias.StartTime, alias.VestingPeriods) - vva.PeriodicVestingAccount = pva - vva.ValidatorAddress = alias.ValidatorAddress - vva.ReturnAddress = alias.ReturnAddress - vva.SigningThreshold = alias.SigningThreshold - vva.CurrentPeriodProgress = alias.CurrentPeriodProgress - vva.VestingPeriodProgress = alias.VestingPeriodProgress - vva.DebtAfterFailedVesting = alias.DebtAfterFailedVesting - return nil -} - -// VestingProgress tracks the status of each vesting period -type VestingProgress struct { - PeriodComplete bool `json:"period_complete" yaml:"period_complete"` - VestingSuccessful bool `json:"vesting_successful" yaml:"vesting_successful"` -} - -// CurrentPeriodProgress tracks the progress of the current vesting period -type CurrentPeriodProgress struct { - MissedBlocks int64 `json:"missed_blocks" yaml:"missed_blocks"` - TotalBlocks int64 `json:"total_blocks" yaml:"total_blocks"` -} - -// Period defines a length of time and amount of coins that will vest -type Period struct { - Length int64 `json:"length" yaml:"length"` // length of the period, in seconds - Amount sdk.Coins `json:"amount" yaml:"amount"` // amount of coins vesting during this period -} - -// Periods stores all vesting periods passed as part of a PeriodicVestingAccount -type Periods []Period - -func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - cdc.RegisterConcrete(&ValidatorVestingAccount{}, "cosmos-sdk/ValidatorVestingAccount", nil) -} diff --git a/x/validator-vesting/module.go b/x/validator-vesting/module.go index 94312d5f..8d068181 100644 --- a/x/validator-vesting/module.go +++ b/x/validator-vesting/module.go @@ -3,7 +3,6 @@ package validator_vesting import ( "encoding/json" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" @@ -16,7 +15,6 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" "github.com/kava-labs/kava/x/validator-vesting/client/cli" - "github.com/kava-labs/kava/x/validator-vesting/client/rest" "github.com/kava-labs/kava/x/validator-vesting/types" ) @@ -55,11 +53,6 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod return nil } -// RegisterRESTRoutes registers validator-vesting module's REST service handlers. -func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) { - rest.RegisterRoutes(clientCtx, rtr) -} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for validator-vesting module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) {} diff --git a/x/validator-vesting/querier.go b/x/validator-vesting/querier.go index 9182fd11..f99d6d89 100644 --- a/x/validator-vesting/querier.go +++ b/x/validator-vesting/querier.go @@ -68,15 +68,15 @@ func getCirculatingSupply(blockTime time.Time, totalSupply sdk.Int) sdk.Int { switch { case blockTime.Before(vestingDates[0]): - return totalSupply.Sub(sdk.NewInt(9937500000000)).ToDec().Mul(sdk.MustNewDecFromStr("0.000001")).RoundInt() + return sdk.NewDecFromInt(totalSupply.Sub(sdk.NewInt(9937500000000))).Mul(sdk.MustNewDecFromStr("0.000001")).RoundInt() case blockTime.After(vestingDates[0]) && blockTime.Before(vestingDates[1]) || blockTime.Equal(vestingDates[0]): - return totalSupply.Sub(sdk.NewInt(7453125000000)).ToDec().Mul(sdk.MustNewDecFromStr("0.000001")).RoundInt() + return sdk.NewDecFromInt(totalSupply.Sub(sdk.NewInt(7453125000000))).Mul(sdk.MustNewDecFromStr("0.000001")).RoundInt() case blockTime.After(vestingDates[1]) && blockTime.Before(vestingDates[2]) || blockTime.Equal(vestingDates[1]): - return totalSupply.Sub(sdk.NewInt(4968750000000)).ToDec().Mul(sdk.MustNewDecFromStr("0.000001")).RoundInt() + return sdk.NewDecFromInt(totalSupply.Sub(sdk.NewInt(4968750000000))).Mul(sdk.MustNewDecFromStr("0.000001")).RoundInt() case blockTime.After(vestingDates[2]) && blockTime.Before(vestingDates[3]) || blockTime.Equal(vestingDates[2]): - return totalSupply.Sub(sdk.NewInt(2484375000000)).ToDec().Mul(sdk.MustNewDecFromStr("0.000001")).RoundInt() + return sdk.NewDecFromInt(totalSupply.Sub(sdk.NewInt(2484375000000))).Mul(sdk.MustNewDecFromStr("0.000001")).RoundInt() default: - return totalSupply.ToDec().Mul(sdk.MustNewDecFromStr("0.000001")).RoundInt() + return sdk.NewDecFromInt(totalSupply).Mul(sdk.MustNewDecFromStr("0.000001")).RoundInt() } }