mirror of
https://github.com/fluencelabs/js-peer-id
synced 2025-07-03 23:51:40 +00:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
220355fb25 | |||
a0dbc2ced8 | |||
6415a13714 | |||
4185ff1be6 |
@ -1,7 +1,7 @@
|
||||
ipfs-peer-id Node.js implementation
|
||||
===================================
|
||||
|
||||

|
||||
[](http://webchat.freenode.net/?channels=%23ipfs)
|
||||
|
||||
> IPFS Peer Id implementation in Node.js
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ipfs-peer-id",
|
||||
"version": "0.1.0",
|
||||
"version": "0.2.0",
|
||||
"description": "IPFS Peer Id implementation in Node.js",
|
||||
"main": "src/index.js",
|
||||
"scripts": {
|
||||
@ -29,6 +29,6 @@
|
||||
},
|
||||
"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