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

@peerbit/program

Package Overview
Dependencies
Maintainers
0
Versions
174
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@peerbit/program - npm Package Compare versions

Comparing version 5.1.1 to 5.1.2-03f5b18

9

dist/src/program.js

@@ -267,10 +267,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

async waitFor(other, options) {
const ids = Array.isArray(other) ? other : [other];
const expectedHashes = new Set(ids.map((x) => typeof x === "string"
const expectedHashes = new Set((Array.isArray(other) ? other : [other])
.map((x) => typeof x === "string"
? x
: x instanceof PublicSignKey
? x.hashcode()
: getPublicKeyFromPeerId(x).hashcode()));
: getPublicKeyFromPeerId(x).hashcode())
.filter((x) => x !== this.node.identity.publicKey.hashcode()));
// make sure nodes are reachable
await Promise.all(ids.map((x) => this.node.services.pubsub.waitFor(x, { signal: options?.signal })));
await Promise.all([...expectedHashes].map((x) => this.node.services.pubsub.waitFor(x, { signal: options?.signal })));
// wait for subscribing to topics

@@ -277,0 +278,0 @@ return new Promise((resolve, reject) => {

{
"name": "@peerbit/program",
"version": "5.1.1",
"description": "Program interface",
"sideEffects": false,
"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": "aegir test",
"lint": "aegir lint"
},
"author": "dao.xyz",
"license": "MIT",
"dependencies": {
"@dao-xyz/borsh": "^5.2.3",
"@peerbit/crypto": "2.3.3",
"@peerbit/keychain": "^1.0.21",
"@peerbit/blocks-interface": "^1.3.9",
"@peerbit/pubsub-interface": "^3.1.2",
"@peerbit/any-store-interface": "^1.0.0"
}
"name": "@peerbit/program",
"version": "5.1.2-03f5b18",
"description": "Program interface",
"sideEffects": false,
"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": "aegir test",
"lint": "aegir lint"
},
"author": "dao.xyz",
"license": "MIT",
"dependencies": {
"@dao-xyz/borsh": "^5.2.3",
"@peerbit/crypto": "2.3.3-03f5b18",
"@peerbit/keychain": "1.0.21-03f5b18",
"@peerbit/blocks-interface": "1.3.9-03f5b18",
"@peerbit/pubsub-interface": "3.1.2-03f5b18",
"@peerbit/any-store-interface": "1.0.0-03f5b18"
}
}

@@ -381,11 +381,12 @@ import { type Constructor, getSchema, variant } from "@dao-xyz/borsh";

): Promise<void> {
const ids = Array.isArray(other) ? other : [other];
const expectedHashes = new Set(
ids.map((x) =>
typeof x === "string"
? x
: x instanceof PublicSignKey
? x.hashcode()
: getPublicKeyFromPeerId(x).hashcode(),
),
(Array.isArray(other) ? other : [other])
.map((x) =>
typeof x === "string"
? x
: x instanceof PublicSignKey
? x.hashcode()
: getPublicKeyFromPeerId(x).hashcode(),
)
.filter((x) => x !== this.node.identity.publicKey.hashcode()),
);

@@ -395,3 +396,3 @@

await Promise.all(
ids.map((x) =>
[...expectedHashes].map((x) =>
this.node.services.pubsub.waitFor(x, { signal: options?.signal }),

@@ -398,0 +399,0 @@ ),

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