2 unstable releases

0.2.0 Jan 29, 2025
0.1.0 Dec 3, 2024

#10 in #celestia

Download history 81/week @ 2024-11-27 66/week @ 2024-12-04 12/week @ 2024-12-11 1/week @ 2024-12-18 2/week @ 2025-01-08 138/week @ 2025-01-29 14/week @ 2025-02-05 20/week @ 2025-02-19 16/week @ 2025-02-26

56 downloads per month
Used in 2 crates (via celestia-grpc)

Apache-2.0

6KB
84 lines

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>;
}

Dependencies

~190–620KB
~15K SLoC