Prathamesh Musale
ad07856267
All checks were successful
Tests / sdk_tests (push) Successful in 23m10s
Part of https://www.notion.so/Rename-laconic2d-to-laconicd-9028d0c020d24d1288e92ebcb773d7a7 Co-authored-by: neeraj <neeraj.rtly@gmail.com> Reviewed-on: #10 Co-authored-by: Prathamesh Musale <prathamesh@noreply.git.vdb.to> Co-committed-by: Prathamesh Musale <prathamesh@noreply.git.vdb.to>
113 lines
3.6 KiB
Protocol Buffer
113 lines
3.6 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package cerc.bond.v1;
|
|
|
|
import "gogoproto/gogo.proto";
|
|
import "google/api/annotations.proto";
|
|
import "cosmos/base/query/v1beta1/pagination.proto";
|
|
import "cosmos/base/v1beta1/coin.proto";
|
|
import "cerc/bond/v1/bond.proto";
|
|
// import "cosmos/query/v1/query.proto";
|
|
|
|
option go_package = "git.vdb.to/cerc-io/laconicd/x/bond";
|
|
|
|
// Query defines the gRPC querier service for bond module
|
|
service Query {
|
|
// Params queries bonds module params.
|
|
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
|
|
option (google.api.http).get = "/cerc/bond/v1/params";
|
|
}
|
|
|
|
// Bonds queries bonds list
|
|
rpc Bonds(QueryBondsRequest) returns (QueryBondsResponse) {
|
|
// Mark query as module_query_safe?
|
|
// option (cosmos.query.v1.module_query_safe) = true;
|
|
option (google.api.http).get = "/cerc/bond/v1/bonds";
|
|
}
|
|
|
|
// GetBondById
|
|
rpc GetBondById(QueryGetBondByIdRequest) returns (QueryGetBondByIdResponse) {
|
|
option (google.api.http).get = "/cerc/bond/v1/bonds/{id}";
|
|
}
|
|
|
|
// Get Bonds list by Owner
|
|
rpc GetBondsByOwner(QueryGetBondsByOwnerRequest)
|
|
returns (QueryGetBondsByOwnerResponse) {
|
|
option (google.api.http).get = "/cerc/bond/v1/by-owner/{owner}";
|
|
}
|
|
|
|
// Get Bond module balance
|
|
rpc GetBondModuleBalance(QueryGetBondModuleBalanceRequest)
|
|
returns (QueryGetBondModuleBalanceResponse) {
|
|
option (google.api.http).get = "/cerc/bond/v1/balance";
|
|
}
|
|
}
|
|
|
|
// QueryParamsRequest is request for query the bond module params
|
|
message QueryParamsRequest {}
|
|
|
|
// QueryParamsResponse returns response type of bond module params
|
|
message QueryParamsResponse {
|
|
Params params = 1
|
|
[ (gogoproto.moretags) = "json:\"params\" yaml:\"params\"" ];
|
|
}
|
|
|
|
// QueryBondsRequest queries bonds
|
|
message QueryBondsRequest {
|
|
// pagination defines an optional pagination for the request.
|
|
cosmos.base.query.v1beta1.PageRequest pagination = 1;
|
|
}
|
|
|
|
// QueryBondsResponse is response type for get the bonds by bond-id
|
|
message QueryBondsResponse {
|
|
repeated Bond bonds = 1
|
|
[ (gogoproto.moretags) = "json:\"bonds\" yaml:\"bonds\"" ];
|
|
|
|
// pagination defines the pagination in the response.
|
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
|
}
|
|
|
|
// QueryGetBondById queries bond by bond id
|
|
message QueryGetBondByIdRequest {
|
|
string id = 1 [ (gogoproto.moretags) = "json:\"id\" yaml:\"id\"" ];
|
|
}
|
|
|
|
// QueryGetBondByIdResponse returns QueryGetBondById query response
|
|
message QueryGetBondByIdResponse {
|
|
Bond bond = 1 [ (gogoproto.moretags) = "json:\"bond\" yaml:\"bond\"" ];
|
|
}
|
|
|
|
// QueryGetBondsByOwnerRequest is request type for Query/GetBondsByOwner RPC
|
|
// Method
|
|
message QueryGetBondsByOwnerRequest {
|
|
string owner = 1;
|
|
// pagination defines the pagination in the response.
|
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
|
}
|
|
|
|
// QueryGetBondsByOwnerResponse is response type for Query/GetBondsByOwner RPC
|
|
// Method
|
|
message QueryGetBondsByOwnerResponse {
|
|
repeated Bond bonds = 1 [
|
|
(gogoproto.nullable) = false,
|
|
(gogoproto.moretags) = "json:\"bonds\" yaml:\"bonds\""
|
|
];
|
|
|
|
// pagination defines the pagination in the response.
|
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
|
}
|
|
|
|
// QueryGetBondModuleBalanceRequest is request type for bond module balance rpc
|
|
// method
|
|
message QueryGetBondModuleBalanceRequest {}
|
|
|
|
// QueryGetBondModuleBalanceResponse is the response type for bond module
|
|
// balance rpc method
|
|
message QueryGetBondModuleBalanceResponse {
|
|
repeated cosmos.base.v1beta1.Coin balance = 1 [
|
|
(gogoproto.nullable) = false,
|
|
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
|
(gogoproto.moretags) = "json:\"coins\" yaml:\"coins\""
|
|
];
|
|
}
|