@@ -12,24 +12,39 @@ import "feeds/v1beta1/params.proto";
12
12
13
13
// Query defines the gRPC querier service.
14
14
service Query {
15
- // Prices is an RPC method that returns all prices.
16
- rpc Prices (QueryPricesRequest ) returns (QueryPricesResponse ) {
17
- option (google.api.http ).get = "/feeds/v1beta1/prices" ;
15
+ // CurrentFeeds is an RPC method that returns a list of current supported feeds.
16
+ rpc CurrentFeeds (QueryCurrentFeedsRequest ) returns (QueryCurrentFeedsResponse ) {
17
+ option (google.api.http ).get = "/feeds/v1beta1/current-feeds" ;
18
+ }
19
+
20
+ // DelegatorSignals is an RPC method that returns signals of a delegator.
21
+ rpc DelegatorSignals (QueryDelegatorSignalsRequest ) returns (QueryDelegatorSignalsResponse ) {
22
+ option (google.api.http ).get = "/feeds/v1beta1/delegators/{delegator_address}/signals" ;
23
+ }
24
+
25
+ // IsFeeder is an RPC method that returns whether an account is a feeder for a specified validator.
26
+ rpc IsFeeder (QueryIsFeederRequest ) returns (QueryIsFeederResponse ) {
27
+ option (google.api.http ).get = "/feeds/v1beta1/feeder/{validator_address}/{feeder_address}" ;
28
+ }
29
+
30
+ // Params is an RPC method that returns all parameters of the module.
31
+ rpc Params (QueryParamsRequest ) returns (QueryParamsResponse ) {
32
+ option (google.api.http ).get = "/feeds/v1beta1/params" ;
18
33
}
19
34
20
35
// Price is an RPC method that returns price by signal id.
21
36
rpc Price (QueryPriceRequest ) returns (QueryPriceResponse ) {
22
37
option (google.api.http ).get = "/feeds/v1beta1/prices/{signal_id}" ;
23
38
}
24
39
25
- // ValidatorPrices is an RPC method that returns prices of a validator .
26
- rpc ValidatorPrices ( QueryValidatorPricesRequest ) returns (QueryValidatorPricesResponse ) {
27
- option (google.api.http ).get = "/feeds/v1beta1/validators/{validator}/ prices" ;
40
+ // Prices is an RPC method that returns all prices .
41
+ rpc Prices ( QueryPricesRequest ) returns (QueryPricesResponse ) {
42
+ option (google.api.http ).get = "/feeds/v1beta1/prices" ;
28
43
}
29
44
30
- // ValidValidator is an RPC method that returns flag to show if the validator is required to send prices .
31
- rpc ValidValidator ( QueryValidValidatorRequest ) returns (QueryValidValidatorResponse ) {
32
- option (google.api.http ).get = "/feeds/v1beta1/validators/{validator} " ;
45
+ // ReferenceSourceConfig is an RPC method that returns information on the reference price source .
46
+ rpc ReferenceSourceConfig ( QueryReferenceSourceConfigRequest ) returns (QueryReferenceSourceConfigResponse ) {
47
+ option (google.api.http ).get = "/feeds/v1beta1/reference-source-config " ;
33
48
}
34
49
35
50
// SignalTotalPowers is an RPC method that returns all signal-total-powers or specified signal-total-power by signal
@@ -38,48 +53,59 @@ service Query {
38
53
option (google.api.http ).get = "/feeds/v1beta1/signal-total-powers" ;
39
54
}
40
55
41
- // Params is an RPC method that returns all parameters of the module .
42
- rpc Params ( QueryParamsRequest ) returns (QueryParamsResponse ) {
43
- option (google.api.http ).get = "/feeds/v1beta1/params " ;
56
+ // ValidValidator is an RPC method that returns a flag to show if the validator is required to send prices .
57
+ rpc ValidValidator ( QueryValidValidatorRequest ) returns (QueryValidValidatorResponse ) {
58
+ option (google.api.http ).get = "/feeds/v1beta1/valid/{validator_address} " ;
44
59
}
45
60
46
- // ReferenceSourceConfig is an RPC method that returns information of reference price source .
47
- rpc ReferenceSourceConfig ( QueryReferenceSourceConfigRequest ) returns (QueryReferenceSourceConfigResponse ) {
48
- option (google.api.http ).get = "/feeds/v1beta1/reference-source-config " ;
61
+ // ValidatorPrices is an RPC method that returns prices of a validator .
62
+ rpc ValidatorPrices ( QueryValidatorPricesRequest ) returns (QueryValidatorPricesResponse ) {
63
+ option (google.api.http ).get = "/feeds/v1beta1/validators/{validator_address}/prices " ;
49
64
}
65
+ }
50
66
51
- // DelegatorSignals is an RPC method that returns signals of a delegator.
52
- rpc DelegatorSignals (QueryDelegatorSignalsRequest ) returns (QueryDelegatorSignalsResponse ) {
53
- option (google.api.http ).get = "/feeds/v1beta1/delegators/{delegator}/signals" ;
54
- }
67
+ // QueryCurrentFeedsRequest is the request type for the Query/CurrentFeeds RPC method.
68
+ message QueryCurrentFeedsRequest {}
55
69
56
- // CurrentFeeds is an RPC method that returns a list of current supported feeds.
57
- rpc CurrentFeeds (QueryCurrentFeedsRequest ) returns (QueryCurrentFeedsResponse ) {
58
- option (google.api.http ).get = "/feeds/v1beta1/current-feeds" ;
59
- }
70
+ // QueryCurrentFeedsResponse is the response type for the Query/CurrentFeeds RPC method.
71
+ message QueryCurrentFeedsResponse {
72
+ // current_feeds is a list of currently supported feed-with-deviations, and its last update time and block.
73
+ CurrentFeedWithDeviations current_feeds = 1 [(gogoproto.nullable ) = false ];
74
+ }
60
75
61
- // IsFeeder is an RPC method that returns whether an account is a feeder for specified validator .
62
- rpc IsFeeder ( QueryIsFeederRequest ) returns ( QueryIsFeederResponse ) {
63
- option (google.api .http ).get = "/feeds/v1beta1/feeder/{validator_address}/{feeder_address}" ;
64
- }
76
+ // QueryDelegatorSignalsRequest is the request type for the Query/DelegatorSignals RPC method .
77
+ message QueryDelegatorSignalsRequest {
78
+ // delegator_address is the delegator address to query signal for.
79
+ string delegator_address = 1 [ (cosmos_proto .scalar ) = "cosmos.AddressString" ];
65
80
}
66
81
67
- // QueryPricesRequest is the request type for the Query/Prices RPC method.
68
- message QueryPricesRequest {
69
- // signal_ids is a list of signal ids to query prices for.
70
- repeated string signal_ids = 1 ;
82
+ // QueryDelegatorSignalsResponse is the response type for the Query/DelegatorSignals RPC method.
83
+ message QueryDelegatorSignalsResponse {
84
+ // signals is a list of signals submitted by the delegator.
85
+ repeated Signal signals = 1 [(gogoproto.nullable ) = false ];
86
+ }
71
87
72
- // pagination is the pagination for the request.
73
- cosmos.base.query.v1beta1.PageRequest pagination = 2 ;
88
+ // QueryIsFeederRequest is the request type for the Query/IsFeeder RPC method.
89
+ message QueryIsFeederRequest {
90
+ // validator_address is a validator address.
91
+ string validator_address = 1 ;
92
+ // feeder_address is a candidate account.
93
+ string feeder_address = 2 ;
74
94
}
75
95
76
- // QueryPricesResponse is the response type for the Query/Prices RPC method.
77
- message QueryPricesResponse {
78
- // prices is a list of prices.
79
- repeated Price prices = 1 ;
96
+ // QueryIsFeederResponse is the response type for the Query/IsFeeder RPC method.
97
+ message QueryIsFeederResponse {
98
+ // is_feeder is true if this account has been granted by validator.
99
+ bool is_feeder = 1 ;
100
+ }
80
101
81
- // pagination is the pagination information in the response.
82
- cosmos.base.query.v1beta1.PageResponse pagination = 2 ;
102
+ // QueryParamsRequest is the request type for the Query/Params RPC method.
103
+ message QueryParamsRequest {}
104
+
105
+ // QueryParamsResponse is the response type for the Query/Params RPC method.
106
+ message QueryParamsResponse {
107
+ // params is the parameters of the module.
108
+ Params params = 1 [(gogoproto.nullable ) = false ];
83
109
}
84
110
85
111
// QueryPriceRequest is the request type for the Query/Price RPC method.
@@ -94,31 +120,31 @@ message QueryPriceResponse {
94
120
Price price = 1 [(gogoproto.nullable ) = false ];
95
121
}
96
122
97
- // QueryValidatorPricesRequest is the request type for the Query/ValidatorPrices RPC method.
98
- message QueryValidatorPricesRequest {
99
- // validator is the validator address to query prices for.
100
- string validator = 1 [ (cosmos_proto .scalar ) = "cosmos.AddressString" ] ;
123
+ // QueryPricesRequest is the request type for the Query/Prices RPC method.
124
+ message QueryPricesRequest {
125
+ // signal_ids is a list of signal ids to query prices for.
126
+ repeated string signal_ids = 1 ;
101
127
102
- // signal_ids is the list of signal ids to query the price for .
103
- repeated string signal_ids = 2 ;
128
+ // pagination is the pagination for the request .
129
+ cosmos.base.query.v1beta1.PageRequest pagination = 2 ;
104
130
}
105
131
106
- // QueryValidatorPricesResponse is the response type for the Query/ValidatorPrices RPC method.
107
- message QueryValidatorPricesResponse {
108
- // validator_prices is a list of prices submitted by the validator.
109
- repeated ValidatorPrice validator_prices = 1 [(gogoproto.nullable ) = false ];
110
- }
132
+ // QueryPricesResponse is the response type for the Query/Prices RPC method.
133
+ message QueryPricesResponse {
134
+ // prices is a list of prices.
135
+ repeated Price prices = 1 ;
111
136
112
- // QueryValidValidatorRequest is the request type for the Query/ValidValidator RPC method.
113
- message QueryValidValidatorRequest {
114
- // validator is the validator address to query the flag.
115
- string validator = 1 [(cosmos_proto.scalar ) = "cosmos.AddressString" ];
137
+ // pagination is the pagination information in the response.
138
+ cosmos.base.query.v1beta1.PageResponse pagination = 2 ;
116
139
}
117
140
118
- // QueryValidValidatorResponse is the response type for the Query/ValidValidator RPC method.
119
- message QueryValidValidatorResponse {
120
- // valid is a valid flag.
121
- bool valid = 1 ;
141
+ // QueryReferenceSourceConfigRequest is the request type for the Query/ReferenceSourceConfig RPC method.
142
+ message QueryReferenceSourceConfigRequest {}
143
+
144
+ // QueryReferenceSourceConfigResponse is the response type for the Query/ReferenceSourceConfig RPC method.
145
+ message QueryReferenceSourceConfigResponse {
146
+ // reference_source_config is the information about the reference price source.
147
+ ReferenceSourceConfig reference_source_config = 1 [(gogoproto.nullable ) = false ];
122
148
}
123
149
124
150
// QuerySignalTotalPowersRequest is the request type for the Query/SignalTotalPowers RPC method.
@@ -139,56 +165,29 @@ message QuerySignalTotalPowersResponse {
139
165
cosmos.base.query.v1beta1.PageResponse pagination = 2 ;
140
166
}
141
167
142
- // QueryParamsRequest is the request type for the Query/Params RPC method.
143
- message QueryParamsRequest {}
144
-
145
- // QueryParamsResponse is the response type for the Query/Params RPC method.
146
- message QueryParamsResponse {
147
- // params is the parameters of the module.
148
- Params params = 1 [(gogoproto.nullable ) = false ];
149
- }
150
-
151
- // QueryReferenceSourceConfigRequest is the request type for the Query/ReferenceSourceConfig RPC method.
152
- message QueryReferenceSourceConfigRequest {}
153
-
154
- // QueryReferenceSourceConfigResponse is the response type for the Query/ReferenceSourceConfig RPC method.
155
- message QueryReferenceSourceConfigResponse {
156
- // reference_source_config is the information about reference price source.
157
- ReferenceSourceConfig reference_source_config = 1 [(gogoproto.nullable ) = false ];
158
- }
159
-
160
- // QueryDelegatorSignalsRequest is the request type for the Query/DelegatorSignals RPC method.
161
- message QueryDelegatorSignalsRequest {
162
- // delegator is the delegator address to query signal for.
163
- string delegator = 1 [(cosmos_proto.scalar ) = "cosmos.AddressString" ];
168
+ // QueryValidValidatorRequest is the request type for the Query/ValidValidator RPC method.
169
+ message QueryValidValidatorRequest {
170
+ // validator_address is the validator address to query the flag.
171
+ string validator_address = 1 [(cosmos_proto.scalar ) = "cosmos.AddressString" ];
164
172
}
165
173
166
- // QueryDelegatorSignalsResponse is the response type for the Query/DelegatorSignals RPC method.
167
- message QueryDelegatorSignalsResponse {
168
- // signals is a list of signals submitted by the delegator .
169
- repeated Signal signals = 1 [ (gogoproto .nullable ) = false ] ;
174
+ // QueryValidValidatorResponse is the response type for the Query/ValidValidator RPC method.
175
+ message QueryValidValidatorResponse {
176
+ // valid is a valid flag .
177
+ bool valid = 1 ;
170
178
}
171
179
172
- // QueryCurrentFeedsRequest is the request type for the Query/CurrentFeeds RPC method.
173
- message QueryCurrentFeedsRequest {}
174
-
175
- // QueryCurrentFeedsResponse is the response type for the Query/CurrentFeeds RPC method.
176
- message QueryCurrentFeedsResponse {
177
- // current_feeds is a list of currently supported feed-with-deviations, and its last update time and
178
- // block.
179
- CurrentFeedWithDeviations current_feeds = 1 [(gogoproto.nullable ) = false ];
180
- }
180
+ // QueryValidatorPricesRequest is the request type for the Query/ValidatorPrices RPC method.
181
+ message QueryValidatorPricesRequest {
182
+ // validator_address is the validator address to query prices for.
183
+ string validator_address = 1 [(cosmos_proto.scalar ) = "cosmos.AddressString" ];
181
184
182
- // QueryIsFeederRequest is the request type for the Query/IsFeeder RPC method.
183
- message QueryIsFeederRequest {
184
- // validator_address is a validator address.
185
- string validator_address = 1 ;
186
- // feeder_address is a candidate account.
187
- string feeder_address = 2 ;
185
+ // signal_ids is the list of signal ids to query the price for.
186
+ repeated string signal_ids = 2 ;
188
187
}
189
188
190
- // QueryIsFeederResponse is the response type for the Query/IsFeeder RPC method.
191
- message QueryIsFeederResponse {
192
- // is_feeder is true if this account has been granted by validator.
193
- bool is_feeder = 1 ;
189
+ // QueryValidatorPricesResponse is the response type for the Query/ValidatorPrices RPC method.
190
+ message QueryValidatorPricesResponse {
191
+ // validator_prices is a list of prices submitted by the validator.
192
+ repeated ValidatorPrice validator_prices = 1 [ (gogoproto .nullable ) = false ] ;
194
193
}
0 commit comments