Skip to main content
Generated from cosmos/cosmos-sdk@c1126e4e5460 on ref main.

Queries

A node exposes only the services its application registers:
  • gRPC on port 9090
  • REST on port 1317, if the method has an HTTP binding
Run grpcurl -plaintext localhost:9090 list to see what a node serves. Queries are read-only and never pass through consensus. See Queries. Replace <string> placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some string fields accept enum constants listed under Types. Field tables give the encoding each value takes. Examples assume a local node. For TLS endpoints, use port 443 and omit -plaintext. See gRPC services for reflection, address formats, and decimal encoding.

CommunityPool

CommunityPool queries the community pool coins. Request QueryCommunityPoolRequest: This message has no fields. Response QueryCommunityPoolResponse:

DelegationRewards

DelegationRewards queries the total rewards accrued by a delegation. Request QueryDelegationRewardsRequest: Response QueryDelegationRewardsResponse:

DelegationTotalRewards

DelegationTotalRewards queries the total rewards accrued by each validator. Request QueryDelegationTotalRewardsRequest: Response QueryDelegationTotalRewardsResponse:

DelegatorStartingInfo

DelegatorStartingInfo queries the starting info for a delegator. Request QueryDelegatorStartingInfoRequest: Response QueryDelegatorStartingInfoResponse:

DelegatorValidators

DelegatorValidators queries the validators of a delegator. Request QueryDelegatorValidatorsRequest: Response QueryDelegatorValidatorsResponse:

DelegatorWithdrawAddress

DelegatorWithdrawAddress queries withdraw address of a delegator. Request QueryDelegatorWithdrawAddressRequest: Response QueryDelegatorWithdrawAddressResponse:

Params

Params queries params of the distribution module. Request QueryParamsRequest: This message has no fields. Response QueryParamsResponse:

ValidatorCommission

ValidatorCommission queries accumulated commission for a validator. Request QueryValidatorCommissionRequest: Response QueryValidatorCommissionResponse:

ValidatorCurrentRewards

ValidatorCurrentRewards queries current rewards for a validator. Request QueryValidatorCurrentRewardsRequest: Response QueryValidatorCurrentRewardsResponse:

ValidatorDistributionInfo

ValidatorDistributionInfo queries validator commission and self-delegation rewards for validator Request QueryValidatorDistributionInfoRequest: Response QueryValidatorDistributionInfoResponse:

ValidatorHistoricalRewards

ValidatorHistoricalRewards queries historical rewards for a validator at a specific period. Request QueryValidatorHistoricalRewardsRequest: Response QueryValidatorHistoricalRewardsResponse:

ValidatorOutstandingRewards

ValidatorOutstandingRewards queries rewards of a validator address. Request QueryValidatorOutstandingRewardsRequest: Response QueryValidatorOutstandingRewardsResponse:

ValidatorSlashes

ValidatorSlashes queries slash events of a validator. Request QueryValidatorSlashesRequest: Response QueryValidatorSlashesResponse:

Transaction messages

These messages are included in signed transactions, not called as endpoints. See Transactions for the execution model, and Sending transactions for the envelope they go into. Examples use CLI transaction JSON. Decimal fields use values such as "0.05", even when their proto type is bytes. The gRPC TxEncode method instead requires the scaled value "50000000000000000". See scalar encodings.
  • Handler: Generated client method
  • Signer: Account that must sign
  • Amino name: Legacy identifier used by hardware wallets and other Amino signers

CommunityPoolSpend

CommunityPoolSpend defines a governance operation for sending tokens from the community pool in the x/distribution module to another account, which could be the governance module itself. The authority is defined in the keeper.
The signer is the governance module account, which no user holds a key for. This message executes only through a passed governance proposal, not as a transaction you submit directly.
In a transaction:
Response MsgCommunityPoolSpendResponse: This message has no fields.

DepositValidatorRewardsPool

DepositValidatorRewardsPool defines a method to provide additional rewards to delegators to a specific validator. In a transaction:
Response MsgDepositValidatorRewardsPoolResponse: This message has no fields.

FundCommunityPool

FundCommunityPool defines a method to allow an account to directly fund the community pool. In a transaction:
Response MsgFundCommunityPoolResponse: This message has no fields.

SetWithdrawAddress

SetWithdrawAddress defines a method to change the withdraw address for a delegator (or validator self-delegation). In a transaction:
Response MsgSetWithdrawAddressResponse: This message has no fields.

UpdateParams

UpdateParams defines a governance operation for updating the x/distribution module parameters. The authority is defined in the keeper.
The signer is the governance module account, which no user holds a key for. This message executes only through a passed governance proposal, not as a transaction you submit directly.
In a transaction:
Response MsgUpdateParamsResponse: This message has no fields.

WithdrawDelegatorReward

WithdrawDelegatorReward defines a method to withdraw rewards of delegator from a single validator. In a transaction:
Response MsgWithdrawDelegatorRewardResponse:

WithdrawValidatorCommission

WithdrawValidatorCommission defines a method to withdraw the full commission to the validator address. In a transaction:
Response MsgWithdrawValidatorCommissionResponse:

Types

Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a [] suffix marks a repeated field.

cosmos.base.query.v1beta1.PageRequest

PageRequest is to be embedded in gRPC request messages for efficient pagination. Ex: message SomeRequest { Foo some_parameter = 1; PageRequest pagination = 2; }

cosmos.base.query.v1beta1.PageResponse

PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }

cosmos.base.v1beta1.Coin

Coin defines a token with a denomination and an amount. NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto.

cosmos.base.v1beta1.DecCoin

DecCoin defines a token with a denomination and a decimal amount. NOTE: The amount field is a Dec which implements the custom method signatures required by gogoproto.

cosmos.distribution.v1beta1.DelegationDelegatorReward

DelegationDelegatorReward represents the properties of a delegator’s delegation reward.

cosmos.distribution.v1beta1.DelegatorStartingInfo

DelegatorStartingInfo represents the starting info for a delegator reward period. It tracks the previous validator period, the delegation’s amount of staking token, and the creation height (to check later on if any slashes have occurred). NOTE: Even though validators are slashed to whole staking tokens, the delegators within the validator may be left with less than a full token, thus sdk.Dec is used.

cosmos.distribution.v1beta1.Params

Params defines the set of params for the distribution module.

cosmos.distribution.v1beta1.ValidatorAccumulatedCommission

ValidatorAccumulatedCommission represents accumulated commission for a validator kept as a running counter, can be withdrawn at any time.

cosmos.distribution.v1beta1.ValidatorCurrentRewards

ValidatorCurrentRewards represents current rewards and current period for a validator kept as a running counter and incremented each block as long as the validator’s tokens remain constant.

cosmos.distribution.v1beta1.ValidatorHistoricalRewards

ValidatorHistoricalRewards represents historical rewards for a validator. Height is implicit within the store key. Cumulative reward ratio is the sum from the zeroeth period until this period of rewards / tokens, per the spec. The reference count indicates the number of objects which might need to reference this historical entry at any point. ReferenceCount = number of outstanding delegations which ended the associated period (and might need to read that record) + number of slashes which ended the associated period (and might need to read that record) + one per validator for the zeroeth period, set on initialization

cosmos.distribution.v1beta1.ValidatorOutstandingRewards

ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards for a validator inexpensive to track, allows simple sanity checks.

cosmos.distribution.v1beta1.ValidatorSlashEvent

ValidatorSlashEvent represents a validator slash event. Height is implicit within the store key. This is needed to calculate appropriate amount of staking tokens for delegations which are withdrawn after a slash has occurred.