Skip to main content
Generated from cosmos/cosmos-sdk@2086680ff8b0 on ref release/v0.55.x.

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.

cosmos.gov.v1.Query

Query defines the gRPC querier service for gov module

Constitution

Constitution queries the chain’s constitution. Request QueryConstitutionRequest: This message has no fields. Response QueryConstitutionResponse:

Deposit (Query, v1)

Deposit queries single deposit information based on proposalID, depositAddr. Request QueryDepositRequest: Response QueryDepositResponse:

Deposits (v1)

Deposits queries all deposits of a single proposal. Request QueryDepositsRequest: Response QueryDepositsResponse:

Params (v1)

Params queries all parameters of the gov module. Request QueryParamsRequest: Response QueryParamsResponse:

Proposal (v1)

Proposal queries proposal details based on ProposalID. Request QueryProposalRequest: Response QueryProposalResponse:

Proposals (v1)

Proposals queries all proposals based on given status. Request QueryProposalsRequest: Response QueryProposalsResponse:

TallyResult (v1)

TallyResult queries the tally of a proposal vote. Request QueryTallyResultRequest: Response QueryTallyResultResponse:

Vote (Query, v1)

Vote queries voted information based on proposalID, voterAddr. Request QueryVoteRequest: Response QueryVoteResponse:

Votes (v1)

Votes queries votes of a given proposal. Request QueryVotesRequest: Response QueryVotesResponse:

cosmos.gov.v1beta1.Query

Query defines the gRPC querier service for gov module

Deposit (Query, v1beta1)

Deposit queries single deposit information based on proposalID, depositor address. Request QueryDepositRequest: Response QueryDepositResponse:

Deposits (v1beta1)

Deposits queries all deposits of a single proposal. Request QueryDepositsRequest: Response QueryDepositsResponse:

Params (v1beta1)

Params queries all parameters of the gov module. Request QueryParamsRequest: Response QueryParamsResponse:

Proposal (v1beta1)

Proposal queries proposal details based on ProposalID. Request QueryProposalRequest: Response QueryProposalResponse:

Proposals (v1beta1)

Proposals queries all proposals based on given status. Request QueryProposalsRequest: Response QueryProposalsResponse:

TallyResult (v1beta1)

TallyResult queries the tally of a proposal vote. Request QueryTallyResultRequest: Response QueryTallyResultResponse:

Vote (Query, v1beta1)

Vote queries voted information based on proposalID, voterAddr. Request QueryVoteRequest: Response QueryVoteResponse:

Votes (v1beta1)

Votes queries votes of a given proposal. Request QueryVotesRequest: Response QueryVotesResponse:

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

CancelProposal

CancelProposal defines a method to cancel governance proposal In a transaction:
Response MsgCancelProposalResponse:

Deposit (Msg, v1)

Deposit defines a method to add deposit on a specific proposal. In a transaction:
Response MsgDepositResponse: This message has no fields.

ExecLegacyContent

ExecLegacyContent defines a Msg to be in included in a MsgSubmitProposal to execute a legacy content-based proposal.
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 MsgExecLegacyContentResponse: This message has no fields.

SubmitProposal (v1)

SubmitProposal defines a method to create new proposal given the messages. In a transaction:
Response MsgSubmitProposalResponse:

UpdateParams

UpdateParams defines a governance operation for updating the x/gov 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.

Vote (Msg, v1)

Vote defines a method to add a vote on a specific proposal. In a transaction:
Response MsgVoteResponse: This message has no fields.

VoteWeighted (v1)

VoteWeighted defines a method to add a weighted vote on a specific proposal. In a transaction:
Response MsgVoteWeightedResponse: This message has no fields.

Deposit (Msg, v1beta1)

Deposit defines a method to add deposit on a specific proposal. In a transaction:
Response MsgDepositResponse: This message has no fields.

SubmitProposal (v1beta1)

SubmitProposal defines a method to create new proposal given a content. In a transaction:
Response MsgSubmitProposalResponse:

Vote (Msg, v1beta1)

Vote defines a method to add a vote on a specific proposal. In a transaction:
Response MsgVoteResponse: This message has no fields.

VoteWeighted (v1beta1)

VoteWeighted defines a method to add a weighted vote on a specific proposal. In a transaction:
Response MsgVoteWeightedResponse: This message has no fields.

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.gov.v1.Deposit

Deposit defines an amount deposited by an account address to an active proposal.

cosmos.gov.v1.DepositParams

DepositParams defines the params for deposits on governance proposals.

cosmos.gov.v1.Params

Params defines the parameters for the x/gov module.

cosmos.gov.v1.Proposal

Proposal defines the core field members of a governance proposal.

cosmos.gov.v1.ProposalStatus

Written as a quoted string in JSON.

cosmos.gov.v1.TallyParams

TallyParams defines the params for tallying votes on governance proposals.

cosmos.gov.v1.TallyResult

TallyResult defines a standard tally for a governance proposal.

cosmos.gov.v1.Vote

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

Written as a quoted string in JSON.

cosmos.gov.v1.VotingParams

VotingParams defines the params for voting on governance proposals.

cosmos.gov.v1.WeightedVoteOption

WeightedVoteOption defines a unit of vote for vote split.

cosmos.gov.v1beta1.Deposit

Deposit defines an amount deposited by an account address to an active proposal.

cosmos.gov.v1beta1.DepositParams

DepositParams defines the params for deposits on governance proposals.

cosmos.gov.v1beta1.Proposal

Proposal defines the core field members of a governance proposal.

cosmos.gov.v1beta1.ProposalStatus

Written as a quoted string in JSON.

cosmos.gov.v1beta1.TallyParams

TallyParams defines the params for tallying votes on governance proposals.

cosmos.gov.v1beta1.TallyResult

TallyResult defines a standard tally for a governance proposal.

cosmos.gov.v1beta1.Vote

Vote defines a vote on a governance proposal. A Vote consists of a proposal ID, the voter, and the vote option.

cosmos.gov.v1beta1.VoteOption

Written as a quoted string in JSON.

cosmos.gov.v1beta1.VotingParams

VotingParams defines the params for voting on governance proposals.

cosmos.gov.v1beta1.WeightedVoteOption

WeightedVoteOption defines a unit of vote for vote split.