2022-01-08 01:59:34 +00:00
|
|
|
// Since: cosmos-sdk 0.43
|
|
|
|
syntax = "proto3";
|
|
|
|
package cosmos.feegrant.v1beta1;
|
|
|
|
|
|
|
|
import "cosmos/feegrant/v1beta1/feegrant.proto";
|
|
|
|
import "cosmos/base/query/v1beta1/pagination.proto";
|
|
|
|
import "google/api/annotations.proto";
|
2023-04-04 00:08:45 +00:00
|
|
|
import "cosmos_proto/cosmos.proto";
|
2022-01-08 01:59:34 +00:00
|
|
|
|
|
|
|
option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant";
|
|
|
|
|
|
|
|
// Query defines the gRPC querier service.
|
|
|
|
service Query {
|
|
|
|
|
|
|
|
// Allowance returns fee granted to the grantee by the granter.
|
|
|
|
rpc Allowance(QueryAllowanceRequest) returns (QueryAllowanceResponse) {
|
|
|
|
option (google.api.http).get = "/cosmos/feegrant/v1beta1/allowance/{granter}/{grantee}";
|
|
|
|
}
|
|
|
|
|
|
|
|
// Allowances returns all the grants for address.
|
|
|
|
rpc Allowances(QueryAllowancesRequest) returns (QueryAllowancesResponse) {
|
|
|
|
option (google.api.http).get = "/cosmos/feegrant/v1beta1/allowances/{grantee}";
|
|
|
|
}
|
2022-10-24 18:06:39 +00:00
|
|
|
|
|
|
|
// AllowancesByGranter returns all the grants given by an address
|
2023-04-04 00:08:45 +00:00
|
|
|
//
|
|
|
|
// Since: cosmos-sdk 0.46
|
2022-10-24 18:06:39 +00:00
|
|
|
rpc AllowancesByGranter(QueryAllowancesByGranterRequest) returns (QueryAllowancesByGranterResponse) {
|
|
|
|
option (google.api.http).get = "/cosmos/feegrant/v1beta1/issued/{granter}";
|
|
|
|
}
|
2022-01-08 01:59:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// QueryAllowanceRequest is the request type for the Query/Allowance RPC method.
|
|
|
|
message QueryAllowanceRequest {
|
|
|
|
// granter is the address of the user granting an allowance of their funds.
|
2023-04-04 00:08:45 +00:00
|
|
|
string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
2022-01-08 01:59:34 +00:00
|
|
|
|
|
|
|
// grantee is the address of the user being granted an allowance of another user's funds.
|
2023-04-04 00:08:45 +00:00
|
|
|
string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
2022-01-08 01:59:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// QueryAllowanceResponse is the response type for the Query/Allowance RPC method.
|
|
|
|
message QueryAllowanceResponse {
|
|
|
|
// allowance is a allowance granted for grantee by granter.
|
|
|
|
cosmos.feegrant.v1beta1.Grant allowance = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// QueryAllowancesRequest is the request type for the Query/Allowances RPC method.
|
|
|
|
message QueryAllowancesRequest {
|
2023-04-04 00:08:45 +00:00
|
|
|
string grantee = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
2022-01-08 01:59:34 +00:00
|
|
|
|
|
|
|
// pagination defines an pagination for the request.
|
|
|
|
cosmos.base.query.v1beta1.PageRequest pagination = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// QueryAllowancesResponse is the response type for the Query/Allowances RPC method.
|
|
|
|
message QueryAllowancesResponse {
|
|
|
|
// allowances are allowance's granted for grantee by granter.
|
|
|
|
repeated cosmos.feegrant.v1beta1.Grant allowances = 1;
|
|
|
|
|
|
|
|
// pagination defines an pagination for the response.
|
|
|
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
|
|
|
}
|
2022-10-24 18:06:39 +00:00
|
|
|
|
|
|
|
// QueryAllowancesByGranterRequest is the request type for the Query/AllowancesByGranter RPC method.
|
2023-04-04 00:08:45 +00:00
|
|
|
//
|
|
|
|
// Since: cosmos-sdk 0.46
|
2022-10-24 18:06:39 +00:00
|
|
|
message QueryAllowancesByGranterRequest {
|
2023-04-04 00:08:45 +00:00
|
|
|
string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
2022-10-24 18:06:39 +00:00
|
|
|
|
|
|
|
// pagination defines an pagination for the request.
|
|
|
|
cosmos.base.query.v1beta1.PageRequest pagination = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC method.
|
2023-04-04 00:08:45 +00:00
|
|
|
//
|
|
|
|
// Since: cosmos-sdk 0.46
|
2022-10-24 18:06:39 +00:00
|
|
|
message QueryAllowancesByGranterResponse {
|
|
|
|
// allowances that have been issued by the granter.
|
|
|
|
repeated cosmos.feegrant.v1beta1.Grant allowances = 1;
|
|
|
|
|
|
|
|
// pagination defines an pagination for the response.
|
|
|
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
|
|
|
}
|