casper_client/
lib.rs

1pub mod client;
2pub mod error;
3pub mod models;
4
5pub use client::CasperClient;
6pub use error::{CasperError, Result};
7pub use models::*;
8
9/// gRPC client types generated from `proto/matrix_service.proto`.
10pub mod grpc {
11    pub mod service {
12        pub mod matrix_service {
13            tonic::include_proto!("matrix_service");
14        }
15    }
16}
17
18#[cfg(test)]
19mod tests {
20    use super::*;
21
22    #[tokio::test]
23    async fn test_client_creation() {
24        let client = CasperClient::new("http://localhost", 8080, 50051).unwrap();
25        assert_eq!(client.base_url(), "http://localhost:8080/");
26    }
27}