Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

telehash module for node.js

branch: master



This module presents a simple high-level API for using telehash for both node and browserify.

The browser crypto that powers this is only possible thanks to the incredible work done by the team behind Forge, Tom Wu, and the Sanford Javascript Crypto Library.


Telehash apps always need one or more seeds to bootstrap from, the default development testing ones are in seeds.json. You can run your own seed via npm start or manually via node seed.js. The JSON object from the seed can be passed in to the init function (shown below) as "seeds":{...} in the args or stored in a seeds.json file with that passed in.

Library Interface

Identity / Keypair Generation

To create a new hashname:

var th = require("telehash");
th.init({}, function(err, self){
  if(err) return console.log("hashname generation/startup failed",err);
  // contains a the public/private keys and parts

Hashname Initialization / Startup

Needs an id object from a previously created to load the existing hashname from:

var th = require("telehash");
th.init({id:id}, function(err, self){
  if(err) return console.log("hashname failed to come online",err);
  // use self.* now


The first object passed in to the load function takes the following arguments:

  • id - An object previously created, or a string pointing to a file to load the object from.
  • seeds - An object in the seeds format, or a string pointing to a file to load from.


Once you have a hashname running you can use the common API with it.

Something went wrong with that request. Please try again.