mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-14 12:05:18 +00:00
52 lines
1.8 KiB
Protocol Buffer
52 lines
1.8 KiB
Protocol Buffer
|
syntax = "proto3";
|
||
|
package cosmos.evidence.v1beta1;
|
||
|
|
||
|
import "cosmos/base/query/v1beta1/pagination.proto";
|
||
|
import "gogoproto/gogo.proto";
|
||
|
import "google/protobuf/any.proto";
|
||
|
import "google/api/annotations.proto";
|
||
|
|
||
|
option go_package = "github.com/cosmos/cosmos-sdk/x/evidence/types";
|
||
|
|
||
|
// Query defines the gRPC querier service.
|
||
|
service Query {
|
||
|
// Evidence queries evidence based on evidence hash.
|
||
|
rpc Evidence(QueryEvidenceRequest) returns (QueryEvidenceResponse) {
|
||
|
option (google.api.http).get = "/cosmos/evidence/v1beta1/evidence/{evidence_hash}";
|
||
|
}
|
||
|
|
||
|
// AllEvidence queries all evidence.
|
||
|
rpc AllEvidence(QueryAllEvidenceRequest) returns (QueryAllEvidenceResponse) {
|
||
|
option (google.api.http).get = "/cosmos/evidence/v1beta1/evidence";
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// QueryEvidenceRequest is the request type for the Query/Evidence RPC method.
|
||
|
message QueryEvidenceRequest {
|
||
|
// evidence_hash defines the hash of the requested evidence.
|
||
|
bytes evidence_hash = 1 [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"];
|
||
|
}
|
||
|
|
||
|
// QueryEvidenceResponse is the response type for the Query/Evidence RPC method.
|
||
|
message QueryEvidenceResponse {
|
||
|
// evidence returns the requested evidence.
|
||
|
google.protobuf.Any evidence = 1;
|
||
|
}
|
||
|
|
||
|
// QueryEvidenceRequest is the request type for the Query/AllEvidence RPC
|
||
|
// method.
|
||
|
message QueryAllEvidenceRequest {
|
||
|
// pagination defines an optional pagination for the request.
|
||
|
cosmos.base.query.v1beta1.PageRequest pagination = 1;
|
||
|
}
|
||
|
|
||
|
// QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC
|
||
|
// method.
|
||
|
message QueryAllEvidenceResponse {
|
||
|
// evidence returns all evidences.
|
||
|
repeated google.protobuf.Any evidence = 1;
|
||
|
|
||
|
// pagination defines the pagination in the response.
|
||
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||
|
}
|