Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Grpc gateway annotations #6918

Merged
merged 101 commits into from
Aug 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
9a943bb
grpc for bank module
atheeshp Aug 2, 2020
52465d3
edit module.go
atheeshp Aug 2, 2020
84735ee
Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/59…
atheeshp Aug 2, 2020
4da61f0
added annotations for x/auth query proto
atheeshp Aug 2, 2020
dd41bf4
generated gw file
atheeshp Aug 2, 2020
3264244
added grpc gateway for x/staking query proto
atheeshp Aug 2, 2020
50a582c
Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/59…
atheeshp Aug 3, 2020
304725d
added annotations for evidence
atheeshp Aug 3, 2020
0019542
added annotations for gov query proto
atheeshp Aug 3, 2020
c198157
added annotations
atheeshp Aug 3, 2020
e95f786
Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/59…
atheeshp Aug 3, 2020
4e6efef
added annotations for slashing module
atheeshp Aug 3, 2020
fe8861d
updated annotations
atheeshp Aug 3, 2020
8c8e775
added annotations for staking module
atheeshp Aug 3, 2020
1fe80df
added annotations for upgrade query
atheeshp Aug 3, 2020
94d0554
annotations added for x/ibc/channel query proto
atheeshp Aug 3, 2020
ad64f11
added annotations for ibc/connection query proto
atheeshp Aug 3, 2020
6e54f0b
updated annotations
atheeshp Aug 3, 2020
4093561
updated annotations
atheeshp Aug 3, 2020
c312b28
annotation changes
atheeshp Aug 3, 2020
ce21f9f
ommitted ibc module
atheeshp Aug 3, 2020
5fdce6e
Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/59…
atheeshp Aug 3, 2020
77563b2
updated go.mod
atheeshp Aug 3, 2020
4c1c261
fixed lint issue
atheeshp Aug 3, 2020
2599d09
review changes
atheeshp Aug 3, 2020
8f17e57
review changes
atheeshp Aug 3, 2020
48398ce
review changes
atheeshp Aug 4, 2020
19abdd3
review changes
atheeshp Aug 4, 2020
125f3b8
Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/59…
atheeshp Aug 4, 2020
113d3be
go sum changes
atheeshp Aug 4, 2020
03620b4
updated annotations
atheeshp Aug 4, 2020
a52869f
annotation changes
atheeshp Aug 4, 2020
e291450
Merge branch 'master' into atheesh/5921-grpc-gateway
atheeshp Aug 4, 2020
2fc5628
Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/59…
atheeshp Aug 4, 2020
bc4cd94
Merge branch 'atheesh/5921-grpc-gateway' of github.com:cosmos/cosmos-…
atheeshp Aug 4, 2020
1513c4b
Merge branch 'master' into atheesh/5921-grpc-gateway
sahith-narahari Aug 4, 2020
e490f26
Merge branch 'master' into atheesh/5921-grpc-gateway
atheeshp Aug 5, 2020
324d1c2
Fix proto lint issues
anilcse Aug 5, 2020
2581419
Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/59…
atheeshp Aug 6, 2020
9bac410
review changes
atheeshp Aug 6, 2020
5e9fbc6
Merge branch 'atheesh/5921-grpc-gateway' of github.com:cosmos/cosmos-…
atheeshp Aug 6, 2020
3510d26
Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/59…
atheeshp Aug 6, 2020
0834305
review changes
atheeshp Aug 6, 2020
ab817d5
Merge branch 'master' into atheesh/5921-grpc-gateway
atheeshp Aug 7, 2020
2a98fd2
review changes
atheeshp Aug 7, 2020
d3b50bf
Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/59…
atheeshp Aug 7, 2020
02939dd
Merge branch 'atheesh/5921-grpc-gateway' of github.com:cosmos/cosmos-…
atheeshp Aug 7, 2020
e0bb1b4
Merge branch 'master' into atheesh/5921-grpc-gateway
atheeshp Aug 9, 2020
f213e41
Merge branch 'atheesh/5921-grpc-gateway' of github.com:cosmos/cosmos-…
atheeshp Aug 10, 2020
b3d0732
discussion changes
atheeshp Aug 10, 2020
059d8c7
review changes
atheeshp Aug 10, 2020
bb499d5
grpc for bank module
atheeshp Aug 2, 2020
3922b15
edit module.go
atheeshp Aug 2, 2020
41c731c
added annotations for x/auth query proto
atheeshp Aug 2, 2020
41a6044
generated gw file
atheeshp Aug 2, 2020
25f0009
added grpc gateway for x/staking query proto
atheeshp Aug 2, 2020
05bf4df
added annotations for evidence
atheeshp Aug 3, 2020
60e367a
added annotations for gov query proto
atheeshp Aug 3, 2020
4ed79e8
added annotations
atheeshp Aug 3, 2020
bcd82c3
added annotations for slashing module
atheeshp Aug 3, 2020
5c8e539
updated annotations
atheeshp Aug 3, 2020
baf8832
added annotations for staking module
atheeshp Aug 3, 2020
c576dbc
added annotations for upgrade query
atheeshp Aug 3, 2020
616df4b
annotations added for x/ibc/channel query proto
atheeshp Aug 3, 2020
51ded63
added annotations for ibc/connection query proto
atheeshp Aug 3, 2020
bfc8e89
updated annotations
atheeshp Aug 3, 2020
10b6495
updated annotations
atheeshp Aug 3, 2020
2ba6755
annotation changes
atheeshp Aug 3, 2020
4a9cec7
ommitted ibc module
atheeshp Aug 3, 2020
4515b54
updated go.mod
atheeshp Aug 3, 2020
5348be2
fixed lint issue
atheeshp Aug 3, 2020
da15459
review changes
atheeshp Aug 3, 2020
4b808eb
review changes
atheeshp Aug 3, 2020
98a0875
review changes
atheeshp Aug 4, 2020
adec92e
review changes
atheeshp Aug 4, 2020
2e2a86c
go sum changes
atheeshp Aug 4, 2020
c1eedf8
updated annotations
atheeshp Aug 4, 2020
324e271
annotation changes
atheeshp Aug 4, 2020
a856b65
Fix proto lint issues
anilcse Aug 5, 2020
df85474
review changes
atheeshp Aug 6, 2020
e32ae7c
review changes
atheeshp Aug 6, 2020
9946434
review changes
atheeshp Aug 7, 2020
031b8a6
discussion changes
atheeshp Aug 10, 2020
7a10390
review changes
atheeshp Aug 10, 2020
eef029c
Merge branch 'atheesh/5921-grpc-gateway' of github.com:cosmos/cosmos-…
atheeshp Aug 10, 2020
f9d68a4
fixed conflicts
atheeshp Aug 10, 2020
cb31884
review changes
atheeshp Aug 10, 2020
2491736
Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/59…
atheeshp Aug 11, 2020
8930fb4
Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/59…
atheeshp Aug 11, 2020
811c6bf
updated gw files
atheeshp Aug 11, 2020
6284436
lint
atheeshp Aug 11, 2020
52a0a2d
lint
atheeshp Aug 11, 2020
c661334
lint
atheeshp Aug 11, 2020
6d8dfaa
Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/59…
atheeshp Aug 12, 2020
83e3965
added missing annotations
atheeshp Aug 12, 2020
f9be33c
review changes
atheeshp Aug 12, 2020
879249e
Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/59…
atheeshp Aug 12, 2020
e4d9d9d
review changes
atheeshp Aug 12, 2020
873848b
review changes
atheeshp Aug 12, 2020
25ac9bd
Merge branch 'master' of github.com:cosmos/cosmos-sdk into atheesh/59…
atheeshp Aug 14, 2020
aa9f6ad
review changes
atheeshp Aug 14, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion buf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ build:
- proto
- third_party/proto
excludes:
- third_party/proto/google
- third_party/proto/google/protobuf
lint:
use:
- DEFAULT
Expand All @@ -18,6 +18,7 @@ lint:
- tendermint
- gogoproto
- cosmos_proto
- google
- confio
breaking:
use:
Expand All @@ -26,3 +27,5 @@ breaking:
- tendermint
- gogoproto
- cosmos_proto
- google
- confio
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ require (
github.com/golang/protobuf v1.4.2
github.com/gorilla/handlers v1.4.2
github.com/gorilla/mux v1.7.4
github.com/grpc-ecosystem/grpc-gateway v1.14.6
github.com/hashicorp/golang-lru v0.5.4
github.com/mattn/go-isatty v0.0.12
github.com/otiai10/copy v1.2.0
Expand All @@ -39,6 +40,7 @@ require (
github.com/tendermint/iavl v0.14.0
github.com/tendermint/tendermint v0.33.8
github.com/tendermint/tm-db v0.5.1
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013
amaury1093 marked this conversation as resolved.
Show resolved Hide resolved
google.golang.org/grpc v1.31.0
google.golang.org/protobuf v1.25.0
gopkg.in/yaml.v2 v2.3.0
Expand Down
9 changes: 9 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
Expand Down Expand Up @@ -228,6 +229,8 @@ github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
github.com/grpc-ecosystem/grpc-gateway v1.14.6 h1:8ERzHx8aj1Sc47mu9n/AksaKCSWrMchFtkdrS4BIj5o=
github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw=
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU=
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0=
github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f h1:8N8XWLZelZNibkhM1FuF+3Ad3YIbgirjdMiVA0eUkaM=
Expand Down Expand Up @@ -445,6 +448,7 @@ github.com/regen-network/cosmos-proto v0.3.0/go.mod h1:zuP2jVPHab6+IIyOx3nXHFN+e
github.com/regen-network/protobuf v1.3.2-alpha.regen.4 h1:c9jEnU+xm6vqyrQe3M94UFWqiXxRIKKnqBOh2EACmBE=
github.com/regen-network/protobuf v1.3.2-alpha.regen.4/go.mod h1:/J8/bR1T/NXyIdQDLUaq15LjNE83nRzkyrLAMcPewig=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik=
github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
Expand Down Expand Up @@ -612,13 +616,15 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLL
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k=
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200625001655-4c5254603344 h1:vGXIOMxbNfDTk/aXCmfdLgkrSV+Z2tcbze+pEc3v5W4=
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand Down Expand Up @@ -717,6 +723,7 @@ google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBr
google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20200324203455-a04cca1dde73 h1:+yTMTeazSO5iBqU9NR53hgriivQQbYa5Uuaj8r3qKII=
google.golang.org/genproto v0.0.0-20200324203455-a04cca1dde73/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
Expand All @@ -736,6 +743,7 @@ google.golang.org/grpc v1.28.0 h1:bO/TA4OxCOummhSf10siHuG7vJOiwh7SpRpFZDkOgl4=
google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
google.golang.org/grpc v1.28.1 h1:C1QC6KzgSiLyBabDi87BbjaGreoRgGUF5nOyvfrAZ1k=
google.golang.org/grpc v1.28.1/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI=
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
Expand Down Expand Up @@ -769,6 +777,7 @@ gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRN
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
Expand Down
9 changes: 7 additions & 2 deletions proto/cosmos/auth/v1beta1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package cosmos.auth.v1beta1;

import "gogoproto/gogo.proto";
import "google/protobuf/any.proto";
import "google/api/annotations.proto";
import "cosmos/auth/v1beta1/auth.proto";
import "cosmos_proto/cosmos.proto";

Expand All @@ -11,10 +12,14 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types";
// Query defines the gRPC querier service.
service Query{
// Account returns account details based on address.
rpc Account (QueryAccountRequest) returns (QueryAccountResponse) {}
rpc Account (QueryAccountRequest) returns (QueryAccountResponse) {
option (google.api.http).get = "/cosmos/auth/v1beta1/accounts/{address}";
}

// Params queries all parameters.
rpc Params (QueryParamsRequest) returns (QueryParamsResponse) {}
rpc Params (QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/cosmos/auth/v1beta1/params";
}
}

// QueryAccountRequest is the request type for the Query/Account RPC method.
Expand Down
17 changes: 13 additions & 4 deletions proto/cosmos/bank/v1beta1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,32 @@ package cosmos.bank.v1beta1;

import "cosmos/base/query/v1beta1/pagination.proto";
import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "cosmos/base/v1beta1/coin.proto";

option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types";

// Query defines the gRPC querier service.
service Query {
// Balance queries the balance of a single coin for a single account.
rpc Balance(QueryBalanceRequest) returns (QueryBalanceResponse) {}
rpc Balance(QueryBalanceRequest) returns (QueryBalanceResponse) {
option (google.api.http).get = "/cosmos/bank/v1beta1/balances/{address}/{denom}";
}

// AllBalances queries the balance of all coins for a single account.
rpc AllBalances(QueryAllBalancesRequest) returns (QueryAllBalancesResponse) {}
rpc AllBalances(QueryAllBalancesRequest) returns (QueryAllBalancesResponse) {
option (google.api.http).get = "/cosmos/bank/v1beta1/balances/{address}";
}

// TotalSupply queries the total supply of all coins.
rpc TotalSupply(QueryTotalSupplyRequest) returns (QueryTotalSupplyResponse) {}
rpc TotalSupply(QueryTotalSupplyRequest) returns (QueryTotalSupplyResponse) {
option (google.api.http).get = "/cosmos/bank/v1beta1/supply";
}

// SupplyOf queries the supply of a single coin.
rpc SupplyOf(QuerySupplyOfRequest) returns (QuerySupplyOfResponse) {}
rpc SupplyOf(QuerySupplyOfRequest) returns (QuerySupplyOfResponse) {
option (google.api.http).get = "/cosmos/bank/v1beta1/supply/{denom}";
}
}

// QueryBalanceRequest is the request type for the Query/Balance RPC method.
Expand Down
37 changes: 28 additions & 9 deletions proto/cosmos/distribution/v1beta1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package cosmos.distribution.v1beta1;

import "cosmos/base/query/v1beta1/pagination.proto";
import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "cosmos/base/v1beta1/coin.proto";
import "cosmos/distribution/v1beta1/distribution.proto";

Expand All @@ -11,31 +12,49 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/distribution/types";
// Query defines the gRPC querier service for distribution module.
service Query {
// Params queries params of the distribution module.
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {}
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/cosmos/distribution/v1beta1/params";
}

// ValidatorOutstandingRewards queries rewards of a validator address.
rpc ValidatorOutstandingRewards(QueryValidatorOutstandingRewardsRequest) returns (QueryValidatorOutstandingRewardsResponse) {}
rpc ValidatorOutstandingRewards(QueryValidatorOutstandingRewardsRequest) returns (QueryValidatorOutstandingRewardsResponse) {
option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards";
}

// ValidatorCommission queries accumulated commission for a validator.
rpc ValidatorCommission (QueryValidatorCommissionRequest) returns (QueryValidatorCommissionResponse) {}
rpc ValidatorCommission (QueryValidatorCommissionRequest) returns (QueryValidatorCommissionResponse) {
option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/{validator_address}/commission";
}

// ValidatorSlashes queries slash events of a validator.
rpc ValidatorSlashes (QueryValidatorSlashesRequest) returns (QueryValidatorSlashesResponse) {}
rpc ValidatorSlashes (QueryValidatorSlashesRequest) returns (QueryValidatorSlashesResponse) {
option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/{validator_address}/slashes";
}

// DelegationRewards queries the total rewards accrued by a delegation.
rpc DelegationRewards (QueryDelegationRewardsRequest) returns (QueryDelegationRewardsResponse) {}
rpc DelegationRewards (QueryDelegationRewardsRequest) returns (QueryDelegationRewardsResponse) {
option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}";
}

// DelegationTotalRewards queries the total rewards accrued by a each validator.
rpc DelegationTotalRewards (QueryDelegationTotalRewardsRequest) returns (QueryDelegationTotalRewardsResponse) {}
rpc DelegationTotalRewards (QueryDelegationTotalRewardsRequest) returns (QueryDelegationTotalRewardsResponse) {
option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards";
}

// DelegatorValidators queries the validators of a delegator.
rpc DelegatorValidators (QueryDelegatorValidatorsRequest) returns (QueryDelegatorValidatorsResponse) {}
rpc DelegatorValidators (QueryDelegatorValidatorsRequest) returns (QueryDelegatorValidatorsResponse) {
option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/validators";
}

// DelegatorWithdrawAddress queries withdraw address of a delegator.
rpc DelegatorWithdrawAddress (QueryDelegatorWithdrawAddressRequest) returns (QueryDelegatorWithdrawAddressResponse) {}
rpc DelegatorWithdrawAddress (QueryDelegatorWithdrawAddressRequest) returns (QueryDelegatorWithdrawAddressResponse) {
option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address";
}

// CommunityPool queries the community pool coins.
rpc CommunityPool (QueryCommunityPoolRequest) returns (QueryCommunityPoolResponse) {}
rpc CommunityPool (QueryCommunityPoolRequest) returns (QueryCommunityPoolResponse) {
option (google.api.http).get = "/cosmos/distribution/v1beta1/community_pool";
}
}

