mirror of
https://github.com/fluencelabs/js-peer-id
synced 2025-07-04 15:01:57 +00:00
Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
615a966d6a | |||
171a561537 | |||
fa62838777 | |||
bb2f23633d | |||
d472664924 | |||
2cc1a8ac59 | |||
220355fb25 | |||
a0dbc2ced8 | |||
6415a13714 | |||
4185ff1be6 |
13
.travis.yml
Normal file
13
.travis.yml
Normal file
@ -0,0 +1,13 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- "4.0"
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
before_install:
|
||||
- npm i -g npm
|
||||
# Workaround for a permissions issue with Travis virtual machine images
|
||||
script:
|
||||
- npm test
|
@ -1,7 +1,7 @@
|
||||
ipfs-peer-id Node.js implementation
|
||||
===================================
|
||||
|
||||

|
||||
[](http://ipn.io) [[](http://webchat.freenode.net/?channels=%23ipfs) ](https://travis-ci.org/diasdavid/node-ipfs-peer-id)  [](https://david-dm.org/diasdavid/node-ipfs-peer-id) [](https://github.com/feross/standard)
|
||||
|
||||
> IPFS Peer Id implementation in Node.js
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ipfs-peer-id",
|
||||
"version": "0.1.0",
|
||||
"version": "0.3.2",
|
||||
"description": "IPFS Peer Id implementation in Node.js",
|
||||
"main": "src/index.js",
|
||||
"scripts": {
|
||||
@ -17,6 +17,9 @@
|
||||
"codestyle",
|
||||
"test"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^4.0.0"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/diasdavid/node-ipfs-peer-id/issues"
|
||||
},
|
||||
@ -24,11 +27,11 @@
|
||||
"devDependencies": {
|
||||
"code": "^1.4.1",
|
||||
"lab": "^5.13.0",
|
||||
"precommit-hook": "^3.0.0",
|
||||
"pre-commit": "^1.1.1",
|
||||
"standard": "^4.5.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"bs58": "^2.0.1",
|
||||
"multihashing": "^0.1.2"
|
||||
"multihashing": "^0.1.3"
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ var crypto = require('crypto')
|
||||
|
||||
exports = module.exports = Id
|
||||
|
||||
function Id (id, pubKey, privKey) {
|
||||
function Id (id, privKey, pubKey) {
|
||||
var self = this
|
||||
|
||||
if (!(self instanceof Id)) {
|
||||
@ -70,7 +70,6 @@ exports.createFromB58String = function (str) {
|
||||
|
||||
exports.createFromPubKey = function (pubKey) {
|
||||
var mhId = multihashing(pubKey, 'sha2-256')
|
||||
|
||||
return new Id(mhId, null, pubKey)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user