Crates.io | pegnetd |
lib.rs | pegnetd |
version | 0.1.2 |
source | src |
created_at | 2019-12-13 00:47:19.266583 |
updated_at | 2019-12-16 00:48:01.94787 |
description | Pegnetd API client |
homepage | https://github.com/kompendium-llc/pegnetd-rust-client |
repository | https://github.com/kompendium-llc/pegnetd-rust-client |
max_upload_size | |
id | 188952 |
size | 89,103 |
In cargo.toml:
pegnetd = "0.1.2"
#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
let api = Pegnetd::open_node();
let response = sync_status(&api).await;
assert!(response.result.syncheight > 0);
Ok(())
}
// Local Node Configuration
// http://localhost:8070/v1
let api = Pegnetd::new();
// Public Node Configuration
// https://api.pegnetd.com
let api = Pegnetd::open_node();
// Custom Node Configuration
let api = Pegnetd::custom_node("http://192.168.1.42:8070/v1");
PR's welcome. Fork the library and submit to dev branch. By contributing to this library you agree to it being Apache 2.0 licensed