The Rhoast Client

This crate allows you to easily communicate with a running version0.12.x node using typed safe rust via the node's grpc and http modules.

```rs // example of a grpc propose and getting a block via hash use rhoastclient::grpc::Grpc; use rhoastclient::proto::casper::BlocksQueryByHeight; use rhoast_client::http::Http;

let grpc=Grpc::new("endpoint"); let http= Http::new("endpoint") let propose = grpc.propose(true).await.unwrap(); let blockinfo = http.hashblockcall(&"hash".tostring()).await.unwrap()

//for grpc stream actions like visualizedagutilstream, showmainchainutilstream, showblocksutilstream, // getblocksbyheightutil_stream pass in a function that takes in the returned value of the stream // as well as how many stream events should be listned to, passing in None as the number of optional stream event // would make the grpc listen forever

let blockquery=BlocksQueryByHeight{ startblocknumber: 1, endblocknumber: 40 } fn writestreamtofile(input: &BlockInfoResponse){ //write input to file } grpc.getblocksbyheightutilstream(blockquery, writestreamto_file, Some(40)).await.unwrap();

```

Link to doc here

Test