mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-06-29 08:51:34 +00:00
chore: add typedefs
This commit is contained in:
@ -16,6 +16,17 @@ function lpEncodeExchange (exchange) {
|
||||
return lp.encode.single(pb)
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {import('libp2p-interfaces/src/connection').Connection} Connection
|
||||
*/
|
||||
|
||||
/**
|
||||
* Encrypt connection.
|
||||
*
|
||||
* @param {PeerId} localId
|
||||
* @param {Connection} conn
|
||||
* @param {PeerId} remoteId
|
||||
*/
|
||||
async function encrypt (localId, conn, remoteId) {
|
||||
const shake = handshake(conn)
|
||||
|
||||
|
Reference in New Issue
Block a user