laconicd/proto/cerc/onboarding/v1/query.proto
Prathamesh Musale 7a88c82816
All checks were successful
Integration Tests / test-integration (push) Successful in 3m5s
E2E Tests / test-e2e (push) Successful in 4m20s
Unit Tests / test-unit (push) Successful in 3m6s
SDK Tests / sdk_tests_nameservice_expiry (push) Successful in 9m18s
SDK Tests / sdk_tests (push) Successful in 10m33s
SDK Tests / sdk_tests_auctions (push) Successful in 14m29s
Publish on release / Run docker build and publish (release) Successful in 3m11s
Add queries to get participant by laconic or nitro address (#44)
Part of [laconicd testnet validator enrollment](https://www.notion.so/laconicd-testnet-validator-enrollment-6fc1d3cafcc64fef8c5ed3affa27c675)

Co-authored-by: IshaVenikar <ishavenikar7@gmail.com>
Reviewed-on: #44
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
2024-07-29 10:28:30 +00:00

76 lines
2.5 KiB
Protocol Buffer

syntax = "proto3";
package cerc.onboarding.v1;
import "gogoproto/gogo.proto";
import "cosmos/base/query/v1beta1/pagination.proto";
import "cerc/onboarding/v1/onboarding.proto";
import "google/api/annotations.proto";
option go_package = "git.vdb.to/cerc-io/laconicd/x/onboarding";
// Query defines the gRPC querier service for onboarding module
service Query {
// Participants queries Participants list
rpc Participants(QueryParticipantsRequest)
returns (QueryParticipantsResponse) {
option (google.api.http).get = "/cerc/onboarding/v1/participants";
}
// GetParticipantByAddress queries a participant by cosmos (laconic) address
rpc GetParticipantByAddress(QueryGetParticipantByAddressRequest)
returns (QueryGetParticipantByAddressResponse) {
option (google.api.http).get = "/cerc/onboarding/v1/participants/{address}";
}
// GetParticipantByNitroAddress queries a participant by nitro address
rpc GetParticipantByNitroAddress(QueryGetParticipantByNitroAddressRequest)
returns (QueryGetParticipantByNitroAddressResponse) {
option (google.api.http).get =
"/cerc/onboarding/v1/participants/{nitro_address}";
}
}
// QueryParticipantsRequest queries participants
message QueryParticipantsRequest {
// pagination defines an optional pagination for the request.
cosmos.base.query.v1beta1.PageRequest pagination = 1;
}
// QueryParticipantsResponse is response type for querying the participants
message QueryParticipantsResponse {
repeated Participant participants = 1
[ (gogoproto.moretags) = "json:\"participants\" yaml:\"participants\"" ];
// pagination defines the pagination in the response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}
// QueryGetParticipantByAddressRequest queries participant by the laconic
// address
message QueryGetParticipantByAddressRequest {
// Laconic address
string address = 1;
}
// QueryGetParticipantByAddressResponse is response type for querying
// participant by the laconic address
message QueryGetParticipantByAddressResponse {
// Participant details
Participant participant = 1;
}
// QueryGetParticipantByNitroAddressRequest queries participant by the nitro
// address
message QueryGetParticipantByNitroAddressRequest {
// Nitro address
string nitro_address = 1;
}
// QueryGetParticipantByNitroAddressResponse is response type for querying
// participant by the nitro address
message QueryGetParticipantByNitroAddressResponse {
// Participant details
Participant participant = 1;
}