2022-03-22 21:13:27 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
package kava.savings.v1beta1;
|
|
|
|
|
2022-11-22 23:22:07 +00:00
|
|
|
import "cosmos/base/query/v1beta1/pagination.proto";
|
2022-11-08 17:43:26 +00:00
|
|
|
import "cosmos/base/v1beta1/coin.proto";
|
2022-03-24 16:43:03 +00:00
|
|
|
import "cosmos_proto/cosmos.proto";
|
2022-11-22 23:22:07 +00:00
|
|
|
import "gogoproto/gogo.proto";
|
|
|
|
import "google/api/annotations.proto";
|
|
|
|
import "kava/savings/v1beta1/store.proto";
|
2022-03-22 21:13:27 +00:00
|
|
|
|
2022-03-25 15:15:02 +00:00
|
|
|
option go_package = "github.com/kava-labs/kava/x/savings/types";
|
2022-03-22 21:13:27 +00:00
|
|
|
|
|
|
|
// Query defines the gRPC querier service for savings module
|
|
|
|
service Query {
|
|
|
|
// Params queries all parameters of the savings module.
|
|
|
|
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
|
|
|
|
option (google.api.http).get = "/kava/savings/v1beta1/params";
|
|
|
|
}
|
2022-03-24 16:43:03 +00:00
|
|
|
|
|
|
|
// Deposits queries savings deposits.
|
|
|
|
rpc Deposits(QueryDepositsRequest) returns (QueryDepositsResponse) {
|
|
|
|
option (google.api.http).get = "/kava/savings/v1beta1/deposits";
|
|
|
|
}
|
2022-11-08 17:43:26 +00:00
|
|
|
|
|
|
|
// TotalSupply returns the total sum of all coins currently locked into the savings module.
|
|
|
|
rpc TotalSupply(QueryTotalSupplyRequest) returns (QueryTotalSupplyResponse) {
|
|
|
|
option (google.api.http).get = "/kava/savings/v1beta1/total_supply";
|
|
|
|
}
|
2022-03-22 21:13:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// QueryParamsRequest defines the request type for querying x/savings
|
|
|
|
// parameters.
|
|
|
|
message QueryParamsRequest {}
|
|
|
|
|
|
|
|
// QueryParamsResponse defines the response type for querying x/savings
|
|
|
|
// parameters.
|
|
|
|
message QueryParamsResponse {
|
|
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
|
|
|
|
Params params = 1 [(gogoproto.nullable) = false];
|
|
|
|
}
|
2022-03-24 16:43:03 +00:00
|
|
|
|
|
|
|
// QueryDepositsRequest defines the request type for querying x/savings
|
|
|
|
// deposits.
|
|
|
|
message QueryDepositsRequest {
|
|
|
|
string denom = 1;
|
|
|
|
string owner = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
|
|
|
|
|
|
cosmos.base.query.v1beta1.PageRequest pagination = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
// QueryDepositsResponse defines the response type for querying x/savings
|
|
|
|
// deposits.
|
|
|
|
message QueryDepositsResponse {
|
2022-11-22 23:22:07 +00:00
|
|
|
repeated Deposit deposits = 1 [
|
|
|
|
(gogoproto.castrepeated) = "Deposits",
|
|
|
|
(gogoproto.nullable) = false
|
|
|
|
];
|
2022-03-24 16:43:03 +00:00
|
|
|
|
|
|
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
|
|
|
}
|
2022-11-08 17:43:26 +00:00
|
|
|
|
|
|
|
// QueryTotalSupplyRequest defines the request type for Query/TotalSupply method.
|
|
|
|
message QueryTotalSupplyRequest {}
|
|
|
|
|
|
|
|
// TotalSupplyResponse defines the response type for the Query/TotalSupply method.
|
|
|
|
message QueryTotalSupplyResponse {
|
|
|
|
// Height is the block height at which these totals apply
|
|
|
|
int64 height = 1;
|
|
|
|
// Result is a list of coins supplied to savings
|
2022-11-22 23:22:07 +00:00
|
|
|
repeated cosmos.base.v1beta1.Coin result = 2 [
|
|
|
|
(gogoproto.nullable) = false,
|
|
|
|
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
|
|
|
|
];
|
2022-11-08 17:43:26 +00:00
|
|
|
}
|