Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@libp2p/interfaces

Package Overview
Dependencies
Maintainers
4
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@libp2p/interfaces - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

12

dist/src/stream-muxer/index.d.ts

@@ -9,3 +9,3 @@ import type { Duplex } from 'it-stream-types';

*/
export interface Muxer {
export interface Muxer extends Duplex<Uint8Array> {
readonly streams: MuxedStream[];

@@ -17,13 +17,11 @@ /**

newStream: (name?: string) => MuxedStream;
}
export interface MuxerOptions {
/**
* A function called when receiving a new stream from the remote.
*/
onStream: (stream: MuxedStream) => void;
onStream?: (stream: MuxedStream) => void;
/**
* A function called when a stream ends.
*/
onStreamEnd: (stream: MuxedStream) => void;
}
export interface MuxerOptions {
onStream?: (stream: MuxedStream) => void;
onStreamEnd?: (stream: MuxedStream) => void;

@@ -38,3 +36,3 @@ maxMsgSize?: number;

close: () => void;
abort: () => void;
abort: (err?: Error) => void;
reset: () => void;

@@ -41,0 +39,0 @@ timeline: MuxedTimeline;

{
"name": "@libp2p/interfaces",
"version": "1.1.0",
"version": "1.1.1",
"description": "Interfaces for JS Libp2p",

@@ -5,0 +5,0 @@ "license": "Apache-2.0 OR MIT",

@@ -11,3 +11,3 @@ import type { Duplex } from 'it-stream-types'

*/
export interface Muxer {
export interface Muxer extends Duplex<Uint8Array> {
readonly streams: MuxedStream[]

@@ -19,7 +19,9 @@ /**

newStream: (name?: string) => MuxedStream
}
export interface MuxerOptions {
/**
* A function called when receiving a new stream from the remote.
*/
onStream: (stream: MuxedStream) => void
onStream?: (stream: MuxedStream) => void

@@ -29,7 +31,2 @@ /**

*/
onStreamEnd: (stream: MuxedStream) => void
}
export interface MuxerOptions {
onStream?: (stream: MuxedStream) => void
onStreamEnd?: (stream: MuxedStream) => void

@@ -46,3 +43,3 @@ maxMsgSize?: number

close: () => void
abort: () => void
abort: (err?: Error) => void
reset: () => void

@@ -49,0 +46,0 @@ timeline: MuxedTimeline

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