0g-chain/proto/zgc/dasigners/v1/query.proto

88 lines
2.3 KiB
Protocol Buffer
Raw Normal View History

2024-08-03 17:31:58 +00:00
syntax = "proto3";
package zgc.dasigners.v1;
import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "google/protobuf/any.proto";
import "google/protobuf/timestamp.proto";
import "zgc/dasigners/v1/dasigners.proto";
option go_package = "github.com/0glabs/0g-chain/x/dasigners/v1/types";
option (gogoproto.goproto_getters_all) = false;
// Query defines the gRPC querier service for the dasigners module
service Query {
rpc EpochNumber(QueryEpochNumberRequest) returns (QueryEpochNumberResponse) {
2024-08-03 17:38:46 +00:00
option (google.api.http).get = "/0g/dasigners/v1/epoch-number";
2024-08-03 17:31:58 +00:00
}
2024-08-03 17:42:40 +00:00
rpc QuorumCount(QueryQuorumCountRequest) returns (QueryQuorumCountResponse) {
option (google.api.http).get = "/0g/dasigners/v1/quorum-count";
}
rpc EpochQuorum(QueryEpochQuorumRequest) returns (QueryEpochQuorumResponse) {
option (google.api.http).get = "/0g/dasigners/v1/epoch-quorum";
2024-08-03 17:31:58 +00:00
}
2024-08-03 17:57:48 +00:00
rpc EpochQuorumRow(QueryEpochQuorumRowRequest) returns (QueryEpochQuorumRowResponse) {
option (google.api.http).get = "/0g/dasigners/v1/epoch-quorum-row";
}
2024-08-03 17:31:58 +00:00
rpc AggregatePubkeyG1(QueryAggregatePubkeyG1Request) returns (QueryAggregatePubkeyG1Response) {
2024-08-03 17:38:46 +00:00
option (google.api.http).get = "/0g/dasigners/v1/aggregate-pubkey-g1";
2024-08-03 17:31:58 +00:00
}
rpc Signer(QuerySignerRequest) returns (QuerySignerResponse) {
2024-08-03 17:38:46 +00:00
option (google.api.http).get = "/0g/dasigners/v1/signer";
2024-08-03 17:31:58 +00:00
}
}
message QuerySignerRequest {
2024-08-03 17:42:40 +00:00
repeated string accounts = 1;
2024-08-03 17:31:58 +00:00
}
message QuerySignerResponse {
2024-08-03 17:42:40 +00:00
repeated Signer signer = 1;
2024-08-03 17:31:58 +00:00
}
message QueryEpochNumberRequest {}
message QueryEpochNumberResponse {
uint64 epoch_number = 1;
}
2024-08-03 17:42:40 +00:00
message QueryQuorumCountRequest {
uint64 epoch_number = 1;
}
message QueryQuorumCountResponse {
uint64 quorum_count = 1;
}
message QueryEpochQuorumRequest {
2024-08-03 17:31:58 +00:00
uint64 epoch_number = 1;
2024-08-03 17:42:40 +00:00
uint64 quorum_id = 2;
2024-08-03 17:31:58 +00:00
}
2024-08-03 17:42:40 +00:00
message QueryEpochQuorumResponse {
Quorum quorum = 1;
2024-08-03 17:31:58 +00:00
}
2024-08-03 17:57:48 +00:00
message QueryEpochQuorumRowRequest {
uint64 epoch_number = 1;
uint64 quorum_id = 2;
uint32 row_index = 3;
}
message QueryEpochQuorumRowResponse {
string signer = 1;
}
2024-08-03 17:31:58 +00:00
message QueryAggregatePubkeyG1Request {
uint64 epoch_number = 1;
2024-08-03 17:42:40 +00:00
uint64 quorum_id = 2;
bytes quorum_bitmap = 3;
2024-08-03 17:31:58 +00:00
}
message QueryAggregatePubkeyG1Response {
bytes aggregate_pubkey_g1 = 1;
2024-08-03 17:38:46 +00:00
uint64 total = 2;
uint64 hit = 3;
2024-08-03 17:31:58 +00:00
}