0g-chain/proto/kava/community/v1beta1/query.proto
drklee3 56f697fba6
feat: overwrite x/distribution /community_pool endpoint to include x/community balance (#1563)
* Add query path rewrites

* Add test for new x/community endpoint

* Update doc for RegisterAPIRouteRewrites

* Add changelog entry

* Add changelog entry link
2023-04-17 12:54:13 -07:00

47 lines
1.7 KiB
Protocol Buffer

syntax = "proto3";
package kava.community.v1beta1;
import "cosmos/base/v1beta1/coin.proto";
import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
option go_package = "github.com/kava-labs/kava/x/community/types";
// Query defines the gRPC querier service for x/community.
service Query {
// Balance queries the balance of all coins of x/community module.
rpc Balance(QueryBalanceRequest) returns (QueryBalanceResponse) {
option (google.api.http).get = "/kava/community/v1beta1/balance";
}
// TotalBalance queries the balance of all coins, including x/distribution,
// x/community, and supplied balances.
rpc TotalBalance(QueryTotalBalanceRequest) returns (QueryTotalBalanceResponse) {
option (google.api.http).get = "/kava/community/v1beta1/total_balance";
}
}
// QueryBalanceRequest defines the request type for querying x/community balance.
message QueryBalanceRequest {}
// QueryBalanceResponse defines the response type for querying x/community balance.
message QueryBalanceResponse {
repeated cosmos.base.v1beta1.Coin coins = 1 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
}
// QueryTotalBalanceRequest defines the request type for querying total community pool balance.
message QueryTotalBalanceRequest {}
// QueryTotalBalanceResponse defines the response type for querying total
// community pool balance. This matches the x/distribution CommunityPool query response.
message QueryTotalBalanceResponse {
// pool defines community pool's coins.
repeated cosmos.base.v1beta1.DecCoin pool = 1 [
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins",
(gogoproto.nullable) = false
];
}