UNPKG

telehash

Version:

A telehash library for node and browserify

13 lines (11 loc) 362 B
var telehash = require("./../../index.js") var fs = require("fs") telehash.load({id : "./hashmiddle.hn"}, (er, mesh) => { mesh.accept = (from) => { console.log("got accept ", from.hashname); mesh.link(from, () => { console.log("got link status", from.hashname) }) } fs.writeFileSync("./hashmiddle.json", JSON.stringify(mesh.json())); })