Compare commits

...

10 Commits

Author SHA1 Message Date
5e9bf9837d Release v0.3.4. 2015-10-28 22:06:37 +00:00
f82d0d6ac5 Merge pull request #1 from diasdavid/rn
update README and package.json
2015-10-28 22:05:12 +00:00
0b30a0964c update README and package.json 2015-10-28 22:04:55 +00:00
9b2cb012e9 Release v0.3.3. 2015-09-15 17:18:08 +01:00
35102b4ad5 Release v0.3.2. 2015-09-15 17:17:59 +01:00
192c65f09a update readme 2015-09-15 17:17:50 +01:00
dda0204ec0 merge package.json conflict 2015-09-15 17:16:09 +01:00
1096d15a16 Rename 2015-09-15 17:14:48 +01:00
615a966d6a Release v0.3.2. 2015-09-14 11:58:41 +01:00
171a561537 to v4! 2015-09-14 11:58:33 +01:00
3 changed files with 22 additions and 17 deletions

View File

@ -1,6 +1,6 @@
language: node_js language: node_js
node_js: node_js:
- "iojs" - "4.0"
branches: branches:
only: only:

View File

@ -1,7 +1,7 @@
ipfs-peer-id Node.js implementation peer-id JavaScript implementation
=================================== ==============================
[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) [[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) ![Build Status](https://travis-ci.org/diasdavid/node-ipfs-peer-id.svg?style=flat-square)](https://travis-ci.org/diasdavid/node-ipfs-peer-id) ![](https://img.shields.io/badge/coverage-%3F-yellow.svg?style=flat-square) [![Dependency Status](https://david-dm.org/diasdavid/node-ipfs-peer-id.svg?style=flat-square)](https://david-dm.org/diasdavid/node-ipfs-peer-id) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard) [![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) [[![](https://img.shields.io/badge/freejs-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) ![Build Status](https://travis-ci.org/diasdavid/js-peer-id.svg?style=flat-square)](https://travis-ci.org/diasdavid/js-peer-id) ![](https://img.shields.io/badge/coverage-%3F-yellow.svg?style=flat-square) [![Dependency Status](https://david-dm.org/diasdavid/js-peer-id.svg?style=flat-square)](https://david-dm.org/diasdavid/js-peer-id) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)
> IPFS Peer Id implementation in Node.js > IPFS Peer Id implementation in Node.js
@ -14,7 +14,7 @@ A IPFS Peer Id is based on a sha256 has of the peer public key, using [multihash
### Installing ### Installing
``` ```
$ npm install ipfs-peer-id $ npm install peer-id
``` ```
### Creating a new Id ### Creating a new Id
@ -23,22 +23,22 @@ $ npm install ipfs-peer-id
var PeerId = require('ipfs-peer') var PeerId = require('ipfs-peer')
// Create a new Id // Create a new Id
var id = new Id.create() var id = new PeerId.create()
// Recreate an Id from Hex string // Recreate an Id from Hex string
var id = new Id.createFromHexString(str) var id = new PeerId.createFromHexString(str)
// Recreate an Id from a Buffer // Recreate an Id from a Buffer
var id = new Id.createFromBytes(buf) var id = new PeerId.createFromBytes(buf)
// Recreate an B58 String // Recreate an B58 String
var id = new Id.createFromB58String(str) var id = new PeerId.createFromB58String(str)
// Recreate from a Public Key // Recreate from a Public Key
var id = new Id.createFromPubKey(pubKey) var id = new PeerId.createFromPubKey(pubKey)
// Recreate from a Private Key // Recreate from a Private Key
var id = new Id.createFromPrivKey(privKey) var id = new PeerId.createFromPrivKey(privKey)
``` ```
### Exporting an Id ### Exporting an Id

View File

@ -1,12 +1,14 @@
{ {
"name": "ipfs-peer-id", "name": "peer-id",
"version": "0.3.1", "version": "0.3.4",
"description": "IPFS Peer Id implementation in Node.js", "description": "IPFS Peer Id implementation in Node.js",
"main": "src/index.js", "main": "src/index.js",
"scripts": { "scripts": {
"test": "./node_modules/.bin/lab tests/*-test.js", "test": "./node_modules/.bin/lab tests/*-test.js",
"coverage": "./node_modules/.bin/lab -t 100 tests/*-test.js", "coverage": "./node_modules/.bin/lab -t 100 tests/*-test.js",
"codestyle": "./node_modules/.bin/standard --format" "codestyle": "./node_modules/.bin/standard --format",
"lint": "jshint .",
"validate": "npm ls"
}, },
"keywords": [ "keywords": [
"IPFS" "IPFS"
@ -17,10 +19,13 @@
"codestyle", "codestyle",
"test" "test"
], ],
"bugs": { "engines": {
"url": "https://github.com/diasdavid/node-ipfs-peer-id/issues" "node": "^4.0.0"
}, },
"homepage": "https://github.com/diasdavid/node-ipfs-peer-id", "bugs": {
"url": "https://github.com/diasdavid/js-peer-id/issues"
},
"homepage": "https://github.com/diasdavid/js-peer-id",
"devDependencies": { "devDependencies": {
"code": "^1.4.1", "code": "^1.4.1",
"lab": "^5.13.0", "lab": "^5.13.0",