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.3.21 to 1.3.22

12

dist/src/pubsub/index.d.ts
import type { PeerId } from '../peer-id/index.js';
import type { Pushable } from 'it-pushable';
import type { EventEmitter, EventHandler, Startable } from '../index.js';
import type { EventEmitter, Startable } from '../index.js';
import type { Stream } from '../connection/index.js';

@@ -89,5 +89,6 @@ /**

export interface PubSubEvents {
'pubsub:subscription-change': CustomEvent<SubscriptionChangeData>;
'subscription-change': CustomEvent<SubscriptionChangeData>;
'message': CustomEvent<Message>;
}
export interface PubSub extends Startable {
export interface PubSub extends EventEmitter<PubSubEvents>, Startable {
globalSignaturePolicy: typeof StrictSign | typeof StrictNoSign;

@@ -100,6 +101,3 @@ multicodecs: string[];

getSubscribers: (topic: string) => PeerId[];
dispatchEvent: (event: CustomEvent<Uint8Array | Message>) => boolean;
addEventListener: ((type: string, callback: EventHandler<CustomEvent<Message>>, options?: AddEventListenerOptions | boolean) => void) & ((type: 'pubsub:subscription-change', callback: EventHandler<CustomEvent<SubscriptionChangeData>>, options?: AddEventListenerOptions | boolean) => void);
removeEventListener: ((type: string, callback?: EventHandler<CustomEvent<Message>> | undefined, options?: EventListenerOptions | boolean) => void) & ((type: 'pubsub:subscription-change', callback?: EventHandler<CustomEvent<Message>> | undefined, options?: EventListenerOptions | boolean) => void);
listenerCount: (type: string) => number;
publish: (topic: string, data: Uint8Array) => void;
}

@@ -106,0 +104,0 @@ export interface PeerStreamEvents {

{
"name": "@libp2p/interfaces",
"version": "1.3.21",
"version": "1.3.22",
"description": "Interfaces for JS Libp2p",

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

import type { PeerId } from '../peer-id/index.js'
import type { Pushable } from 'it-pushable'
import type { EventEmitter, EventHandler, Startable } from '../index.js'
import type { EventEmitter, Startable } from '../index.js'
import type { Stream } from '../connection/index.js'

@@ -106,6 +106,7 @@

export interface PubSubEvents {
'pubsub:subscription-change': CustomEvent<SubscriptionChangeData>
'subscription-change': CustomEvent<SubscriptionChangeData>
'message': CustomEvent<Message>
}
export interface PubSub extends Startable {
export interface PubSub extends EventEmitter<PubSubEvents>, Startable {
globalSignaturePolicy: typeof StrictSign | typeof StrictNoSign

@@ -119,7 +120,3 @@ multicodecs: string[]

getSubscribers: (topic: string) => PeerId[]
dispatchEvent: (event: CustomEvent<Uint8Array | Message>) => boolean
addEventListener: ((type: string, callback: EventHandler<CustomEvent<Message>>, options?: AddEventListenerOptions | boolean) => void) & ((type: 'pubsub:subscription-change', callback: EventHandler<CustomEvent<SubscriptionChangeData>>, options?: AddEventListenerOptions | boolean) => void)
removeEventListener: ((type: string, callback?: EventHandler<CustomEvent<Message>> | undefined, options?: EventListenerOptions | boolean) => void) & ((type: 'pubsub:subscription-change', callback?: EventHandler<CustomEvent<Message>> | undefined, options?: EventListenerOptions | boolean) => void)
listenerCount: (type: string) => number
publish: (topic: string, data: Uint8Array) => void
}

@@ -126,0 +123,0 @@

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