celestia-grpc-macros

Crates.iocelestia-grpc-macros
lib.rscelestia-grpc-macros
version
sourcesrc
created_at2024-12-03 10:27:20.122359
updated_at2024-12-03 10:27:20.122359
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
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
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: 285

cargo fmt