github.com/Finschia/finschia-sdk@v0.48.1/proto/lbm/foundation/v1/query.proto (about)

     1  syntax = "proto3";
     2  package lbm.foundation.v1;
     3  
     4  option go_package = "github.com/Finschia/finschia-sdk/x/foundation";
     5  
     6  import "cosmos/base/query/v1beta1/pagination.proto";
     7  import "google/api/annotations.proto";
     8  import "lbm/foundation/v1/foundation.proto";
     9  import "cosmos/base/v1beta1/coin.proto";
    10  
    11  import "google/protobuf/any.proto";
    12  import "cosmos_proto/cosmos.proto";
    13  
    14  import "gogoproto/gogo.proto";
    15  
    16  // Query defines the gRPC querier service for foundation module.
    17  service Query {
    18    // Params queries the module params.
    19    rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
    20      option (google.api.http).get = "/lbm/foundation/v1/params";
    21    }
    22  
    23    // Treasury queries the foundation treasury.
    24    rpc Treasury(QueryTreasuryRequest) returns (QueryTreasuryResponse) {
    25      option (google.api.http).get = "/lbm/foundation/v1/treasury";
    26    }
    27  
    28    // FoundationInfo queries foundation info.
    29    rpc FoundationInfo(QueryFoundationInfoRequest) returns (QueryFoundationInfoResponse) {
    30      option (google.api.http).get = "/lbm/foundation/v1/foundation_info";
    31    };
    32  
    33    // Member queries a member of the foundation
    34    rpc Member(QueryMemberRequest) returns (QueryMemberResponse) {
    35      option (google.api.http).get = "/lbm/foundation/v1/foundation_members/{address}";
    36    };
    37  
    38    // Members queries members of the foundation
    39    rpc Members(QueryMembersRequest) returns (QueryMembersResponse) {
    40      option (google.api.http).get = "/lbm/foundation/v1/foundation_members";
    41    };
    42  
    43    // Proposal queries a proposal based on proposal id.
    44    rpc Proposal(QueryProposalRequest) returns (QueryProposalResponse) {
    45      option (google.api.http).get = "/lbm/foundation/v1/proposals/{proposal_id}";
    46    };
    47  
    48    // Proposals queries all proposals.
    49    rpc Proposals(QueryProposalsRequest) returns (QueryProposalsResponse) {
    50      option (google.api.http).get = "/lbm/foundation/v1/proposals";
    51    };
    52  
    53    // Vote queries a vote by proposal id and voter.
    54    rpc Vote(QueryVoteRequest) returns (QueryVoteResponse) {
    55      option (google.api.http).get = "/lbm/foundation/v1/proposals/{proposal_id}/votes/{voter}";
    56    };
    57  
    58    // Votes queries a vote by proposal.
    59    rpc Votes(QueryVotesRequest) returns (QueryVotesResponse) {
    60      option (google.api.http).get = "/lbm/foundation/v1/proposals/{proposal_id}/votes";
    61    };
    62  
    63    // TallyResult queries the tally of a proposal votes.
    64    rpc TallyResult(QueryTallyResultRequest) returns (QueryTallyResultResponse) {
    65      option (google.api.http).get = "/lbm/foundation/v1/proposals/{proposal_id}/tally";
    66    };
    67  
    68    // Censorships queries the censorship informations.
    69    rpc Censorships(QueryCensorshipsRequest) returns (QueryCensorshipsResponse) {
    70      option (google.api.http).get = "/lbm/foundation/v1/censorships";
    71    }
    72  
    73    // Returns list of authorizations, granted to the grantee.
    74    rpc Grants(QueryGrantsRequest) returns (QueryGrantsResponse) {
    75      option (google.api.http).get = "/lbm/foundation/v1/grants/{grantee}/{msg_type_url}";
    76    }
    77  }
    78  
    79  // QueryParamsRequest is the request type for the Query/Params RPC method.
    80  message QueryParamsRequest {}
    81  
    82  // QueryParamsResponse is the response type for the Query/Params RPC method.
    83  message QueryParamsResponse {
    84    Params params = 1 [(gogoproto.nullable) = false];
    85  }
    86  
    87  // QueryTreasuryRequest is the request type for the
    88  // Query/Treasury RPC method.
    89  message QueryTreasuryRequest {}
    90  
    91  // QueryTreasuryResponse is the response type for the
    92  // Query/Treasury RPC method.
    93  message QueryTreasuryResponse {
    94    repeated cosmos.base.v1beta1.DecCoin amount = 1
    95        [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/Finschia/finschia-sdk/types.DecCoins"];
    96  }
    97  
    98  // QueryFoundationInfoRequest is the Query/FoundationInfo request type.
    99  message QueryFoundationInfoRequest {}
   100  
   101  // QueryFoundationInfoResponse is the Query/FoundationInfo response type.
   102  message QueryFoundationInfoResponse {
   103    // info is the FoundationInfo for the foundation.
   104    FoundationInfo info = 1 [(gogoproto.nullable) = false];
   105  }
   106  
   107  // QueryMemberRequest is the Query/Member request type.
   108  message QueryMemberRequest {
   109    string address = 1;
   110  }
   111  
   112  // QueryMemberResponse is the Query/MemberResponse response type.
   113  message QueryMemberResponse {
   114    // member is the members of the foundation.
   115    Member member = 1;
   116  }
   117  
   118  // QueryMembersRequest is the Query/Members request type.
   119  message QueryMembersRequest {
   120    // pagination defines an optional pagination for the request.
   121    cosmos.base.query.v1beta1.PageRequest pagination = 1;
   122  }
   123  
   124  // QueryMembersResponse is the Query/MembersResponse response type.
   125  message QueryMembersResponse {
   126    // members are the members of the foundation.
   127    repeated Member members = 1 [(gogoproto.nullable) = false];
   128  
   129    // pagination defines the pagination in the response.
   130    cosmos.base.query.v1beta1.PageResponse pagination = 2;
   131  }
   132  
   133  // QueryProposalRequest is the Query/Proposal request type.
   134  message QueryProposalRequest {
   135    // proposal_id is the unique ID of a proposal.
   136    uint64 proposal_id = 1;
   137  }
   138  
   139  // QueryProposalResponse is the Query/Proposal response type.
   140  message QueryProposalResponse {
   141    // proposal is the proposal info.
   142    Proposal proposal = 1;
   143  }
   144  
   145  // QueryProposals is the Query/Proposals request type.
   146  message QueryProposalsRequest {
   147    // pagination defines an optional pagination for the request.
   148    cosmos.base.query.v1beta1.PageRequest pagination = 1;
   149  }
   150  
   151  // QueryProposalsResponse is the Query/Proposals response type.
   152  message QueryProposalsResponse {
   153    // proposals are the proposals of the foundation.
   154    repeated Proposal proposals = 1 [(gogoproto.nullable) = false];
   155  
   156    // pagination defines the pagination in the response.
   157    cosmos.base.query.v1beta1.PageResponse pagination = 2;
   158  }
   159  
   160  // QueryVote is the Query/Vote request type.
   161  message QueryVoteRequest {
   162    // proposal_id is the unique ID of a proposal.
   163    uint64 proposal_id = 1;
   164  
   165    // voter is a proposal voter account address.
   166    string voter = 2;
   167  }
   168  
   169  // QueryVoteResponse is the Query/Vote response type.
   170  message QueryVoteResponse {
   171    // vote is the vote with given proposal_id and voter.
   172    Vote vote = 1;
   173  }
   174  
   175  // QueryVotes is the Query/Votes request type.
   176  message QueryVotesRequest {
   177    // proposal_id is the unique ID of a proposal.
   178    uint64 proposal_id = 1;
   179  
   180    // pagination defines an optional pagination for the request.
   181    cosmos.base.query.v1beta1.PageRequest pagination = 2;
   182  }
   183  
   184  // QueryVotesResponse is the Query/Votes response type.
   185  message QueryVotesResponse {
   186    // votes are the list of votes for given proposal_id.
   187    repeated Vote votes = 1 [(gogoproto.nullable) = false];
   188  
   189    // pagination defines the pagination in the response.
   190    cosmos.base.query.v1beta1.PageResponse pagination = 2;
   191  }
   192  
   193  // QueryTallyResultRequest is the Query/TallyResult request type.
   194  message QueryTallyResultRequest {
   195    // proposal_id is the unique id of a proposal.
   196    uint64 proposal_id = 1;
   197  }
   198  
   199  // QueryTallyResultResponse is the Query/TallyResult response type.
   200  message QueryTallyResultResponse {
   201    // tally defines the requested tally.
   202    TallyResult tally = 1 [(gogoproto.nullable) = false];
   203  }
   204  
   205  // QueryCensorshipsRequest is the request type for the Query/Censorships RPC method.
   206  message QueryCensorshipsRequest {
   207    // pagination defines an optional pagination for the request.
   208    cosmos.base.query.v1beta1.PageRequest pagination = 1;
   209  }
   210  
   211  // QueryCensorshipsResponse is the response type for the Query/Censorships RPC method.
   212  message QueryCensorshipsResponse {
   213    // authorizations is a list of grants granted for grantee.
   214    repeated Censorship censorships = 1 [(gogoproto.nullable) = false];
   215  
   216    // pagination defines the pagination in the response.
   217    cosmos.base.query.v1beta1.PageResponse pagination = 2;
   218  }
   219  
   220  // QueryGrantsRequest is the request type for the Query/Grants RPC method.
   221  message QueryGrantsRequest {
   222    string grantee = 1;
   223    // Optional, msg_type_url, when set, will query only grants matching given msg type.
   224    string msg_type_url = 2;
   225    // pagination defines an optional pagination for the request.
   226    cosmos.base.query.v1beta1.PageRequest pagination = 3;
   227  }
   228  
   229  // QueryGrantsResponse is the response type for the Query/Grants RPC method.
   230  message QueryGrantsResponse {
   231    // authorizations is a list of grants granted for grantee.
   232    repeated google.protobuf.Any authorizations = 1
   233        [(cosmos_proto.accepts_interface) = "github.com/Finschia/finschia-sdk/x/foundation.Authorization"];
   234  
   235    // pagination defines the pagination in the response.
   236    cosmos.base.query.v1beta1.PageResponse pagination = 2;
   237  }