@libp2p/interface-transport
Advanced tools
Comparing version 1.0.4 to 2.0.0
import type { AbortOptions } from '@libp2p/interfaces'; | ||
import type { EventEmitter } from '@libp2p/interfaces/events'; | ||
import type { StreamMuxerFactory } from '@libp2p/interface-stream-muxer'; | ||
import type { Multiaddr } from '@multiformats/multiaddr'; | ||
@@ -71,2 +72,7 @@ import type { Connection, MultiaddrConnection } from '@libp2p/interface-connection'; | ||
} | ||
export interface UpgraderOptions { | ||
skipEncryption?: boolean; | ||
skipProtection?: boolean; | ||
muxerFactory?: StreamMuxerFactory; | ||
} | ||
export interface Upgrader extends EventEmitter<UpgraderEvents> { | ||
@@ -76,7 +82,7 @@ /** | ||
*/ | ||
upgradeOutbound: (maConn: MultiaddrConnection) => Promise<Connection>; | ||
upgradeOutbound: (maConn: MultiaddrConnection, opts?: UpgraderOptions) => Promise<Connection>; | ||
/** | ||
* Upgrades an inbound connection on transport listener. | ||
*/ | ||
upgradeInbound: (maConn: MultiaddrConnection) => Promise<Connection>; | ||
upgradeInbound: (maConn: MultiaddrConnection, opts?: UpgraderOptions) => Promise<Connection>; | ||
} | ||
@@ -83,0 +89,0 @@ export interface ProtocolHandler { |
{ | ||
"name": "@libp2p/interface-transport", | ||
"version": "1.0.4", | ||
"version": "2.0.0", | ||
"description": "Transport interface for libp2p", | ||
@@ -138,2 +138,3 @@ "license": "Apache-2.0 OR MIT", | ||
"@multiformats/multiaddr": "^11.0.0", | ||
"@libp2p/interface-stream-muxer": "^3.0.0", | ||
"it-stream-types": "^1.0.4" | ||
@@ -140,0 +141,0 @@ }, |
import type { AbortOptions } from '@libp2p/interfaces' | ||
import type { EventEmitter } from '@libp2p/interfaces/events' | ||
import type { StreamMuxerFactory } from '@libp2p/interface-stream-muxer' | ||
import type { Multiaddr } from '@multiformats/multiaddr' | ||
@@ -81,2 +82,8 @@ import type { Connection, MultiaddrConnection } from '@libp2p/interface-connection' | ||
export interface UpgraderOptions { | ||
skipEncryption?: boolean | ||
skipProtection?: boolean | ||
muxerFactory?: StreamMuxerFactory | ||
} | ||
export interface Upgrader extends EventEmitter<UpgraderEvents> { | ||
@@ -86,3 +93,3 @@ /** | ||
*/ | ||
upgradeOutbound: (maConn: MultiaddrConnection) => Promise<Connection> | ||
upgradeOutbound: (maConn: MultiaddrConnection, opts?: UpgraderOptions) => Promise<Connection> | ||
@@ -92,3 +99,3 @@ /** | ||
*/ | ||
upgradeInbound: (maConn: MultiaddrConnection) => Promise<Connection> | ||
upgradeInbound: (maConn: MultiaddrConnection, opts?: UpgraderOptions) => Promise<Connection> | ||
} | ||
@@ -95,0 +102,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
24164
210
5
+ Added@libp2p/interface-connection@4.0.0(transitive)
+ Added@libp2p/interface-stream-muxer@3.0.6(transitive)