@libp2p/interface-connection-encrypter
Advanced tools
Comparing version 1.0.3 to 2.0.0
import type { PeerId } from '@libp2p/interface-peer-id'; | ||
import type { Duplex } from 'it-stream-types'; | ||
import type { Uint8ArrayList } from 'uint8arraylist'; | ||
/** | ||
@@ -12,10 +13,10 @@ * A libp2p connection encrypter module must be compliant to this interface | ||
*/ | ||
secureOutbound: (localPeer: PeerId, connection: Duplex<Uint8Array>, remotePeer: PeerId) => Promise<SecuredConnection>; | ||
secureOutbound: (localPeer: PeerId, connection: Duplex<Uint8ArrayList>, remotePeer: PeerId) => Promise<SecuredConnection>; | ||
/** | ||
* Decrypt incoming data. | ||
*/ | ||
secureInbound: (localPeer: PeerId, connection: Duplex<Uint8Array>, remotePeer?: PeerId) => Promise<SecuredConnection>; | ||
secureInbound: (localPeer: PeerId, connection: Duplex<Uint8ArrayList>, remotePeer?: PeerId) => Promise<SecuredConnection>; | ||
} | ||
export interface SecuredConnection { | ||
conn: Duplex<Uint8Array>; | ||
conn: Duplex<Uint8ArrayList>; | ||
remoteEarlyData: Uint8Array; | ||
@@ -22,0 +23,0 @@ remotePeer: PeerId; |
{ | ||
"name": "@libp2p/interface-connection-encrypter", | ||
"version": "1.0.3", | ||
"version": "2.0.0", | ||
"description": "Connection Encrypter interface for libp2p", | ||
@@ -89,11 +89,11 @@ "license": "Apache-2.0 OR MIT", | ||
{ | ||
"type": "chore", | ||
"type": "docs", | ||
"release": "patch" | ||
}, | ||
{ | ||
"type": "docs", | ||
"type": "test", | ||
"release": "patch" | ||
}, | ||
{ | ||
"type": "test", | ||
"type": "deps", | ||
"release": "patch" | ||
@@ -128,5 +128,9 @@ }, | ||
"type": "docs", | ||
"section": "Trivial Changes" | ||
"section": "Documentation" | ||
}, | ||
{ | ||
"type": "deps", | ||
"section": "Dependencies" | ||
}, | ||
{ | ||
"type": "test", | ||
@@ -154,3 +158,4 @@ "section": "Tests" | ||
"@libp2p/interface-peer-id": "^1.0.0", | ||
"it-stream-types": "^1.0.4" | ||
"it-stream-types": "^1.0.4", | ||
"uint8arraylist": "^2.1.1" | ||
}, | ||
@@ -157,0 +162,0 @@ "devDependencies": { |
import type { PeerId } from '@libp2p/interface-peer-id' | ||
import type { Duplex } from 'it-stream-types' | ||
import type { Uint8ArrayList } from 'uint8arraylist' | ||
@@ -14,13 +15,13 @@ /** | ||
*/ | ||
secureOutbound: (localPeer: PeerId, connection: Duplex<Uint8Array>, remotePeer: PeerId) => Promise<SecuredConnection> | ||
secureOutbound: (localPeer: PeerId, connection: Duplex<Uint8ArrayList>, remotePeer: PeerId) => Promise<SecuredConnection> | ||
/** | ||
* Decrypt incoming data. | ||
*/ | ||
secureInbound: (localPeer: PeerId, connection: Duplex<Uint8Array>, remotePeer?: PeerId) => Promise<SecuredConnection> | ||
secureInbound: (localPeer: PeerId, connection: Duplex<Uint8ArrayList>, remotePeer?: PeerId) => Promise<SecuredConnection> | ||
} | ||
export interface SecuredConnection { | ||
conn: Duplex<Uint8Array> | ||
conn: Duplex<Uint8ArrayList> | ||
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
14404
119
3
1
+ Addeduint8arraylist@^2.1.1
+ Addedmultiformats@13.3.2(transitive)
+ Addeduint8arraylist@2.4.8(transitive)
+ Addeduint8arrays@5.1.0(transitive)