@libp2p/interface-connection-encrypter
Advanced tools
Comparing version 2.0.0 to 2.0.1
import type { PeerId } from '@libp2p/interface-peer-id'; | ||
import type { Duplex } from 'it-stream-types'; | ||
import type { Uint8ArrayList } from 'uint8arraylist'; | ||
/** | ||
@@ -13,10 +12,10 @@ * A libp2p connection encrypter module must be compliant to this interface | ||
*/ | ||
secureOutbound: (localPeer: PeerId, connection: Duplex<Uint8ArrayList>, remotePeer: PeerId) => Promise<SecuredConnection>; | ||
secureOutbound: (localPeer: PeerId, connection: Duplex<Uint8Array>, remotePeer: PeerId) => Promise<SecuredConnection>; | ||
/** | ||
* Decrypt incoming data. | ||
*/ | ||
secureInbound: (localPeer: PeerId, connection: Duplex<Uint8ArrayList>, remotePeer?: PeerId) => Promise<SecuredConnection>; | ||
secureInbound: (localPeer: PeerId, connection: Duplex<Uint8Array>, remotePeer?: PeerId) => Promise<SecuredConnection>; | ||
} | ||
export interface SecuredConnection { | ||
conn: Duplex<Uint8ArrayList>; | ||
conn: Duplex<Uint8Array>; | ||
remoteEarlyData: Uint8Array; | ||
@@ -23,0 +22,0 @@ remotePeer: PeerId; |
{ | ||
"name": "@libp2p/interface-connection-encrypter", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Connection Encrypter interface for libp2p", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0 OR MIT", |
import type { PeerId } from '@libp2p/interface-peer-id' | ||
import type { Duplex } from 'it-stream-types' | ||
import type { Uint8ArrayList } from 'uint8arraylist' | ||
@@ -15,13 +14,14 @@ /** | ||
*/ | ||
secureOutbound: (localPeer: PeerId, connection: Duplex<Uint8ArrayList>, remotePeer: PeerId) => Promise<SecuredConnection> | ||
secureOutbound: (localPeer: PeerId, connection: Duplex<Uint8Array>, remotePeer: PeerId) => Promise<SecuredConnection> | ||
/** | ||
* Decrypt incoming data. | ||
*/ | ||
secureInbound: (localPeer: PeerId, connection: Duplex<Uint8ArrayList>, remotePeer?: PeerId) => Promise<SecuredConnection> | ||
secureInbound: (localPeer: PeerId, connection: Duplex<Uint8Array>, remotePeer?: PeerId) => Promise<SecuredConnection> | ||
} | ||
export interface SecuredConnection { | ||
conn: Duplex<Uint8ArrayList> | ||
conn: Duplex<Uint8Array> | ||
remoteEarlyData: Uint8Array | ||
remotePeer: PeerId | ||
} |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
14226
117