2024-07-19 17:24:23 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
package kava.precisebank.v1;
|
|
|
|
|
|
|
|
import "cosmos/base/v1beta1/coin.proto";
|
|
|
|
import "gogoproto/gogo.proto";
|
|
|
|
import "google/api/annotations.proto";
|
|
|
|
|
|
|
|
option go_package = "github.com/kava-labs/kava/x/precisebank/types";
|
|
|
|
option (gogoproto.goproto_getters_all) = false;
|
|
|
|
|
|
|
|
// Query defines the gRPC querier service for precisebank module
|
|
|
|
service Query {
|
|
|
|
// TotalFractionalBalances returns the total sum of all fractional balances
|
|
|
|
// managed by the precisebank module.
|
|
|
|
rpc TotalFractionalBalances(QueryTotalFractionalBalancesRequest) returns (QueryTotalFractionalBalancesResponse) {
|
|
|
|
option (google.api.http).get = "/kava/precisebank/v1/total_fractional_balances";
|
|
|
|
}
|
2024-07-25 20:36:36 +00:00
|
|
|
|
|
|
|
// Remainder returns the amount backed by the reserve, but not yet owned by
|
|
|
|
// any account, i.e. not in circulation.
|
|
|
|
rpc Remainder(QueryRemainderRequest) returns (QueryRemainderResponse) {
|
|
|
|
option (google.api.http).get = "/kava/precisebank/v1/remainder";
|
|
|
|
}
|
|
|
|
|
|
|
|
// FractionalBalance returns only the fractional balance of an address. This
|
|
|
|
// does not include any integer balance.
|
|
|
|
rpc FractionalBalance(QueryFractionalBalanceRequest) returns (QueryFractionalBalanceResponse) {
|
|
|
|
option (google.api.http).get = "/kava/precisebank/v1/fractional_balance/{address}";
|
|
|
|
}
|
2024-07-19 17:24:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// QueryTotalFractionalBalancesRequest defines the request type for Query/TotalFractionalBalances method.
|
|
|
|
message QueryTotalFractionalBalancesRequest {}
|
|
|
|
|
|
|
|
// QueryTotalFractionalBalancesResponse defines the response type for Query/TotalFractionalBalances method.
|
|
|
|
message QueryTotalFractionalBalancesResponse {
|
|
|
|
// total is the total sum of all fractional balances managed by the precisebank
|
|
|
|
// module.
|
|
|
|
cosmos.base.v1beta1.Coin total = 1 [(gogoproto.nullable) = false];
|
|
|
|
}
|
2024-07-25 20:36:36 +00:00
|
|
|
|
|
|
|
// QueryRemainderRequest defines the request type for Query/Remainder method.
|
|
|
|
message QueryRemainderRequest {}
|
|
|
|
|
|
|
|
// QueryRemainderResponse defines the response type for Query/Remainder method.
|
|
|
|
message QueryRemainderResponse {
|
|
|
|
// remainder is the amount backed by the reserve, but not yet owned by any
|
|
|
|
// account, i.e. not in circulation.
|
|
|
|
cosmos.base.v1beta1.Coin remainder = 1 [(gogoproto.nullable) = false];
|
|
|
|
}
|
|
|
|
|
|
|
|
// QueryFractionalBalanceRequest defines the request type for Query/FractionalBalance method.
|
|
|
|
message QueryFractionalBalanceRequest {
|
|
|
|
// address is the account address to query fractional balance for.
|
|
|
|
string address = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// QueryFractionalBalanceResponse defines the response type for Query/FractionalBalance method.
|
|
|
|
message QueryFractionalBalanceResponse {
|
|
|
|
// fractional_balance is the fractional balance of the address.
|
|
|
|
cosmos.base.v1beta1.Coin fractional_balance = 1 [(gogoproto.nullable) = false];
|
|
|
|
}
|