@libp2p/interface-connection-encrypter
Advanced tools
Comparing version 3.0.6 to 4.0.0
import type { PeerId } from '@libp2p/interface-peer-id'; | ||
import type { Duplex } from 'it-stream-types'; | ||
import type { Duplex, Source } from 'it-stream-types'; | ||
/** | ||
@@ -14,3 +14,3 @@ * A libp2p connection encrypter module must be compliant to this interface | ||
*/ | ||
secureOutbound: (localPeer: PeerId, connection: Duplex<Uint8Array>, remotePeer?: PeerId) => Promise<SecuredConnection<Extension>>; | ||
secureOutbound: (localPeer: PeerId, connection: Duplex<AsyncGenerator<Uint8Array>, Source<Uint8Array>, Promise<void>>, remotePeer?: PeerId) => Promise<SecuredConnection<Extension>>; | ||
/** | ||
@@ -21,6 +21,6 @@ * Decrypt incoming data. If the remote PeerId is known, | ||
*/ | ||
secureInbound: (localPeer: PeerId, connection: Duplex<Uint8Array>, remotePeer?: PeerId) => Promise<SecuredConnection<Extension>>; | ||
secureInbound: (localPeer: PeerId, connection: Duplex<AsyncGenerator<Uint8Array>, Source<Uint8Array>, Promise<void>>, remotePeer?: PeerId) => Promise<SecuredConnection<Extension>>; | ||
} | ||
export interface SecuredConnection<Extension = unknown> { | ||
conn: Duplex<Uint8Array>; | ||
conn: Duplex<AsyncGenerator<Uint8Array>, Source<Uint8Array>, Promise<void>>; | ||
remoteExtensions?: Extension; | ||
@@ -27,0 +27,0 @@ remotePeer: PeerId; |
{ | ||
"name": "@libp2p/interface-connection-encrypter", | ||
"version": "3.0.6", | ||
"version": "4.0.0", | ||
"description": "Connection Encrypter interface for libp2p", | ||
@@ -156,4 +156,3 @@ "license": "Apache-2.0 OR MIT", | ||
"@libp2p/interface-peer-id": "^2.0.0", | ||
"it-stream-types": "^1.0.4", | ||
"uint8arraylist": "^2.1.2" | ||
"it-stream-types": "^2.0.1" | ||
}, | ||
@@ -160,0 +159,0 @@ "devDependencies": { |
import type { PeerId } from '@libp2p/interface-peer-id' | ||
import type { Duplex } from 'it-stream-types' | ||
import type { Duplex, Source } from 'it-stream-types' | ||
@@ -16,3 +16,3 @@ /** | ||
*/ | ||
secureOutbound: (localPeer: PeerId, connection: Duplex<Uint8Array>, remotePeer?: PeerId) => Promise<SecuredConnection<Extension>> | ||
secureOutbound: (localPeer: PeerId, connection: Duplex<AsyncGenerator<Uint8Array>, Source<Uint8Array>, Promise<void>>, remotePeer?: PeerId) => Promise<SecuredConnection<Extension>> | ||
@@ -24,9 +24,9 @@ /** | ||
*/ | ||
secureInbound: (localPeer: PeerId, connection: Duplex<Uint8Array>, remotePeer?: PeerId) => Promise<SecuredConnection<Extension>> | ||
secureInbound: (localPeer: PeerId, connection: Duplex<AsyncGenerator<Uint8Array>, Source<Uint8Array>, Promise<void>>, remotePeer?: PeerId) => Promise<SecuredConnection<Extension>> | ||
} | ||
export interface SecuredConnection<Extension = unknown> { | ||
conn: Duplex<Uint8Array> | ||
conn: Duplex<AsyncGenerator<Uint8Array>, Source<Uint8Array>, Promise<void>> | ||
remoteExtensions?: Extension | ||
remotePeer: PeerId | ||
} |
Sorry, the diff of this file is not supported yet
16596
2
+ Addedit-stream-types@2.0.2(transitive)
- Removeduint8arraylist@^2.1.2
- Removedit-stream-types@1.0.5(transitive)
- Removedmultiformats@13.3.2(transitive)
- Removeduint8arraylist@2.4.8(transitive)
- Removeduint8arrays@5.1.0(transitive)
Updatedit-stream-types@^2.0.1