Launch Week Day 5: Introducing Reachability for PHP.Learn More
Socket
Book a DemoSign in
Socket

@libp2p/interface-connection-encrypter

Package Overview
Dependencies
Maintainers
6
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@libp2p/interface-connection-encrypter - npm Package Compare versions

Comparing version
3.0.6
to
4.0.0
+4
-4
dist/src/index.d.ts
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;

@@ -1,1 +0,1 @@

{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAE7C;;;GAGG;AACH,MAAM,WAAW,mBAAmB,CAAC,SAAS,GAAG,OAAO;IACt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U,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,UAAU,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAA;CACpL;AAED,MAAM,WAAW,iBAAiB,CAAC,SAAS,GAAG,OAAO;IACpD,IAAI,EAAE,MAAM,CAAC,cAAc,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAA;IAC3E,gBAAgB,CAAC,EAAE,SAAS,CAAA;IAC5B,UAAU,EAAE,MAAM,CAAA;CACnB"}
{
"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
}