Crate drand_client_rs

Source
Expand description

§drand-client-rs

drand_client_rs is a small rust library for retrieving random numbers from the drand network.

Modules§

chain_info
http
http
verify
verify

Structs§

DrandClient
a struct encapsulating all the necessary state for retrieving and validating drand beacons.

Enums§

DrandClientError
TransportError

Traits§

Transport
represents a transport on which to connect to the drand network. This crate provides an HTTP transport out of the box, which can be created by calling new_http_transport()

Functions§

fetch_chain_info
fetch the chain info for a given URL. The chain info contains the public key (used to verify beacons) and the genesis time (used to calculate the time for given rounds).
new_http_client
create a new instance of the client with an HTTP transport for a given base_url. Supported base_urls include: “https://api.drand.sh”, “https://drand.cloudflare.com” and “https://api.drand.secureweb3.com:6875”. A full list can be found at https://drand.love/developer/