@libp2p/interface-internal
Advanced tools
Comparing version 2.2.3 to 2.2.4-21088c519
@@ -1,47 +0,19 @@ | ||
import type { Connection, Stream, Topology } from '@libp2p/interface'; | ||
export interface IncomingStreamData { | ||
/** | ||
* The stream that has been opened | ||
*/ | ||
stream: Stream; | ||
/** | ||
* The connection that the stream was opened on | ||
*/ | ||
connection: Connection; | ||
} | ||
export interface StreamHandler { | ||
(data: IncomingStreamData): void; | ||
} | ||
export interface StreamHandlerOptions { | ||
/** | ||
* How many incoming streams can be open for this protocol at the same time on each connection | ||
* | ||
* @default 32 | ||
*/ | ||
maxInboundStreams?: number; | ||
/** | ||
* How many outgoing streams can be open for this protocol at the same time on each connection | ||
* | ||
* @default 64 | ||
*/ | ||
maxOutboundStreams?: number; | ||
/** | ||
* If true, allow this protocol to run on limited connections (e.g. | ||
* connections with data or duration limits such as circuit relay | ||
* connections) | ||
* | ||
* @default false | ||
*/ | ||
runOnLimitedConnection?: boolean; | ||
} | ||
export interface StreamHandlerRecord { | ||
/** | ||
* The handler that was registered to handle streams opened on the protocol | ||
*/ | ||
handler: StreamHandler; | ||
/** | ||
* The options that were used to register the stream handler | ||
*/ | ||
options: StreamHandlerOptions; | ||
} | ||
import type { StreamHandler, StreamHandlerOptions, StreamHandlerRecord, Topology, IncomingStreamData } from '@libp2p/interface'; | ||
export type { | ||
/** | ||
* @deprecated This type should be imported from @libp2p/interface directly | ||
*/ | ||
IncomingStreamData, | ||
/** | ||
* @deprecated This type should be imported from @libp2p/interface directly | ||
*/ | ||
StreamHandler, | ||
/** | ||
* @deprecated This type should be imported from @libp2p/interface directly | ||
*/ | ||
StreamHandlerOptions, | ||
/** | ||
* @deprecated This type should be imported from @libp2p/interface directly | ||
*/ | ||
StreamHandlerRecord }; | ||
export interface Registrar { | ||
@@ -48,0 +20,0 @@ /** |
{ | ||
"name": "@libp2p/interface-internal", | ||
"version": "2.2.3", | ||
"version": "2.2.4-21088c519", | ||
"description": "Interfaces implemented by internal libp2p components", | ||
@@ -51,4 +51,4 @@ "license": "Apache-2.0 OR MIT", | ||
"dependencies": { | ||
"@libp2p/interface": "^2.4.1", | ||
"@libp2p/peer-collections": "^6.0.15", | ||
"@libp2p/interface": "2.4.1-21088c519", | ||
"@libp2p/peer-collections": "6.0.16-21088c519", | ||
"@multiformats/multiaddr": "^12.3.3", | ||
@@ -55,0 +55,0 @@ "progress-events": "^1.0.1", |
@@ -1,56 +0,25 @@ | ||
import type { Connection, Stream, Topology } from '@libp2p/interface' | ||
import type { StreamHandler, StreamHandlerOptions, StreamHandlerRecord, Topology, IncomingStreamData } from '@libp2p/interface' | ||
export interface IncomingStreamData { | ||
export type { | ||
/** | ||
* The stream that has been opened | ||
* @deprecated This type should be imported from @libp2p/interface directly | ||
*/ | ||
stream: Stream | ||
IncomingStreamData, | ||
/** | ||
* The connection that the stream was opened on | ||
* @deprecated This type should be imported from @libp2p/interface directly | ||
*/ | ||
connection: Connection | ||
} | ||
StreamHandler, | ||
export interface StreamHandler { | ||
(data: IncomingStreamData): void | ||
} | ||
export interface StreamHandlerOptions { | ||
/** | ||
* How many incoming streams can be open for this protocol at the same time on each connection | ||
* | ||
* @default 32 | ||
* @deprecated This type should be imported from @libp2p/interface directly | ||
*/ | ||
maxInboundStreams?: number | ||
StreamHandlerOptions, | ||
/** | ||
* How many outgoing streams can be open for this protocol at the same time on each connection | ||
* | ||
* @default 64 | ||
* @deprecated This type should be imported from @libp2p/interface directly | ||
*/ | ||
maxOutboundStreams?: number | ||
/** | ||
* If true, allow this protocol to run on limited connections (e.g. | ||
* connections with data or duration limits such as circuit relay | ||
* connections) | ||
* | ||
* @default false | ||
*/ | ||
runOnLimitedConnection?: boolean | ||
StreamHandlerRecord | ||
} | ||
export interface StreamHandlerRecord { | ||
/** | ||
* The handler that was registered to handle streams opened on the protocol | ||
*/ | ||
handler: StreamHandler | ||
/** | ||
* The options that were used to register the stream handler | ||
*/ | ||
options: StreamHandlerOptions | ||
} | ||
export interface Registrar { | ||
@@ -57,0 +26,0 @@ /** |
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
36731
38
767
1
+ Added@libp2p/crypto@5.0.10-21088c519(transitive)
+ Added@libp2p/interface@2.4.1-21088c519(transitive)
+ Added@libp2p/logger@5.1.7-21088c519(transitive)
+ Added@libp2p/peer-collections@6.0.16-21088c519(transitive)
+ Added@libp2p/peer-id@5.0.11-21088c519(transitive)
+ Added@libp2p/utils@6.5.0-21088c519(transitive)
- Removed@libp2p/crypto@5.0.11(transitive)
- Removed@libp2p/interface@2.5.0(transitive)
- Removed@libp2p/logger@5.1.8(transitive)
- Removed@libp2p/peer-collections@6.0.17(transitive)
- Removed@libp2p/peer-id@5.0.12(transitive)
- Removed@libp2p/utils@6.5.1(transitive)