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

libkernel

Package Overview
Dependencies
Maintainers
1
Versions
127
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

libkernel - npm Package Compare versions

Comparing version 0.0.34 to 0.0.35

24

dist/init.js

@@ -39,3 +39,3 @@ // log provides a wrapper for console.log that prefixes 'libkernel'.

// the bridge is working.
function handleBridgeResponse(data, promise) {
function handleBridgeResponse(data) {
// Check whether the timeout for the bridge has already fired. If so,

@@ -50,6 +50,6 @@ // log that the bridge is available but late.

if (!("version" in data)) {
promise.resolve("bridge did not report a version");
bridgeAvailable.resolve("bridge did not report a version");
}
else {
promise.resolve(data.version);
bridgeAvailable.resolve(data.version);
}

@@ -87,9 +87,15 @@ }

}
// Check for a bridgeTestResponse.
if (event.data.method === "bridgeTestResponse") {
if (event.data.nonce === 0) {
handleBridgeResponse(event.data);
return;
}
else {
logErr("received bridgeTestResponse with incorrect nonce");
return;
}
}
let promise = queries[event.data.nonce];
delete queries[event.data.nonce];
// Pass the promise to the appropriate handler.
if (event.data.method === "bridgeTestResponse") {
handleBridgeResponse(event.data, promise);
return;
}
if (event.data.method === "kernelResponse") {

@@ -120,3 +126,3 @@ handleKernelResponse(event.data, promise);

});
queries[0] = blockForBridge;
queries[0] = bridgeAvailable;
// After 2 seconds, check whether the bridge has responded. If not,

@@ -123,0 +129,0 @@ // fail the bridge.

{
"name": "libkernel",
"version": "0.0.34",
"version": "0.0.35",
"description": "helper library to interact with the skynet kernel",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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