🎲 🦀 drand-client-rs

A simple drand client implementation written in rust

Features

Example usage

```rust use drandclientrs::{newhttpclient, DrandClientError};

fn main() -> Result<(), DrandClientError> { // first create the client using one of the relays as a base_url let drandclient = newhttp_client("https://api.drand.sh")?;

// you can fetch the latest random value using `latest_randomness`
if let Ok(beacon) = drand_client.latest_randomness() {
    println!("the latest round is {}", beacon.round_number);
    println!("the latest randomness is {:?}", beacon.randomness);
}

// or a specific round using `randomness`
if let Ok(beacon) = drand_client.randomness(1) {
    println!("the selected round is {}", beacon.round_number);
    println!("the latest randomness is {:?}", beacon.randomness);
}

Ok(())

}

```

Roadmap