Skip to content

Commit 00968da

Browse files
authored
Merge pull request #82 from NodeFactoryIo/chore/update-deps-25_01_2021
chore: update deps
2 parents d525a79 + 11d7f21 commit 00968da

File tree

4 files changed

+2163
-3156
lines changed

4 files changed

+2163
-3156
lines changed

package.json

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,34 +35,35 @@
3535
"@types/bl": "^2.1.0",
3636
"@types/chai": "^4.2.4",
3737
"@types/mocha": "^5.2.7",
38-
"aegir": "25.0.0",
38+
"aegir": "30.3.0",
3939
"benchmark": "^2.1.4",
4040
"chai": "^4.2.0",
41-
"copyfiles": "^2.3.0",
41+
"copyfiles": "^2.4.1",
42+
"eslint-config-ipfs": "^0.1.0",
4243
"karma-mocha-webworker": "^1.3.0",
4344
"microtime": "^3.0.0",
44-
"mocha": "^6.2.2",
45-
"sinon": "^8.1.0"
45+
"mocha": "^8.2.1",
46+
"sinon": "^9.2.4"
4647
},
4748
"dependencies": {
48-
"bcrypto": "^5.2.0",
49+
"bcrypto": "^5.3.0",
4950
"buffer": "^5.4.3",
50-
"debug": "^4.1.1",
51+
"debug": "^4.3.1",
5152
"it-buffer": "^0.1.1",
5253
"it-length-prefixed": "^3.0.0",
5354
"it-pair": "^1.0.0",
54-
"it-pb-rpc": "^0.1.8",
55+
"it-pb-rpc": "^0.1.9",
5556
"it-pipe": "^1.1.0",
56-
"libp2p-crypto": "^0.18.0",
57+
"libp2p-crypto": "^0.19.0",
5758
"peer-id": "^0.14.0",
5859
"protobufjs": "^6.10.1",
59-
"uint8arrays": "^1.1.0"
60+
"uint8arrays": "^2.0.5"
6061
},
6162
"resolutions": {
6263
"bn.js": "4.4.0"
6364
},
6465
"eslintConfig": {
65-
"extends": "./node_modules/aegir/src/config/eslintrc-ts.js",
66+
"extends": "ipfs",
6667
"rules": {
6768
"@typescript-eslint/no-unused-vars": "error"
6869
},

src/noise.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class Noise implements INoiseConnection {
4040

4141
/**
4242
*
43-
* @param {bytes} staticNoiseKey x25519 private key, reuse for faster handshakes
43+
* @param {bytes} staticNoiseKey - x25519 private key, reuse for faster handshakes
4444
* @param {bytes} earlyData
4545
*/
4646
constructor (staticNoiseKey?: bytes, earlyData?: bytes) {
@@ -61,6 +61,7 @@ export class Noise implements INoiseConnection {
6161

6262
/**
6363
* Encrypt outgoing data to the remote party (handshake as initiator)
64+
*
6465
* @param {PeerId} localPeer - PeerId of the receiving peer
6566
* @param {any} connection - streaming iterable duplex that will be encrypted
6667
* @param {PeerId} remotePeer - PeerId of the remote peer. Used to validate the integrity of the remote peer.
@@ -95,6 +96,7 @@ export class Noise implements INoiseConnection {
9596

9697
/**
9798
* Decrypt incoming data (handshake as responder).
99+
*
98100
* @param {PeerId} localPeer - PeerId of the receiving peer.
99101
* @param {any} connection - streaming iterable duplex that will be encryption.
100102
* @param {PeerId} remotePeer - optional PeerId of the initiating peer, if known. This may only exist during transport upgrades.
@@ -130,6 +132,7 @@ export class Noise implements INoiseConnection {
130132
/**
131133
* If Noise pipes supported, tries IK handshake first with XX as fallback if it fails.
132134
* If noise pipes disabled or remote peer static key is unknown, use XX.
135+
*
133136
* @param {HandshakeParams} params
134137
*/
135138
private async performHandshake (params: HandshakeParams): Promise<IHandshake> {

src/utils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ async function isValidPeerId (peerId: Uint8Array, publicKeyProtobuf: bytes) {
7676

7777
/**
7878
* Verifies signed payload, throws on any irregularities.
79+
*
7980
* @param {bytes} noiseStaticKey - owner's noise static key
8081
* @param {bytes} payload - decoded payload
8182
* @param {PeerId} remotePeer - owner's libp2p peer ID

0 commit comments

Comments
 (0)