// QueryParamsRequest is the request type for the Query/Params RPC method.
Expand Down
11 changes: 8 additions & 3 deletions proto/cosmos/evidence/v1beta1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,27 @@ package cosmos.evidence.v1beta1;
import "cosmos/base/query/v1beta1/pagination.proto";
import "gogoproto/gogo.proto";
import "google/protobuf/any.proto";
import "google/api/annotations.proto";

option go_package = "github.com/cosmos/cosmos-sdk/x/evidence/types";

// Query defines the gRPC querier service.
service Query {
// Evidence queries evidence based on evidence hash.
rpc Evidence(QueryEvidenceRequest) returns (QueryEvidenceResponse) {}
rpc Evidence(QueryEvidenceRequest) returns (QueryEvidenceResponse) {
option (google.api.http).get = "/cosmos/evidence/v1beta1/evidence/{evidence_hash}";
}

// AllEvidence queries all evidence.
rpc AllEvidence(QueryAllEvidenceRequest) returns (QueryAllEvidenceResponse) {}
rpc AllEvidence(QueryAllEvidenceRequest) returns (QueryAllEvidenceResponse) {
option (google.api.http).get = "/cosmos/evidence/v1beta1/evidence";
}
}

// QueryEvidenceRequest is the request type for the Query/Evidence RPC method.
message QueryEvidenceRequest {
// evidence_hash defines the hash of the requested evidence.
bytes evidence_hash = 1 [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"];;
bytes evidence_hash = 1 [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"];
}

// QueryEvidenceResponse is the response type for the Query/Evidence RPC method.
Expand Down
33 changes: 25 additions & 8 deletions proto/cosmos/gov/v1beta1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,52 @@ package cosmos.gov.v1beta1;

import "cosmos/base/query/v1beta1/pagination.proto";
import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "cosmos/gov/v1beta1/gov.proto";

option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types";

// Query defines the gRPC querier service for gov module
service Query {
// Proposal queries proposal details based on ProposalID.
rpc Proposal (QueryProposalRequest) returns (QueryProposalResponse) {}
rpc Proposal (QueryProposalRequest) returns (QueryProposalResponse) {
option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}";
}

// Proposals queries all proposals based on given status.
rpc Proposals (QueryProposalsRequest) returns (QueryProposalsResponse) {}
rpc Proposals (QueryProposalsRequest) returns (QueryProposalsResponse) {
option (google.api.http).get = "/cosmos/gov/v1beta1/proposals";
}

// Vote queries voted information based on proposalID, voterAddr.
rpc Vote(QueryVoteRequest) returns (QueryVoteResponse) {}
rpc Vote(QueryVoteRequest) returns (QueryVoteResponse) {
option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}";
}

// Votes queries votes of a given proposal.
rpc Votes (QueryVotesRequest) returns (QueryVotesResponse) {}
rpc Votes (QueryVotesRequest) returns (QueryVotesResponse) {
option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/votes";
}

// Params queries all parameters of the gov module.
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {}
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/cosmos/gov/v1beta1/params/{params_type}";
}

