syntax = "proto3"; package celestia.qgb.v1; import "celestia/qgb/v1/genesis.proto"; import "celestia/qgb/v1/types.proto"; import "google/api/annotations.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; import "gogoproto/gogo.proto"; import "cosmos_proto/cosmos.proto"; import "google/protobuf/any.proto"; option go_package = "github.com/celestiaorg/celestia-app/x/qgb/types"; // Query defines the gRPC querier service. service Query { // Params queries the current parameters for the qgb module rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/qgb/v1/params"; } // queries for attestations requests waiting to be signed by an orchestrator // AttestationRequestByNonce queries attestation request by nonce. // Returns nil if not found. rpc AttestationRequestByNonce(QueryAttestationRequestByNonceRequest) returns (QueryAttestationRequestByNonceResponse) { option (google.api.http).get = "/qgb/v1/attestations/requests/{nonce}"; } // LatestAttestationNonce queries latest attestation nonce. rpc LatestAttestationNonce(QueryLatestAttestationNonceRequest) returns (QueryLatestAttestationNonceResponse) { option (google.api.http).get = "/qgb/v1/attestations/nonce/latest"; } // EarliestAttestationNonce queries the earliest attestation nonce. rpc EarliestAttestationNonce(QueryEarliestAttestationNonceRequest) returns (QueryEarliestAttestationNonceResponse) { option (google.api.http).get = "/qgb/v1/attestations/nonce/earliest"; } // LatestValsetRequestBeforeNonce Queries latest Valset request before nonce. // And, even if the current nonce is a valset, it will return the previous // one. // If the provided nonce is 1, it will return an error, because, there is // no valset before nonce 1. rpc LatestValsetRequestBeforeNonce(QueryLatestValsetRequestBeforeNonceRequest) returns (QueryLatestValsetRequestBeforeNonceResponse) { option (google.api.http).get = "/qgb/v1/valset/request/before/{nonce}"; } // misc // LatestUnbondingHeight returns the latest unbonding height rpc LatestUnbondingHeight(QueryLatestUnbondingHeightRequest) returns (QueryLatestUnbondingHeightResponse) { option (google.api.http).get = "/qgb/v1/unbonding"; } // DataCommitmentRangeForHeight returns the data commitment window // that includes the provided height rpc DataCommitmentRangeForHeight(QueryDataCommitmentRangeForHeightRequest) returns (QueryDataCommitmentRangeForHeightResponse) { option (google.api.http).get = "/qgb/v1/data_commitment/range/height"; } // LatestDataCommitment returns the latest data commitment in store rpc LatestDataCommitment(QueryLatestDataCommitmentRequest) returns (QueryLatestDataCommitmentResponse) { option (google.api.http).get = "/qgb/v1/data_commitment/latest"; } // EVMAddress returns the evm address associated with a supplied // validator address rpc EVMAddress(QueryEVMAddressRequest) returns (QueryEVMAddressResponse) { option (google.api.http).get = "/qgb/v1/evm_address"; } } // QueryParamsRequest message QueryParamsRequest {} // QueryParamsResponse message QueryParamsResponse { Params params = 1 [ (gogoproto.nullable) = false ]; } // QueryAttestationRequestByNonceRequest message QueryAttestationRequestByNonceRequest { uint64 nonce = 1; } // QueryAttestationRequestByNonceResponse message QueryAttestationRequestByNonceResponse { // AttestationRequestI is either a Data Commitment or a Valset. // This was decided as part of the universal nonce approach under: // https://github.com/celestiaorg/celestia-app/issues/468#issuecomment-1156887715 google.protobuf.Any attestation = 1 [ (cosmos_proto.accepts_interface) = "AttestationRequestI" ]; } // QueryLatestAttestationNonceRequest latest attestation nonce request message QueryLatestAttestationNonceRequest {} // QueryLatestAttestationNonceResponse latest attestation nonce response message QueryLatestAttestationNonceResponse { uint64 nonce = 1; } // QueryEarliestAttestationNonceRequest earliest attestation nonce request message QueryEarliestAttestationNonceRequest {} // QueryEarliestAttestationNonceResponse earliest attestation nonce response message QueryEarliestAttestationNonceResponse { uint64 nonce = 1; } // QueryLatestValsetRequestBeforeNonceRequest latest Valset request before // universal nonce request message QueryLatestValsetRequestBeforeNonceRequest { uint64 nonce = 1; } // QueryLatestValsetRequestBeforeNonceResponse latest Valset request before // height response message QueryLatestValsetRequestBeforeNonceResponse { Valset valset = 1; } // QueryLatestUnbondingHeightRequest message QueryLatestUnbondingHeightRequest {} // QueryLatestUnbondingHeightResponse message QueryLatestUnbondingHeightResponse { uint64 height = 1; } // QueryLatestDataCommitmentRequest message QueryLatestDataCommitmentRequest {} // QueryLatestDataCommitmentResponse message QueryLatestDataCommitmentResponse { DataCommitment data_commitment = 1; } // QueryDataCommitmentRangeForHeightRequest message QueryDataCommitmentRangeForHeightRequest { uint64 height = 1; } // QueryDataCommitmentRangeForHeightResponse message QueryDataCommitmentRangeForHeightResponse { DataCommitment data_commitment = 1; } // QueryEVMAddressRequest message QueryEVMAddressRequest { string validator_address = 1; } // QueryEVMAddressResponse message QueryEVMAddressResponse { string evm_address = 1; }