laconicd/third_party/proto/cosmos/bank/v1beta1/query.proto

151 lines
5.5 KiB
Protocol Buffer
Raw Normal View History

2021-04-17 10:00:07 +00:00
syntax = "proto3";
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";
import "cosmos/bank/v1beta1/bank.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) {
2021-04-18 15:54:18 +00:00
option (google.api.http).get = "/cosmos/bank/v1beta1/balances/{address}/{denom}";
2021-04-17 10:00:07 +00:00
}
// AllBalances queries the balance of all coins for a single account.
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) {
option (google.api.http).get = "/cosmos/bank/v1beta1/supply";
}
// SupplyOf queries the supply of a single coin.
rpc SupplyOf(QuerySupplyOfRequest) returns (QuerySupplyOfResponse) {
option (google.api.http).get = "/cosmos/bank/v1beta1/supply/{denom}";
}
// Params queries the parameters of x/bank module.
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/cosmos/bank/v1beta1/params";
}
2021-04-18 15:54:18 +00:00
// DenomsMetadata queries the client metadata of a given coin denomination.
rpc DenomMetadata(QueryDenomMetadataRequest) returns (QueryDenomMetadataResponse) {
option (google.api.http).get = "/cosmos/bank/v1beta1/denoms_metadata/{denom}";
}
// DenomsMetadata queries the client metadata for all registered coin denominations.
rpc DenomsMetadata(QueryDenomsMetadataRequest) returns (QueryDenomsMetadataResponse) {
option (google.api.http).get = "/cosmos/bank/v1beta1/denoms_metadata";
}
2021-04-17 10:00:07 +00:00
}
// QueryBalanceRequest is the request type for the Query/Balance RPC method.
message QueryBalanceRequest {
2021-04-18 15:54:18 +00:00
option (gogoproto.equal) = false;
2021-04-17 10:00:07 +00:00
option (gogoproto.goproto_getters) = false;
// address is the address to query balances for.
string address = 1;
// denom is the coin denom to query balances for.
string denom = 2;
}
// QueryBalanceResponse is the response type for the Query/Balance RPC method.
message QueryBalanceResponse {
// balance is the balance of the coin.
cosmos.base.v1beta1.Coin balance = 1;
}
// QueryBalanceRequest is the request type for the Query/AllBalances RPC method.
message QueryAllBalancesRequest {
2021-04-18 15:54:18 +00:00
option (gogoproto.equal) = false;
2021-04-17 10:00:07 +00:00
option (gogoproto.goproto_getters) = false;
// address is the address to query balances for.
string address = 1;
// pagination defines an optional pagination for the request.
cosmos.base.query.v1beta1.PageRequest pagination = 2;
}
// QueryAllBalancesResponse is the response type for the Query/AllBalances RPC
// method.
message QueryAllBalancesResponse {
// balances is the balances of all the coins.
2021-04-18 15:54:18 +00:00
repeated cosmos.base.v1beta1.Coin balances = 1
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
2021-04-17 10:00:07 +00:00
// pagination defines the pagination in the response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}
// QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC
// method.
message QueryTotalSupplyRequest {}
// QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC
// method
message QueryTotalSupplyResponse {
// supply is the supply of the coins
2021-04-18 15:54:18 +00:00
repeated cosmos.base.v1beta1.Coin supply = 1
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
2021-04-17 10:00:07 +00:00
}
// QuerySupplyOfRequest is the request type for the Query/SupplyOf RPC method.
message QuerySupplyOfRequest {
// denom is the coin denom to query balances for.
string denom = 1;
}
// QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method.
message QuerySupplyOfResponse {
// amount is the supply of the coin.
2021-04-18 15:54:18 +00:00
cosmos.base.v1beta1.Coin amount = 1 [(gogoproto.nullable) = false];
2021-04-17 10:00:07 +00:00
}
// QueryParamsRequest defines the request type for querying x/bank parameters.
message QueryParamsRequest {}
// QueryParamsResponse defines the response type for querying x/bank parameters.
message QueryParamsResponse {
2021-04-18 15:54:18 +00:00
Params params = 1 [(gogoproto.nullable) = false];
}
// QueryDenomsMetadataRequest is the request type for the Query/DenomsMetadata RPC method.
message QueryDenomsMetadataRequest {
// pagination defines an optional pagination for the request.
cosmos.base.query.v1beta1.PageRequest pagination = 1;
}
// QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC
// method.
message QueryDenomsMetadataResponse {
// metadata provides the client information for all the registered tokens.
repeated Metadata metadatas = 1 [(gogoproto.nullable) = false];
// pagination defines the pagination in the response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}
// QueryDenomMetadataRequest is the request type for the Query/DenomMetadata RPC method.
message QueryDenomMetadataRequest {
// denom is the coin denom to query the metadata for.
string denom = 1;
}
// QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC
// method.
message QueryDenomMetadataResponse {
// metadata describes and provides all the client information for the requested token.
Metadata metadata = 1 [(gogoproto.nullable) = false];
2021-04-17 10:00:07 +00:00
}