mirror of
https://github.com/planetmint/planetmint-go.git
synced 2025-09-13 11:50:11 +00:00

* added distributions query * added test cases --------- Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com> Signed-off-by: Julian Strobl <jmastr@mailbox.org> Co-authored-by: Julian Strobl <jmastr@mailbox.org>
195 lines
5.8 KiB
Protocol Buffer
195 lines
5.8 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package planetmintgo.dao;
|
|
|
|
import "gogoproto/gogo.proto";
|
|
import "google/api/annotations.proto";
|
|
import "cosmos/base/query/v1beta1/pagination.proto";
|
|
import "planetmintgo/dao/params.proto";
|
|
import "planetmintgo/dao/mint_request.proto";
|
|
import "planetmintgo/dao/mint_requests.proto";
|
|
import "planetmintgo/dao/reissuance.proto";
|
|
import "planetmintgo/dao/challenge.proto";
|
|
import "amino/amino.proto";
|
|
import "planetmintgo/dao/distribution_order.proto";
|
|
import "planetmintgo/dao/redeem_claim.proto";
|
|
|
|
option go_package = "github.com/planetmint/planetmint-go/x/dao/types";
|
|
|
|
// Query defines the gRPC querier service.
|
|
service Query {
|
|
|
|
// Parameters queries the parameters of the module.
|
|
rpc Params (QueryParamsRequest) returns (QueryParamsResponse) {
|
|
option (google.api.http).get = "/planetmint/dao/params";
|
|
|
|
}
|
|
|
|
// Queries a list of GetMintRequestsByHash items.
|
|
rpc GetMintRequestsByHash (QueryGetMintRequestsByHashRequest) returns (QueryGetMintRequestsByHashResponse) {
|
|
option (google.api.http).get = "/planetmint/dao/mint_requests/hash/{hash}";
|
|
|
|
}
|
|
|
|
// Queries a list of MintRequestsByAddress items.
|
|
rpc MintRequestsByAddress (QueryMintRequestsByAddressRequest) returns (QueryMintRequestsByAddressResponse) {
|
|
option (google.api.http).get = "/planetmint/dao/mint_requests/address/{address}";
|
|
|
|
}
|
|
|
|
// Queries a list of GetReissuance items.
|
|
rpc GetReissuance (QueryGetReissuanceRequest) returns (QueryGetReissuanceResponse) {
|
|
option (google.api.http).get = "/planetmint/dao/reissuance/{blockHeight}";
|
|
|
|
}
|
|
|
|
// Queries a list of Reissuances items.
|
|
rpc Reissuances (QueryReissuancesRequest) returns (QueryReissuancesResponse) {
|
|
option (google.api.http).get = "/planetmint/dao/reissuances";
|
|
|
|
}
|
|
|
|
// Queries a list of GetChallenge items.
|
|
rpc GetChallenge (QueryGetChallengeRequest) returns (QueryGetChallengeResponse) {
|
|
option (google.api.http).get = "/planetmint/dao/challenge/{height}";
|
|
|
|
}
|
|
|
|
// Queries a list of Challenges items.
|
|
rpc Challenges (QueryChallengesRequest) returns (QueryChallengesResponse) {
|
|
option (google.api.http).get = "/planetmint/dao/challenges";
|
|
|
|
}
|
|
|
|
// Queries a list of GetDistribution items.
|
|
rpc GetDistribution (QueryGetDistributionRequest) returns (QueryGetDistributionResponse) {
|
|
option (google.api.http).get = "/planetmint/dao/distribution/{height}";
|
|
|
|
}
|
|
|
|
// Queries a list of RedeemClaim items.
|
|
rpc RedeemClaim (QueryGetRedeemClaimRequest) returns (QueryGetRedeemClaimResponse) {
|
|
option (google.api.http).get = "/planetmint/dao/redeem_claim/{beneficiary}/{id}";
|
|
|
|
}
|
|
rpc RedeemClaimAll (QueryAllRedeemClaimRequest) returns (QueryAllRedeemClaimResponse) {
|
|
option (google.api.http).get = "/planetmint/dao/redeem_claim";
|
|
|
|
}
|
|
|
|
// Queries a list of RedeemClaimByLiquidTxHash items.
|
|
rpc RedeemClaimByLiquidTxHash (QueryRedeemClaimByLiquidTxHashRequest) returns (QueryRedeemClaimByLiquidTxHashResponse) {
|
|
option (google.api.http).get = "/planetmint/dao/redeem_claim_by_liquid_tx_hash/{liquidTxHash}";
|
|
|
|
}
|
|
|
|
// Queries a list of Distributions items.
|
|
rpc Distributions (QueryDistributionsRequest) returns (QueryDistributionsResponse) {
|
|
option (google.api.http).get = "/planetmint/dao/distributions";
|
|
|
|
}
|
|
}
|
|
// QueryParamsRequest is request type for the Query/Params RPC method.
|
|
message QueryParamsRequest {}
|
|
|
|
// QueryParamsResponse is response type for the Query/Params RPC method.
|
|
message QueryParamsResponse {
|
|
|
|
// params holds all the parameters of this module.
|
|
Params params = 1 [(gogoproto.nullable) = false];
|
|
}
|
|
|
|
message QueryGetMintRequestsByHashRequest {
|
|
string hash = 1;
|
|
}
|
|
|
|
message QueryGetMintRequestsByHashResponse {
|
|
MintRequest mintRequest = 1;
|
|
}
|
|
|
|
message QueryMintRequestsByAddressRequest {
|
|
string address = 1;
|
|
}
|
|
|
|
message QueryMintRequestsByAddressResponse {
|
|
MintRequests mintRequests = 1;
|
|
}
|
|
|
|
message QueryGetReissuanceRequest {
|
|
int64 blockHeight = 1;
|
|
}
|
|
|
|
message QueryGetReissuanceResponse {
|
|
Reissuance reissuance = 1;
|
|
}
|
|
|
|
message QueryReissuancesRequest {
|
|
cosmos.base.query.v1beta1.PageRequest pagination = 1;
|
|
}
|
|
|
|
message QueryReissuancesResponse {
|
|
repeated Reissuance reissuances = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
|
}
|
|
|
|
message QueryGetChallengeRequest {
|
|
int64 height = 1;
|
|
}
|
|
|
|
message QueryGetChallengeResponse {
|
|
Challenge challenge = 1;
|
|
}
|
|
|
|
message QueryChallengesRequest {
|
|
cosmos.base.query.v1beta1.PageRequest pagination = 1;
|
|
}
|
|
|
|
message QueryChallengesResponse {
|
|
repeated Challenge challenges = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
|
}
|
|
|
|
message QueryGetDistributionRequest {
|
|
int64 height = 1;
|
|
}
|
|
|
|
message QueryGetDistributionResponse {
|
|
DistributionOrder distribution = 1;
|
|
}
|
|
|
|
message QueryGetRedeemClaimRequest {
|
|
string beneficiary = 1;
|
|
uint64 id = 2;
|
|
}
|
|
|
|
message QueryGetRedeemClaimResponse {
|
|
RedeemClaim redeemClaim = 1 [(gogoproto.nullable) = false];
|
|
}
|
|
|
|
message QueryAllRedeemClaimRequest {
|
|
cosmos.base.query.v1beta1.PageRequest pagination = 1;
|
|
}
|
|
|
|
message QueryAllRedeemClaimResponse {
|
|
repeated RedeemClaim redeemClaim = 1 [(gogoproto.nullable) = false];
|
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
|
}
|
|
|
|
message QueryRedeemClaimByLiquidTxHashRequest {
|
|
string liquidTxHash = 1;
|
|
}
|
|
|
|
message QueryRedeemClaimByLiquidTxHashResponse {
|
|
RedeemClaim redeemClaim = 1;
|
|
}
|
|
|
|
message QueryDistributionsRequest {
|
|
cosmos.base.query.v1beta1.PageRequest pagination = 1;
|
|
}
|
|
|
|
message QueryDistributionsResponse {
|
|
repeated DistributionOrder distributions = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
|
}
|
|
|