mirror of
https://github.com/fluencelabs/js-libp2p-noise
synced 2025-04-25 12:22:20 +00:00
Merge pull request #82 from NodeFactoryIo/chore/update-deps-25_01_2021
chore: update deps
This commit is contained in:
commit
00968da390
21
package.json
21
package.json
@ -35,34 +35,35 @@
|
|||||||
"@types/bl": "^2.1.0",
|
"@types/bl": "^2.1.0",
|
||||||
"@types/chai": "^4.2.4",
|
"@types/chai": "^4.2.4",
|
||||||
"@types/mocha": "^5.2.7",
|
"@types/mocha": "^5.2.7",
|
||||||
"aegir": "25.0.0",
|
"aegir": "30.3.0",
|
||||||
"benchmark": "^2.1.4",
|
"benchmark": "^2.1.4",
|
||||||
"chai": "^4.2.0",
|
"chai": "^4.2.0",
|
||||||
"copyfiles": "^2.3.0",
|
"copyfiles": "^2.4.1",
|
||||||
|
"eslint-config-ipfs": "^0.1.0",
|
||||||
"karma-mocha-webworker": "^1.3.0",
|
"karma-mocha-webworker": "^1.3.0",
|
||||||
"microtime": "^3.0.0",
|
"microtime": "^3.0.0",
|
||||||
"mocha": "^6.2.2",
|
"mocha": "^8.2.1",
|
||||||
"sinon": "^8.1.0"
|
"sinon": "^9.2.4"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bcrypto": "^5.2.0",
|
"bcrypto": "^5.3.0",
|
||||||
"buffer": "^5.4.3",
|
"buffer": "^5.4.3",
|
||||||
"debug": "^4.1.1",
|
"debug": "^4.3.1",
|
||||||
"it-buffer": "^0.1.1",
|
"it-buffer": "^0.1.1",
|
||||||
"it-length-prefixed": "^3.0.0",
|
"it-length-prefixed": "^3.0.0",
|
||||||
"it-pair": "^1.0.0",
|
"it-pair": "^1.0.0",
|
||||||
"it-pb-rpc": "^0.1.8",
|
"it-pb-rpc": "^0.1.9",
|
||||||
"it-pipe": "^1.1.0",
|
"it-pipe": "^1.1.0",
|
||||||
"libp2p-crypto": "^0.18.0",
|
"libp2p-crypto": "^0.19.0",
|
||||||
"peer-id": "^0.14.0",
|
"peer-id": "^0.14.0",
|
||||||
"protobufjs": "^6.10.1",
|
"protobufjs": "^6.10.1",
|
||||||
"uint8arrays": "^1.1.0"
|
"uint8arrays": "^2.0.5"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"bn.js": "4.4.0"
|
"bn.js": "4.4.0"
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
"extends": "./node_modules/aegir/src/config/eslintrc-ts.js",
|
"extends": "ipfs",
|
||||||
"rules": {
|
"rules": {
|
||||||
"@typescript-eslint/no-unused-vars": "error"
|
"@typescript-eslint/no-unused-vars": "error"
|
||||||
},
|
},
|
||||||
|
@ -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
|
* @param {bytes} earlyData
|
||||||
*/
|
*/
|
||||||
constructor (staticNoiseKey?: bytes, earlyData?: bytes) {
|
constructor (staticNoiseKey?: bytes, earlyData?: bytes) {
|
||||||
@ -61,6 +61,7 @@ export class Noise implements INoiseConnection {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Encrypt outgoing data to the remote party (handshake as initiator)
|
* Encrypt outgoing data to the remote party (handshake as initiator)
|
||||||
|
*
|
||||||
* @param {PeerId} localPeer - PeerId of the receiving peer
|
* @param {PeerId} localPeer - PeerId of the receiving peer
|
||||||
* @param {any} connection - streaming iterable duplex that will be encrypted
|
* @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.
|
* @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).
|
* Decrypt incoming data (handshake as responder).
|
||||||
|
*
|
||||||
* @param {PeerId} localPeer - PeerId of the receiving peer.
|
* @param {PeerId} localPeer - PeerId of the receiving peer.
|
||||||
* @param {any} connection - streaming iterable duplex that will be encryption.
|
* @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.
|
* @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 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.
|
* If noise pipes disabled or remote peer static key is unknown, use XX.
|
||||||
|
*
|
||||||
* @param {HandshakeParams} params
|
* @param {HandshakeParams} params
|
||||||
*/
|
*/
|
||||||
private async performHandshake (params: HandshakeParams): Promise<IHandshake> {
|
private async performHandshake (params: HandshakeParams): Promise<IHandshake> {
|
||||||
|
@ -76,6 +76,7 @@ async function isValidPeerId (peerId: Uint8Array, publicKeyProtobuf: bytes) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Verifies signed payload, throws on any irregularities.
|
* Verifies signed payload, throws on any irregularities.
|
||||||
|
*
|
||||||
* @param {bytes} noiseStaticKey - owner's noise static key
|
* @param {bytes} noiseStaticKey - owner's noise static key
|
||||||
* @param {bytes} payload - decoded payload
|
* @param {bytes} payload - decoded payload
|
||||||
* @param {PeerId} remotePeer - owner's libp2p peer ID
|
* @param {PeerId} remotePeer - owner's libp2p peer ID
|
||||||
|
Loading…
x
Reference in New Issue
Block a user