Rust gRPC client for the Symbiotic Relay. Code is generated with buf using prost + tonic. Generated modules live under crate::generated.
Add this to your Cargo.toml:
[dependencies]
symbiotic-relay-client = "0.3.0"If you want to use the latest development version instead of a stable release, you can use a git dependency:
[dependencies]
symbiotic-relay-client = { git = "https://github.com/symbioticfi/relay-client-rs", rev = "9f35b8e" }Replace 9f35b8e with the specific commit hash you want to use. You can also use:
branch = "main"for the latest main branchtag = "v0.3.0"for a specific release tag
use symbiotic_relay_client::generated::api::proto::v1::symbiotic_api_service_client::SymbioticApiServiceClient;
use tonic::transport::Endpoint;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let channel = Endpoint::from_shared("http://localhost:8080")?.connect().await?;
let mut client = SymbioticApiServiceClient::new(channel);
// Use the client; e.g. see examples for requests and streaming usage
Ok(())
}For more usage (requests, streaming, helpers), see examples/basic_usage.rs in the examples directory.
Run scripts/update-proto.sh to fetch upstream proto and regenerate; run cargo build to compile.