chore: update aegir and jsdocs for eslint changes (#773)

This commit is contained in:
Vasco Santos
2020-10-06 14:59:43 +02:00
committed by GitHub
parent bb59b518f1
commit 96df4b7dc4
43 changed files with 425 additions and 263 deletions

View File

@ -12,10 +12,10 @@ log.trace = debug('libp2p:pnet:trace')
log.error = debug('libp2p:pnet:err')
/**
* Creates a stream iterable to encrypt messages in a private network
* Creates a stream iterable to encrypt messages in a private network
*
* @param {Uint8Array} nonce The nonce to use in encryption
* @param {Uint8Array} psk The private shared key to use in encryption
* @param {Uint8Array} nonce - The nonce to use in encryption
* @param {Uint8Array} psk - The private shared key to use in encryption
* @returns {*} a through iterable
*/
module.exports.createBoxStream = (nonce, psk) => {
@ -28,10 +28,10 @@ module.exports.createBoxStream = (nonce, psk) => {
}
/**
* Creates a stream iterable to decrypt messages in a private network
* Creates a stream iterable to decrypt messages in a private network
*
* @param {Uint8Array} nonce The nonce of the remote peer
* @param {Uint8Array} psk The private shared key to use in decryption
* @param {Uint8Array} nonce - The nonce of the remote peer
* @param {Uint8Array} psk - The private shared key to use in decryption
* @returns {*} a through iterable
*/
module.exports.createUnboxStream = (nonce, psk) => {

View File

@ -25,8 +25,8 @@ log.error = debug('libp2p:pnet:err')
*/
class Protector {
/**
* @param {Uint8Array} keyBuffer The private shared key buffer
* @constructor
* @param {Uint8Array} keyBuffer - The private shared key buffer
* @class
*/
constructor (keyBuffer) {
const decodedPSK = decodeV1PSK(keyBuffer)
@ -39,7 +39,7 @@ class Protector {
* between its two peers from the PSK the Protector instance was
* created with.
*
* @param {Connection} connection The connection to protect
* @param {Connection} connection - The connection to protect
* @returns {*} A protected duplex iterable
*/
async protect (connection) {

View File

@ -7,7 +7,8 @@ const uint8ArrayFromString = require('uint8arrays/from-string')
/**
* Generates a PSK that can be used in a libp2p-pnet private network
* @param {Uint8Array} bytes An object to write the psk into
*
* @param {Uint8Array} bytes - An object to write the psk into
* @returns {void}
*/
function generate (bytes) {