2022-04-05 07:09:27 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
package vulcanize.bond.v1beta1;
|
|
|
|
|
|
|
|
import "gogoproto/gogo.proto";
|
|
|
|
import "vulcanize/bond/v1beta1/bond.proto";
|
|
|
|
import "google/api/annotations.proto";
|
|
|
|
import "cosmos/base/query/v1beta1/pagination.proto";
|
|
|
|
import "cosmos/base/v1beta1/coin.proto";
|
|
|
|
|
2022-09-07 06:36:11 +00:00
|
|
|
option go_package = "github.com/cerc-io/laconicd/x/bond/types";
|
2022-04-05 07:09:27 +00:00
|
|
|
|
|
|
|
// 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 = "/vulcanize/bond/v1beta1/params";
|
|
|
|
}
|
|
|
|
|
|
|
|
// Bonds queries bonds list.
|
|
|
|
rpc Bonds(QueryGetBondsRequest) returns (QueryGetBondsResponse) {
|
|
|
|
option (google.api.http).get = "/vulcanize/bond/v1beta1/bonds";
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetBondById
|
2022-10-10 10:38:33 +00:00
|
|
|
rpc GetBondById(QueryGetBondByIdRequest) returns (QueryGetBondByIdResponse) {
|
2022-04-05 07:09:27 +00:00
|
|
|
option (google.api.http).get = "/vulcanize/bond/v1beta1/bonds/{id}";
|
|
|
|
}
|
|
|
|
|
|
|
|
// Get Bonds List by Owner
|
2022-10-10 10:38:33 +00:00
|
|
|
rpc GetBondsByOwner(QueryGetBondsByOwnerRequest) returns (QueryGetBondsByOwnerResponse) {
|
2022-04-05 07:09:27 +00:00
|
|
|
option (google.api.http).get = "/vulcanize/bond/v1beta1/by-owner/{owner}";
|
|
|
|
}
|
|
|
|
|
|
|
|
// Get Bonds module balance
|
2022-10-10 10:38:33 +00:00
|
|
|
rpc GetBondsModuleBalance(QueryGetBondModuleBalanceRequest) returns (QueryGetBondModuleBalanceResponse) {
|
2022-04-05 07:09:27 +00:00
|
|
|
option (google.api.http).get = "/vulcanize/bond/v1beta1/balance";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// QueryParamsRequest is request for query the bond module params
|
2022-10-10 10:38:33 +00:00
|
|
|
message QueryParamsRequest {}
|
2022-04-05 07:09:27 +00:00
|
|
|
|
|
|
|
// QueryParamsResponse returns response type of bond module params
|
2022-10-10 10:38:33 +00:00
|
|
|
message QueryParamsResponse {
|
|
|
|
Params params = 1 [(gogoproto.moretags) = "json:\"params\" yaml:\"params\""];
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// QueryGetBondById queries a bond by bond-id.
|
2022-10-10 10:38:33 +00:00
|
|
|
message QueryGetBondsRequest {
|
2022-04-05 07:09:27 +00:00
|
|
|
// pagination defines an optional pagination for the request.
|
|
|
|
cosmos.base.query.v1beta1.PageRequest pagination = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// QueryGetBondsResponse is response type for get the bonds by bond-id
|
2022-10-10 10:38:33 +00:00
|
|
|
message QueryGetBondsResponse {
|
|
|
|
repeated Bond bonds = 1 [(gogoproto.moretags) = "json:\"bonds\" yaml:\"bonds\""];
|
2022-04-05 07:09:27 +00:00
|
|
|
// pagination defines the pagination in the response.
|
|
|
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// QueryGetBondById
|
2022-10-10 10:38:33 +00:00
|
|
|
message QueryGetBondByIdRequest {
|
|
|
|
string id = 1 [(gogoproto.moretags) = "json:\"id\" yaml:\"id\""];
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// QueryGetBondByIdResponse returns QueryGetBondById query response
|
2022-10-10 10:38:33 +00:00
|
|
|
message QueryGetBondByIdResponse {
|
|
|
|
Bond bond = 1 [(gogoproto.moretags) = "json:\"bond\" yaml:\"bond\""];
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// QueryGetBondsByOwnerRequest is request type for Query/GetBondsByOwner RPC Method
|
2022-10-10 10:38:33 +00:00
|
|
|
message QueryGetBondsByOwnerRequest {
|
2022-04-05 07:09:27 +00:00
|
|
|
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 {
|
2022-10-10 10:38:33 +00:00
|
|
|
repeated Bond bonds = 1 [(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"bonds\" yaml:\"bonds\""];
|
2022-04-05 07:09:27 +00:00
|
|
|
// pagination defines the pagination in the response.
|
|
|
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// QueryGetBondModuleBalanceRequest is request type for bond module balance rpc method
|
2022-10-10 10:38:33 +00:00
|
|
|
message QueryGetBondModuleBalanceRequest {}
|
2022-04-05 07:09:27 +00:00
|
|
|
|
|
|
|
// QueryGetBondModuleBalanceResponse is the response type for bond module balance rpc method
|
2022-10-10 10:38:33 +00:00
|
|
|
message QueryGetBondModuleBalanceResponse {
|
2022-04-05 07:09:27 +00:00
|
|
|
repeated cosmos.base.v1beta1.Coin balance = 2 [
|
2022-10-10 10:38:33 +00:00
|
|
|
(gogoproto.nullable) = false,
|
2022-04-05 07:09:27 +00:00
|
|
|
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
2022-10-10 10:38:33 +00:00
|
|
|
(gogoproto.moretags) = "json:\"coins\" yaml:\"coins\""
|
2022-04-05 07:09:27 +00:00
|
|
|
];
|
|
|
|
}
|