New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@libp2p/interface-internal

Package Overview
Dependencies
Maintainers
6
Versions
558
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@libp2p/interface-internal - npm Package Compare versions

Comparing version 0.1.11-8c169db1b to 0.1.11-9197f10ba

12

dist/src/registrar/index.d.ts
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;

@@ -26,3 +32,9 @@ }

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;

@@ -29,0 +41,0 @@ }

import type { Connection, Listener, Transport } from '@libp2p/interface';
import type { Multiaddr } from '@multiformats/multiaddr';
export interface TransportManager {
/**
* Add a transport to the transport manager
*/
add(transport: Transport): void;
/**
* Dial a multiaddr. Connections returned by this method will not be tracked
* by the connection manager so can cause memory leaks. If you need to dial
* a multiaddr, you may want to call openConnection on the connection manager
* instead.
*/
dial(ma: Multiaddr, options?: any): Promise<Connection>;
/**
* Return all addresses currently being listened on
*/
getAddrs(): Multiaddr[];
/**
* Return all registered transports
*/
getTransports(): Transport[];
/**
* Return all listeners
*/
getListeners(): Listener[];
/**
* Get the transport for a given multiaddr, if one has been configured
*/
transportForMultiaddr(ma: Multiaddr): Transport | undefined;
/**
* Listen on the passed multiaddrs
*/
listen(addrs: Multiaddr[]): Promise<void>;
/**
* Remove a previously configured transport
*/
remove(key: string): Promise<void>;
/**
* Remove all transports
*/
removeAll(): Promise<void>;
}
//# sourceMappingURL=index.d.ts.map

6

package.json
{
"name": "@libp2p/interface-internal",
"version": "0.1.11-8c169db1b",
"version": "0.1.11-9197f10ba",
"description": "Interfaces implemented by internal libp2p components",

@@ -66,4 +66,4 @@ "license": "Apache-2.0 OR MIT",

"dependencies": {
"@libp2p/interface": "1.0.1-8c169db1b",
"@libp2p/peer-collections": "4.0.10-8c169db1b",
"@libp2p/interface": "1.0.1-9197f10ba",
"@libp2p/peer-collections": "4.0.10-9197f10ba",
"@multiformats/multiaddr": "^12.1.10",

@@ -70,0 +70,0 @@ "uint8arraylist": "^2.4.3"

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

@@ -32,3 +39,10 @@ }

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

@@ -35,0 +49,0 @@ }

@@ -5,11 +5,49 @@ import type { Connection, Listener, Transport } from '@libp2p/interface'

export interface TransportManager {
/**
* Add a transport to the transport manager
*/
add(transport: Transport): void
/**
* Dial a multiaddr. Connections returned by this method will not be tracked
* by the connection manager so can cause memory leaks. If you need to dial
* a multiaddr, you may want to call openConnection on the connection manager
* instead.
*/
dial(ma: Multiaddr, options?: any): Promise<Connection>
/**
* Return all addresses currently being listened on
*/
getAddrs(): Multiaddr[]
/**
* Return all registered transports
*/
getTransports(): Transport[]
/**
* Return all listeners
*/
getListeners(): Listener[]
/**
* Get the transport for a given multiaddr, if one has been configured
*/
transportForMultiaddr(ma: Multiaddr): Transport | undefined
/**
* Listen on the passed multiaddrs
*/
listen(addrs: Multiaddr[]): Promise<void>
/**
* Remove a previously configured transport
*/
remove(key: string): Promise<void>
/**
* Remove all transports
*/
removeAll(): Promise<void>
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc