introduce node public interface

This commit is contained in:
vms
2020-06-10 16:55:18 +03:00
parent 49b4504ed7
commit bbe4612a40
5 changed files with 65 additions and 14 deletions

View File

@ -18,6 +18,7 @@ mod node;
mod errors;
mod config;
mod imports;
mod node_public_interface;
use node::IpfsNode;
@ -33,13 +34,14 @@ const IPFS_RPC: &str = "/Users/mike/dev/work/fluence/wasm/fce/bin/wasm_ipfs_rpc_
fn main() {
let ipfs_rpc = std::fs::read(IPFS_RPC).unwrap();
let mut ipfs_node = IpfsNode::new(
let mut ipfs_node = crate::IpfsNode::new(
PathBuf::from(IPFS_MODULES_DIR),
PathBuf::from(IPFS_MODULES_CONFIG_PATH),
)
.unwrap();
println!("ipfs node interface is {:?}", ipfs_node.get_interface());
println!("ipfs node interface is {}", ipfs_node.get_interface());
let result = ipfs_node.rpc_call(&ipfs_rpc, &[]).unwrap();