celestia-grpc-macros

Crates.iocelestia-grpc-macros
lib.rscelestia-grpc-macros
version0.4.0
created_at2024-12-03 10:27:20.122359+00
updated_at2025-09-25 10:40:05.846543+00
descriptionHelper crate for grpc_method macro for creating gRPC client, used by celestia-grpc
homepagehttps://www.eiger.co
repositoryhttps://github.com/eigerco/lumina
max_upload_size
id1469846
size9,268
Eiger (eiger-releases)

documentation

README

Helper crate for grpc_method macro for creating a tonic gRPC client, used by celestia-grpc.

Example

use celestia_proto::cosmos::auth::v1beta1::query_client::QueryClient;
use tonic::service::Interceptor;
use tonic::transport::Channel;

pub struct GrpcClient<I>
where
   I: Interceptor,
{
    grpc_channel: Channel,
    auth_interceptor: I,
}

impl<I> GrpcClient<I>
where
    I: Interceptor + Clone,
{
    /// Get auth params
    #[grpc_method(AuthQueryClient::params)]
    async fn get_auth_params(&mut self) -> Result<AuthParams, Error>;
}
Commit count: 407

cargo fmt