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

@peerbit/pubsub-interface

Package Overview
Dependencies
Maintainers
0
Versions
150
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@peerbit/pubsub-interface - npm Package Compare versions

Comparing version 3.0.3 to 3.0.4-5901172

dist/src/index.d.ts

134

package.json
{
"name": "@peerbit/pubsub-interface",
"version": "3.0.3",
"description": "Block store streaming",
"type": "module",
"sideEffects": false,
"private": false,
"publishConfig": {
"access": "public"
},
"module": "lib/esm/index.js",
"types": "lib/esm/index.d.ts",
"exports": {
"import": "./lib/esm/index.js"
},
"scripts": {
"clean": "shx rm -rf lib/*",
"build": "yarn clean && tsc -p tsconfig.json",
"test": "node ../../../node_modules/.bin/jest test -c ../../../jest.config.ts --runInBand --forceExit",
"test:unit": "node ../../../node_modules/.bin/jest test -c ../../../jest.config.unit.ts --runInBand --forceExit",
"test:integration": "node ../node_modules/.bin/jest test -c ../../../jest.config.integration.ts --runInBand --forceExit"
},
"files": [
"lib",
"src",
"!src/**/__tests__",
"!lib/**/__tests__",
"!src/**/__benchmark__",
"!lib/**/__benchmark__",
"LICENSE"
],
"engines": {
"node": ">=16.15.1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/dao-xyz/peerbit.git"
},
"keywords": [
"peerbit"
],
"author": "dao.xyz",
"license": "MIT",
"bugs": {
"url": "https://github.com/dao-xyz/peerbit/issues"
},
"homepage": "https://github.com/dao-xyz/peerbit#readme",
"localMaintainers": [
"dao.xyz"
],
"dependencies": {
"@dao-xyz/borsh": "^5.2.1",
"@peerbit/crypto": "2.2.0",
"@peerbit/stream-interface": "^5.0.2"
},
"gitHead": "fcd486b9a5c3b7d94e2ae14f1b06ab2a0f7841ad"
"name": "@peerbit/pubsub-interface",
"version": "3.0.4-5901172",
"description": "Block store streaming",
"type": "module",
"types": "./dist/src/index.d.ts",
"typesVersions": {
"*": {
"*": [
"*",
"dist/*",
"dist/src/*",
"dist/src/*/index"
],
"src/*": [
"*",
"dist/*",
"dist/src/*",
"dist/src/*/index"
]
}
},
"files": [
"src",
"dist",
"!dist/e2e",
"!dist/test",
"!**/*.tsbuildinfo"
],
"exports": {
".": {
"types": "./dist/src/index.d.ts",
"import": "./dist/src/index.js"
}
},
"eslintConfig": {
"extends": "peerbit",
"parserOptions": {
"project": true,
"sourceType": "module"
},
"ignorePatterns": [
"!.aegir.js",
"test/ts-use",
"*.d.ts"
]
},
"publishConfig": {
"access": "public"
},
"scripts": {
"clean": "aegir clean",
"build": "aegir build --no-bundle",
"test": "",
"lint": "aegir lint"
},
"engines": {
"node": ">=16.15.1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/dao-xyz/peerbit.git"
},
"keywords": [
"peerbit"
],
"author": "dao.xyz",
"license": "MIT",
"bugs": {
"url": "https://github.com/dao-xyz/peerbit/issues"
},
"homepage": "https://github.com/dao-xyz/peerbit#readme",
"localMaintainers": [
"dao.xyz"
],
"dependencies": {
"@dao-xyz/borsh": "^5.2.3",
"@peerbit/crypto": "2.3.0-5901172",
"@peerbit/stream-interface": "5.0.3-5901172"
}
}

@@ -1,3 +0,3 @@

# Direct block
# Pubsub interface
Block swap/share protocol built on top of [Direct Stream](./../direct-stream/README.md)
Message specifications for the PubSub protocol

@@ -0,14 +1,14 @@

import { field, vec } from "@dao-xyz/borsh";
import { type EventHandler } from "@libp2p/interface";
import { PublicSignKey } from "@peerbit/crypto";
import { PubSubData } from "./messages.js";
import {
Message,
DataMessage,
WaitForPeer,
PeerEvents,
DeliveryMode,
PriorityOptions,
IdentificationOptions
type IdentificationOptions,
Message,
type PeerEvents,
type PriorityOptions,
type WaitForPeer,
} from "@peerbit/stream-interface";
import { EventHandler } from "@libp2p/interface";
import { field, vec } from "@dao-xyz/borsh";
import { PubSubData } from "./messages.js";

@@ -106,3 +106,3 @@ export class SubscriptionEvent {

listener: EventHandler<EventMap[K]> | null,
options?: boolean | AddEventListenerOptions
options?: boolean | AddEventListenerOptions,
): MaybePromise<void>;

@@ -112,3 +112,3 @@ removeEventListener<K extends keyof EventMap>(

listener?: EventHandler<EventMap[K]> | null,
options?: boolean | EventListenerOptions
options?: boolean | EventListenerOptions,
): MaybePromise<void>;

@@ -143,3 +143,3 @@ dispatchEvent(event: Event): MaybePromise<boolean>;

data?: Uint8Array;
}
},
): MaybePromise<boolean>;

@@ -146,0 +146,0 @@

@@ -0,3 +1,3 @@

import { deserialize, field, serialize, variant, vec } from "@dao-xyz/borsh";
import { Uint8ArrayList } from "uint8arraylist";
import { field, vec, variant, serialize, deserialize } from "@dao-xyz/borsh";

@@ -51,3 +51,3 @@ export abstract class PubSubMessage {

private _serialized: Uint8ArrayList;
private _serialized!: Uint8ArrayList;

@@ -64,3 +64,3 @@ bytes() {

bytes instanceof Uint8Array ? bytes : bytes.subarray(),
PubSubData
PubSubData,
);

@@ -88,3 +88,3 @@ if (bytes instanceof Uint8ArrayList) {

private _serialized: Uint8ArrayList;
private _serialized!: Uint8ArrayList;

@@ -100,3 +100,3 @@ bytes() {

bytes instanceof Uint8Array ? bytes : bytes.subarray(),
Subscribe
Subscribe,
);

@@ -120,3 +120,3 @@ if (bytes instanceof Uint8ArrayList) {

private _serialized: Uint8ArrayList;
private _serialized!: Uint8ArrayList;

@@ -133,3 +133,3 @@ bytes() {

bytes instanceof Uint8Array ? bytes : bytes.subarray(),
Unsubscribe
Unsubscribe,
);

@@ -155,3 +155,3 @@ if (bytes instanceof Uint8ArrayList) {

_serialized: Uint8ArrayList;
_serialized!: Uint8ArrayList;

@@ -168,3 +168,3 @@ bytes() {

bytes instanceof Uint8Array ? bytes : bytes.subarray(),
GetSubscribers
GetSubscribers,
);

@@ -171,0 +171,0 @@ if (bytes instanceof Uint8ArrayList) {

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