// Deposit queries single deposit information based proposalID, depositAddr.
rpc Deposit(QueryDepositRequest) returns (QueryDepositResponse) {}
rpc Deposit(QueryDepositRequest) returns (QueryDepositResponse) {
option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}";
}

// Deposits queries all deposits of a single proposal.
rpc Deposits(QueryDepositsRequest) returns (QueryDepositsResponse) {}
rpc Deposits(QueryDepositsRequest) returns (QueryDepositsResponse) {
option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits";
}

// TallyResult queries the tally of a proposal vote.
rpc TallyResult(QueryTallyResultRequest) returns (QueryTallyResultResponse) {}
rpc TallyResult(QueryTallyResultRequest) returns (QueryTallyResultResponse) {
option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/tally";
}
}

// QueryProposalRequest is the request type for the Query/Proposal RPC method.
Expand Down
13 changes: 10 additions & 3 deletions proto/cosmos/mint/v1beta1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,27 @@ syntax = "proto3";
package cosmos.mint.v1beta1;

import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "cosmos/mint/v1beta1/mint.proto";

option go_package = "github.com/cosmos/cosmos-sdk/x/mint/types";

// Query provides defines the gRPC querier service.
service Query {
// Params returns the total set of minting parameters.
rpc Params (QueryParamsRequest) returns (QueryParamsResponse) {}
rpc Params (QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/cosmos/mint/v1beta1/params";
}

// Inflation returns the current minting inflation value.
rpc Inflation (QueryInflationRequest) returns (QueryInflationResponse) {}
rpc Inflation (QueryInflationRequest) returns (QueryInflationResponse) {
option (google.api.http).get = "/cosmos/mint/v1beta1/inflation";
}

// AnnualProvisions current minting annual provisions value.
rpc AnnualProvisions (QueryAnnualProvisionsRequest) returns (QueryAnnualProvisionsResponse) {}
rpc AnnualProvisions (QueryAnnualProvisionsRequest) returns (QueryAnnualProvisionsResponse) {
option (google.api.http).get = "/cosmos/mint/v1beta1/annual_provisions";
}
}

// QueryParamsRequest is the request type for the Query/Params RPC method.
Expand Down
Loading