Merge pull request #82 from NodeFactoryIo/chore/update-deps-25_01_2021

chore: update deps
This commit is contained in:
Marin Petrunić 2021-01-25 12:15:34 +01:00 committed by GitHub
commit 00968da390
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 2155 additions and 3148 deletions

View File

@ -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"
},

View File

@ -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) {
@ -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.
@ -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.
@ -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> {

View File

@ -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

5276
yarn.lock

File diff suppressed because it is too large Load Diff