github.com/Finschia/finschia-sdk@v0.48.1/proto/cosmos/gov/v1beta1/query.proto (about)

     1  syntax = "proto3";
     2  package cosmos.gov.v1beta1;
     3  
     4  import "cosmos/base/query/v1beta1/pagination.proto";
     5  import "gogoproto/gogo.proto";
     6  import "google/api/annotations.proto";
     7  import "cosmos/gov/v1beta1/gov.proto";
     8  
     9  option go_package = "github.com/Finschia/finschia-sdk/x/gov/types";
    10  
    11  // Query defines the gRPC querier service for gov module
    12  service Query {
    13    // Proposal queries proposal details based on ProposalID.
    14    rpc Proposal(QueryProposalRequest) returns (QueryProposalResponse) {
    15      option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}";
    16    }
    17  
    18    // Proposals queries all proposals based on given status.
    19    rpc Proposals(QueryProposalsRequest) returns (QueryProposalsResponse) {
    20      option (google.api.http).get = "/cosmos/gov/v1beta1/proposals";
    21    }
    22  
    23    // Vote queries voted information based on proposalID, voterAddr.
    24    rpc Vote(QueryVoteRequest) returns (QueryVoteResponse) {
    25      option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}";
    26    }
    27  
    28    // Votes queries votes of a given proposal.
    29    rpc Votes(QueryVotesRequest) returns (QueryVotesResponse) {
    30      option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/votes";
    31    }
    32  
    33    // Params queries all parameters of the gov module.
    34    rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
    35      option (google.api.http).get = "/cosmos/gov/v1beta1/params/{params_type}";
    36    }
    37  
    38    // Deposit queries single deposit information based proposalID, depositAddr.
    39    rpc Deposit(QueryDepositRequest) returns (QueryDepositResponse) {
    40      option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}";
    41    }
    42  
    43    // Deposits queries all deposits of a single proposal.
    44    rpc Deposits(QueryDepositsRequest) returns (QueryDepositsResponse) {
    45      option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits";
    46    }
    47  
    48    // TallyResult queries the tally of a proposal vote.
    49    rpc TallyResult(QueryTallyResultRequest) returns (QueryTallyResultResponse) {
    50      option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/tally";
    51    }
    52  }
    53  
    54  // QueryProposalRequest is the request type for the Query/Proposal RPC method.
    55  message QueryProposalRequest {
    56    // proposal_id defines the unique id of the proposal.
    57    uint64 proposal_id = 1;
    58  }
    59  
    60  // QueryProposalResponse is the response type for the Query/Proposal RPC method.
    61  message QueryProposalResponse {
    62    Proposal proposal = 1 [(gogoproto.nullable) = false];
    63  }
    64  
    65  // QueryProposalsRequest is the request type for the Query/Proposals RPC method.
    66  message QueryProposalsRequest {
    67    option (gogoproto.equal)           = false;
    68    option (gogoproto.goproto_getters) = false;
    69  
    70    // proposal_status defines the status of the proposals.
    71    ProposalStatus proposal_status = 1;
    72  
    73    // voter defines the voter address for the proposals.
    74    string voter = 2;
    75  
    76    // depositor defines the deposit addresses from the proposals.
    77    string depositor = 3;
    78  
    79    // pagination defines an optional pagination for the request.
    80    cosmos.base.query.v1beta1.PageRequest pagination = 4;
    81  }
    82  
    83  // QueryProposalsResponse is the response type for the Query/Proposals RPC
    84  // method.
    85  message QueryProposalsResponse {
    86    repeated Proposal proposals = 1 [(gogoproto.nullable) = false];
    87  
    88    // pagination defines the pagination in the response.
    89    cosmos.base.query.v1beta1.PageResponse pagination = 2;
    90  }
    91  
    92  // QueryVoteRequest is the request type for the Query/Vote RPC method.
    93  message QueryVoteRequest {
    94    option (gogoproto.equal)           = false;
    95    option (gogoproto.goproto_getters) = false;
    96  
    97    // proposal_id defines the unique id of the proposal.
    98    uint64 proposal_id = 1;
    99  
   100    // voter defines the oter address for the proposals.
   101    string voter = 2;
   102  }
   103  
   104  // QueryVoteResponse is the response type for the Query/Vote RPC method.
   105  message QueryVoteResponse {
   106    // vote defined the queried vote.
   107    Vote vote = 1 [(gogoproto.nullable) = false];
   108  }
   109  
   110  // QueryVotesRequest is the request type for the Query/Votes RPC method.
   111  message QueryVotesRequest {
   112    // proposal_id defines the unique id of the proposal.
   113    uint64 proposal_id = 1;
   114  
   115    // pagination defines an optional pagination for the request.
   116    cosmos.base.query.v1beta1.PageRequest pagination = 2;
   117  }
   118  
   119  // QueryVotesResponse is the response type for the Query/Votes RPC method.
   120  message QueryVotesResponse {
   121    // votes defined the queried votes.
   122    repeated Vote votes = 1 [(gogoproto.nullable) = false];
   123  
   124    // pagination defines the pagination in the response.
   125    cosmos.base.query.v1beta1.PageResponse pagination = 2;
   126  }
   127  
   128  // QueryParamsRequest is the request type for the Query/Params RPC method.
   129  message QueryParamsRequest {
   130    // params_type defines which parameters to query for, can be one of "voting",
   131    // "tallying" or "deposit".
   132    string params_type = 1;
   133  }
   134  
   135  // QueryParamsResponse is the response type for the Query/Params RPC method.
   136  message QueryParamsResponse {
   137    // voting_params defines the parameters related to voting.
   138    VotingParams voting_params = 1 [(gogoproto.nullable) = false];
   139    // deposit_params defines the parameters related to deposit.
   140    DepositParams deposit_params = 2 [(gogoproto.nullable) = false];
   141    // tally_params defines the parameters related to tally.
   142    TallyParams tally_params = 3 [(gogoproto.nullable) = false];
   143  }
   144  
   145  // QueryDepositRequest is the request type for the Query/Deposit RPC method.
   146  message QueryDepositRequest {
   147    option (gogoproto.goproto_getters) = false;
   148    option (gogoproto.equal)           = false;
   149  
   150    // proposal_id defines the unique id of the proposal.
   151    uint64 proposal_id = 1;
   152  
   153    // depositor defines the deposit addresses from the proposals.
   154    string depositor = 2;
   155  }
   156  
   157  // QueryDepositResponse is the response type for the Query/Deposit RPC method.
   158  message QueryDepositResponse {
   159    // deposit defines the requested deposit.
   160    Deposit deposit = 1 [(gogoproto.nullable) = false];
   161  }
   162  
   163  // QueryDepositsRequest is the request type for the Query/Deposits RPC method.
   164  message QueryDepositsRequest {
   165    // proposal_id defines the unique id of the proposal.
   166    uint64 proposal_id = 1;
   167  
   168    // pagination defines an optional pagination for the request.
   169    cosmos.base.query.v1beta1.PageRequest pagination = 2;
   170  }
   171  
   172  // QueryDepositsResponse is the response type for the Query/Deposits RPC method.
   173  message QueryDepositsResponse {
   174    repeated Deposit deposits = 1 [(gogoproto.nullable) = false];
   175  
   176    // pagination defines the pagination in the response.
   177    cosmos.base.query.v1beta1.PageResponse pagination = 2;
   178  }
   179  
   180  // QueryTallyResultRequest is the request type for the Query/Tally RPC method.
   181  message QueryTallyResultRequest {
   182    // proposal_id defines the unique id of the proposal.
   183    uint64 proposal_id = 1;
   184  }
   185  
   186  // QueryTallyResultResponse is the response type for the Query/Tally RPC method.
   187  message QueryTallyResultResponse {
   188    // tally defines the requested tally.
   189    TallyResult tally = 1 [(gogoproto.nullable) = false];
   190  }