diff --git a/.aegir.js b/.aegir.js new file mode 100644 index 0000000000..0ca4c88827 --- /dev/null +++ b/.aegir.js @@ -0,0 +1,20 @@ +'use strict' + +const path = require('path') + +module.exports = { + webpack: { + resolve: { + alias: { + 'node-forge': path.resolve( + path.dirname(require.resolve('libp2p-crypto')), + '../vendor/forge.bundle.js' + ) + } + }, + externals: { + fs: '{}', + mkdirp: '{}' + } + } +} diff --git a/package.json b/package.json index 3194d7668f..889f67087b 100644 --- a/package.json +++ b/package.json @@ -73,16 +73,16 @@ "ipfs-repo": "^0.8.0", "ipfs-unixfs-engine": "^0.8.0", "joi": "^8.0.5", - "libp2p-ipfs": "^0.8.1", - "libp2p-ipfs-browser": "^0.7.0", - "libp2p-swarm": "^0.18.2", + "libp2p-ipfs": "^0.9.0", + "libp2p-ipfs-browser": "^0.8.0", + "libp2p-swarm": "^0.19.0", "lodash.get": "^4.3.0", "lodash.set": "^4.2.0", "multiaddr": "^2.0.2", "path-exists": "^3.0.0", - "peer-book": "^0.1.1", - "peer-id": "^0.6.7", - "peer-info": "^0.6.2", + "peer-book": "^0.3.0", + "peer-id": "^0.7.0", + "peer-info": "^0.7.0", "promisify-es6": "^1.0.1", "readable-stream": "1.1.13", "ronin": "^0.3.11", @@ -92,20 +92,6 @@ "run-waterfall": "^1.1.3", "temp": "^0.8.3" }, - "aegir": { - "webpack": { - "resolve": { - "alias": { - "node-forge": "../../../node_modules/peer-id/vendor/forge.bundle.js", - "libp2p-ipfs": "libp2p-ipfs-browser" - } - }, - "externals": { - "fs": "{}", - "mkdirp": "{}" - } - } - }, "contributors": [ "Andrew de Andrade ", "David Dias ", @@ -123,4 +109,4 @@ "kumavis ", "nginnever " ] -} \ No newline at end of file +} diff --git a/src/core/ipfs/id.js b/src/core/ipfs/id.js index d322b02d51..99d442cd92 100644 --- a/src/core/ipfs/id.js +++ b/src/core/ipfs/id.js @@ -15,7 +15,7 @@ module.exports = function id (self) { function ready () { callback(null, { ID: self._peerInfo.id.toB58String(), - PublicKey: self._peerInfo.id.pubKey.toString('base64'), + PublicKey: self._peerInfo.id.pubKey.bytes.toString('base64'), Addresses: self._peerInfo.multiaddrs.map((ma) => { return ma.toString() }).sort(), AgentVersion: 'js-ipfs', ProtocolVersion: '9000' diff --git a/src/core/ipfs/init.js b/src/core/ipfs/init.js index 66c4d470c6..71ef24a6f1 100644 --- a/src/core/ipfs/init.js +++ b/src/core/ipfs/init.js @@ -39,7 +39,7 @@ module.exports = function init (self) { }) config.Identity = { PeerID: keys.toB58String(), - PrivKey: keys.privKey.toString('base64') + PrivKey: keys.privKey.bytes.toString('base64') } writeVersion()