github.com/Finschia/finschia-sdk@v0.49.1/proto/cosmos/distribution/v1beta1/query.proto (about) 1 syntax = "proto3"; 2 package cosmos.distribution.v1beta1; 3 4 import "cosmos/base/query/v1beta1/pagination.proto"; 5 import "gogoproto/gogo.proto"; 6 import "google/api/annotations.proto"; 7 import "cosmos/base/v1beta1/coin.proto"; 8 import "cosmos/distribution/v1beta1/distribution.proto"; 9 10 option go_package = "github.com/Finschia/finschia-sdk/x/distribution/types"; 11 12 // Query defines the gRPC querier service for distribution module. 13 service Query { 14 // Params queries params of the distribution module. 15 rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { 16 option (google.api.http).get = "/cosmos/distribution/v1beta1/params"; 17 } 18 19 // ValidatorOutstandingRewards queries rewards of a validator address. 20 rpc ValidatorOutstandingRewards(QueryValidatorOutstandingRewardsRequest) 21 returns (QueryValidatorOutstandingRewardsResponse) { 22 option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/" 23 "{validator_address}/outstanding_rewards"; 24 } 25 26 // ValidatorCommission queries accumulated commission for a validator. 27 rpc ValidatorCommission(QueryValidatorCommissionRequest) returns (QueryValidatorCommissionResponse) { 28 option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/" 29 "{validator_address}/commission"; 30 } 31 32 // ValidatorSlashes queries slash events of a validator. 33 rpc ValidatorSlashes(QueryValidatorSlashesRequest) returns (QueryValidatorSlashesResponse) { 34 option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/{validator_address}/slashes"; 35 } 36 37 // DelegationRewards queries the total rewards accrued by a delegation. 38 rpc DelegationRewards(QueryDelegationRewardsRequest) returns (QueryDelegationRewardsResponse) { 39 option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/" 40 "{validator_address}"; 41 } 42 43 // DelegationTotalRewards queries the total rewards accrued by a each 44 // validator. 45 rpc DelegationTotalRewards(QueryDelegationTotalRewardsRequest) returns (QueryDelegationTotalRewardsResponse) { 46 option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards"; 47 } 48 49 // DelegatorValidators queries the validators of a delegator. 50 rpc DelegatorValidators(QueryDelegatorValidatorsRequest) returns (QueryDelegatorValidatorsResponse) { 51 option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/" 52 "{delegator_address}/validators"; 53 } 54 55 // DelegatorWithdrawAddress queries withdraw address of a delegator. 56 rpc DelegatorWithdrawAddress(QueryDelegatorWithdrawAddressRequest) returns (QueryDelegatorWithdrawAddressResponse) { 57 option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/" 58 "{delegator_address}/withdraw_address"; 59 } 60 61 // CommunityPool queries the community pool coins. 62 rpc CommunityPool(QueryCommunityPoolRequest) returns (QueryCommunityPoolResponse) { 63 option (google.api.http).get = "/cosmos/distribution/v1beta1/community_pool"; 64 } 65 } 66 67 // QueryParamsRequest is the request type for the Query/Params RPC method. 68 message QueryParamsRequest {} 69 70 // QueryParamsResponse is the response type for the Query/Params RPC method. 71 message QueryParamsResponse { 72 // params defines the parameters of the module. 73 Params params = 1 [(gogoproto.nullable) = false]; 74 } 75 76 // QueryValidatorOutstandingRewardsRequest is the request type for the 77 // Query/ValidatorOutstandingRewards RPC method. 78 message QueryValidatorOutstandingRewardsRequest { 79 // validator_address defines the validator address to query for. 80 string validator_address = 1; 81 } 82 83 // QueryValidatorOutstandingRewardsResponse is the response type for the 84 // Query/ValidatorOutstandingRewards RPC method. 85 message QueryValidatorOutstandingRewardsResponse { 86 ValidatorOutstandingRewards rewards = 1 [(gogoproto.nullable) = false]; 87 } 88 89 // QueryValidatorCommissionRequest is the request type for the 90 // Query/ValidatorCommission RPC method 91 message QueryValidatorCommissionRequest { 92 // validator_address defines the validator address to query for. 93 string validator_address = 1; 94 } 95 96 // QueryValidatorCommissionResponse is the response type for the 97 // Query/ValidatorCommission RPC method 98 message QueryValidatorCommissionResponse { 99 // commission defines the commision the validator received. 100 ValidatorAccumulatedCommission commission = 1 [(gogoproto.nullable) = false]; 101 } 102 103 // QueryValidatorSlashesRequest is the request type for the 104 // Query/ValidatorSlashes RPC method 105 message QueryValidatorSlashesRequest { 106 option (gogoproto.goproto_getters) = false; 107 option (gogoproto.goproto_stringer) = true; 108 109 // validator_address defines the validator address to query for. 110 string validator_address = 1; 111 // starting_height defines the optional starting height to query the slashes. 112 uint64 starting_height = 2; 113 // starting_height defines the optional ending height to query the slashes. 114 uint64 ending_height = 3; 115 // pagination defines an optional pagination for the request. 116 cosmos.base.query.v1beta1.PageRequest pagination = 4; 117 } 118 119 // QueryValidatorSlashesResponse is the response type for the 120 // Query/ValidatorSlashes RPC method. 121 message QueryValidatorSlashesResponse { 122 // slashes defines the slashes the validator received. 123 repeated ValidatorSlashEvent slashes = 1 [(gogoproto.nullable) = false]; 124 125 // pagination defines the pagination in the response. 126 cosmos.base.query.v1beta1.PageResponse pagination = 2; 127 } 128 129 // QueryDelegationRewardsRequest is the request type for the 130 // Query/DelegationRewards RPC method. 131 message QueryDelegationRewardsRequest { 132 option (gogoproto.equal) = false; 133 option (gogoproto.goproto_getters) = false; 134 135 // delegator_address defines the delegator address to query for. 136 string delegator_address = 1; 137 // validator_address defines the validator address to query for. 138 string validator_address = 2; 139 } 140 141 // QueryDelegationRewardsResponse is the response type for the 142 // Query/DelegationRewards RPC method. 143 message QueryDelegationRewardsResponse { 144 // rewards defines the rewards accrued by a delegation. 145 repeated cosmos.base.v1beta1.DecCoin rewards = 1 146 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/Finschia/finschia-sdk/types.DecCoins"]; 147 } 148 149 // QueryDelegationTotalRewardsRequest is the request type for the 150 // Query/DelegationTotalRewards RPC method. 151 message QueryDelegationTotalRewardsRequest { 152 option (gogoproto.equal) = false; 153 option (gogoproto.goproto_getters) = false; 154 // delegator_address defines the delegator address to query for. 155 string delegator_address = 1; 156 } 157 158 // QueryDelegationTotalRewardsResponse is the response type for the 159 // Query/DelegationTotalRewards RPC method. 160 message QueryDelegationTotalRewardsResponse { 161 // rewards defines all the rewards accrued by a delegator. 162 repeated DelegationDelegatorReward rewards = 1 [(gogoproto.nullable) = false]; 163 // total defines the sum of all the rewards. 164 repeated cosmos.base.v1beta1.DecCoin total = 2 165 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/Finschia/finschia-sdk/types.DecCoins"]; 166 } 167 168 // QueryDelegatorValidatorsRequest is the request type for the 169 // Query/DelegatorValidators RPC method. 170 message QueryDelegatorValidatorsRequest { 171 option (gogoproto.equal) = false; 172 option (gogoproto.goproto_getters) = false; 173 174 // delegator_address defines the delegator address to query for. 175 string delegator_address = 1; 176 } 177 178 // QueryDelegatorValidatorsResponse is the response type for the 179 // Query/DelegatorValidators RPC method. 180 message QueryDelegatorValidatorsResponse { 181 option (gogoproto.equal) = false; 182 option (gogoproto.goproto_getters) = false; 183 184 // validators defines the validators a delegator is delegating for. 185 repeated string validators = 1; 186 } 187 188 // QueryDelegatorWithdrawAddressRequest is the request type for the 189 // Query/DelegatorWithdrawAddress RPC method. 190 message QueryDelegatorWithdrawAddressRequest { 191 option (gogoproto.equal) = false; 192 option (gogoproto.goproto_getters) = false; 193 194 // delegator_address defines the delegator address to query for. 195 string delegator_address = 1; 196 } 197 198 // QueryDelegatorWithdrawAddressResponse is the response type for the 199 // Query/DelegatorWithdrawAddress RPC method. 200 message QueryDelegatorWithdrawAddressResponse { 201 option (gogoproto.equal) = false; 202 option (gogoproto.goproto_getters) = false; 203 204 // withdraw_address defines the delegator address to query for. 205 string withdraw_address = 1; 206 } 207 208 // QueryCommunityPoolRequest is the request type for the Query/CommunityPool RPC 209 // method. 210 message QueryCommunityPoolRequest {} 211 212 // QueryCommunityPoolResponse is the response type for the Query/CommunityPool 213 // RPC method. 214 message QueryCommunityPoolResponse { 215 // pool defines community pool's coins. 216 repeated cosmos.base.v1beta1.DecCoin pool = 1 217 [(gogoproto.castrepeated) = "github.com/Finschia/finschia-sdk/types.DecCoins", (gogoproto.nullable) = false]; 218 }