2021-04-18 15:54:18 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
package cosmos.authz.v1beta1;
|
|
|
|
|
|
|
|
import "google/api/annotations.proto";
|
|
|
|
import "cosmos/base/query/v1beta1/pagination.proto";
|
|
|
|
import "cosmos/authz/v1beta1/authz.proto";
|
|
|
|
|
2021-08-23 13:15:55 +00:00
|
|
|
option go_package = "github.com/cosmos/cosmos-sdk/x/authz";
|
2021-04-18 15:54:18 +00:00
|
|
|
|
|
|
|
// Query defines the gRPC querier service.
|
|
|
|
service Query {
|
|
|
|
// Returns list of `Authorization`, granted to the grantee by the granter.
|
2021-08-23 13:15:55 +00:00
|
|
|
rpc Grants(QueryGrantsRequest) returns (QueryGrantsResponse) {
|
|
|
|
option (google.api.http).get = "/cosmos/authz/v1beta1/grants";
|
2021-04-18 15:54:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-08-23 13:15:55 +00:00
|
|
|
// QueryGrantsRequest is the request type for the Query/Grants RPC method.
|
|
|
|
message QueryGrantsRequest {
|
2021-04-18 15:54:18 +00:00
|
|
|
string granter = 1;
|
|
|
|
string grantee = 2;
|
2021-08-23 13:15:55 +00:00
|
|
|
// Optional, msg_type_url, when set, will query only grants matching given msg type.
|
|
|
|
string msg_type_url = 3;
|
2021-04-18 15:54:18 +00:00
|
|
|
// pagination defines an pagination for the request.
|
2021-08-23 13:15:55 +00:00
|
|
|
cosmos.base.query.v1beta1.PageRequest pagination = 4;
|
2021-04-18 15:54:18 +00:00
|
|
|
}
|
|
|
|
|
2021-08-23 13:15:55 +00:00
|
|
|
// QueryGrantsResponse is the response type for the Query/Authorizations RPC method.
|
|
|
|
message QueryGrantsResponse {
|
2021-04-18 15:54:18 +00:00
|
|
|
// authorizations is a list of grants granted for grantee by granter.
|
2021-08-23 13:15:55 +00:00
|
|
|
repeated cosmos.authz.v1beta1.Grant grants = 1;
|
2021-04-18 15:54:18 +00:00
|
|
|
// pagination defines an pagination for the response.
|
|
|
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
|
|
|
}
|