Files
js-peer-id/src/bin.js
Friedel Ziegelmayer 31701e236d Async Crypto Endeavour (#33)
* refactor: make import and creation async - This allows the use of native key generation in the browser

BREAKING CHANGE:

This changes the interface of .create, .createFromPrivKey,
.createFromPubKey, .createFromJSON
2016-11-03 07:51:29 +00:00

14 lines
191 B
JavaScript
Executable File

#!/usr/local/bin/node
'use strict'
const PeerId = require('./index.js')
PeerId.create((err, id) => {
if (err) {
throw err
}
console.log(JSON.stringify(id.toJSON(), null, 2))
})