2 releases
0.1.2 | Dec 16, 2019 |
---|---|
0.1.1 | Dec 13, 2019 |
#72 in #json-rpc-client
Used in pegtx
19KB
285 lines
Pegnetd Client
Usage
In cargo.toml:
pegnetd = "0.1.2"
Quickstart
#[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(())
}
Configuration
// 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");
Documentation
Contributing
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
Dependencies
~7–11MB
~202K SLoC