Skip to content

Commit

Permalink
Merge pull request #82 from NodeFactoryIo/chore/update-deps-25_01_2021
Browse files Browse the repository at this point in the history
chore: update deps
  • Loading branch information
mpetrunic authored Jan 25, 2021
2 parents d525a79 + 11d7f21 commit 00968da
Show file tree
Hide file tree
Showing 4 changed files with 2,163 additions and 3,156 deletions.
21 changes: 11 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,34 +35,35 @@
"@types/bl": "^2.1.0",
"@types/chai": "^4.2.4",
"@types/mocha": "^5.2.7",
"aegir": "25.0.0",
"aegir": "30.3.0",
"benchmark": "^2.1.4",
"chai": "^4.2.0",
"copyfiles": "^2.3.0",
"copyfiles": "^2.4.1",
"eslint-config-ipfs": "^0.1.0",
"karma-mocha-webworker": "^1.3.0",
"microtime": "^3.0.0",
"mocha": "^6.2.2",
"sinon": "^8.1.0"
"mocha": "^8.2.1",
"sinon": "^9.2.4"
},
"dependencies": {
"bcrypto": "^5.2.0",
"bcrypto": "^5.3.0",
"buffer": "^5.4.3",
"debug": "^4.1.1",
"debug": "^4.3.1",
"it-buffer": "^0.1.1",
"it-length-prefixed": "^3.0.0",
"it-pair": "^1.0.0",
"it-pb-rpc": "^0.1.8",
"it-pb-rpc": "^0.1.9",
"it-pipe": "^1.1.0",
"libp2p-crypto": "^0.18.0",
"libp2p-crypto": "^0.19.0",
"peer-id": "^0.14.0",
"protobufjs": "^6.10.1",
"uint8arrays": "^1.1.0"
"uint8arrays": "^2.0.5"
},
"resolutions": {
"bn.js": "4.4.0"
},
"eslintConfig": {
"extends": "./node_modules/aegir/src/config/eslintrc-ts.js",
"extends": "ipfs",
"rules": {
"@typescript-eslint/no-unused-vars": "error"
},
Expand Down
5 changes: 4 additions & 1 deletion src/noise.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class Noise implements INoiseConnection {

/**
*
* @param {bytes} staticNoiseKey x25519 private key, reuse for faster handshakes
* @param {bytes} staticNoiseKey - x25519 private key, reuse for faster handshakes
* @param {bytes} earlyData
*/
constructor (staticNoiseKey?: bytes, earlyData?: bytes) {
Expand All @@ -61,6 +61,7 @@ export class Noise implements INoiseConnection {

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

/**
* Decrypt incoming data (handshake as responder).
*
* @param {PeerId} localPeer - PeerId of the receiving peer.
* @param {any} connection - streaming iterable duplex that will be encryption.
* @param {PeerId} remotePeer - optional PeerId of the initiating peer, if known. This may only exist during transport upgrades.
Expand Down Expand Up @@ -130,6 +132,7 @@ export class Noise implements INoiseConnection {
/**
* If Noise pipes supported, tries IK handshake first with XX as fallback if it fails.
* If noise pipes disabled or remote peer static key is unknown, use XX.
*
* @param {HandshakeParams} params
*/
private async performHandshake (params: HandshakeParams): Promise<IHandshake> {
Expand Down
1 change: 1 addition & 0 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ async function isValidPeerId (peerId: Uint8Array, publicKeyProtobuf: bytes) {

/**
* Verifies signed payload, throws on any irregularities.
*
* @param {bytes} noiseStaticKey - owner's noise static key
* @param {bytes} payload - decoded payload
* @param {PeerId} remotePeer - owner's libp2p peer ID
Expand Down
Loading

0 comments on commit 00968da

Please sign in to comment.