mirror of
https://github.com/fluencelabs/js-peer-id
synced 2025-06-27 23:41:40 +00:00
fix args order
This commit is contained in:
@ -8,7 +8,7 @@ var crypto = require('crypto')
|
|||||||
|
|
||||||
exports = module.exports = Id
|
exports = module.exports = Id
|
||||||
|
|
||||||
function Id (id, pubKey, privKey) {
|
function Id (id, privKey, pubKey) {
|
||||||
var self = this
|
var self = this
|
||||||
|
|
||||||
if (!(self instanceof Id)) {
|
if (!(self instanceof Id)) {
|
||||||
@ -70,7 +70,6 @@ exports.createFromB58String = function (str) {
|
|||||||
|
|
||||||
exports.createFromPubKey = function (pubKey) {
|
exports.createFromPubKey = function (pubKey) {
|
||||||
var mhId = multihashing(pubKey, 'sha2-256')
|
var mhId = multihashing(pubKey, 'sha2-256')
|
||||||
|
|
||||||
return new Id(mhId, null, pubKey)
|
return new Id(mhId, null, pubKey)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user