Rust bindings for the IN3 C library.
blocking
- Enables the blocking API which depends on async-std.```rust use std::convert::TryInto; use async_std::task;
use in3::eth1::; use in3::prelude::;
fn main() -> In3Result<()> { let mut ethapi = Api::new(Client::new(chain::MAINNET)); ethapi.client().configure(r#"{"autoUpdateList":false,"nodes":{"0x1":{"needsUpdate":false}}}}"#)?;
let latest_blk_num: u64 = task::block_on(eth_api.block_number())?.try_into()?;
println!("Latest block number is {:?}", latest_blk_num);
Ok(())
} ```