Skip to content

Latest commit

 

History

History
51 lines (39 loc) · 2.27 KB

README.md

File metadata and controls

51 lines (39 loc) · 2.27 KB

Pegnetd Client

Rust

A JSON-RPC Rust client for the PegNet.

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");

Learn

Contributions

The Library developed by Kompendium, LLC in partnership with Mitchell Berry, Sergey Bushnyak, Kelecorix, Inc and for the good of the Factom and PegNet communities. While we see the usage of the libraries over the months, the Factom community decided not to support this work in the form of a grant either upfront or as backpay on multiple occasions (1, 2, 3)

If you're an active user or find it useful we strongly encourage you to support our efforts and ensure long maintenance by contributing a small donation to one of the following cryptocurrency addresses:

  • BTC: 39oVXpsgsyW8ZgzsnX3sV7HLdtXWfT96qN
  • ETH: 0x9cDBA6bb44772259B3A3fb89cf233A147a720f34
  • FCT: FA38cwer93mmPw1HxjScLmK1yF9iJTu5P87T2vdkbuLovm2YXyss