@libp2p/interface-connection-encrypter
Advanced tools
Comparing version
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
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
16596
3.07%2
-33.33%+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
Updated