Skip to content

Instantly share code, notes, and snippets.

@kushti
Created November 2, 2020 22:41
Show Gist options
  • Save kushti/e02128c511831f2c476919c79bdd0da3 to your computer and use it in GitHub Desktop.
Save kushti/e02128c511831f2c476919c79bdd0da3 to your computer and use it in GitHub Desktop.
pub use ergo_node_interface::node_interface::{NodeInterface, NodeError};
fn main() {
let api_key= "...";
let ip = "127.0.0.1";
let port= "9053";
let node = NodeInterface::new(api_key, ip, port);
let h: Result<u64, NodeError> = node.current_block_height();
println!("Current height: {}", h.unwrap_or_default());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment