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.26 to 0.0.27

14

dist/init.js

@@ -40,5 +40,4 @@ // log provides a wrapper for console.log that prefixes 'libkernel'.

// bridge is working.
function handleBridgeTest() {
function handleBridgeResponse() {
if (bridgeExists !== false) {
log("bridge confirmed to be available");
bridgeExists = true;

@@ -55,3 +54,3 @@ bridgeAvailable.resolve();

// Check that we have a promise for the provided nonce.
if (!("nonce" in event.data) || !(event.data.nonce in queries)) {
if (!(event.data.nonce in queries)) {
logErr("nonce of kernelResponse not found\n", event, "\n", queries);

@@ -69,7 +68,5 @@ return;

if (event.data.resp !== null) {
console.log("resolving:", event.data);
result.resolve(event.data.resp);
}
else if (event.data.err !== null) {
console.log("rejecting:", event.data);
result.reject(event.data.err);

@@ -93,3 +90,3 @@ }

if (event.data.method === "bridgeTestResponse") {
handleBridgeTest();
handleBridgeResponse();
return;

@@ -114,5 +111,8 @@ }

window.addEventListener("message", handleMessage);
// Send a message
// Send a message checking if the bridge is alive and responding. We
// use a fake nonce because we don't care about the nonce for the
// bridge.
window.postMessage({
method: "bridgeTestQuery",
nonce: 0,
});

@@ -119,0 +119,0 @@ // After 2 seconds, check whether the bridge has responded. If not,

{
"name": "libkernel",
"version": "0.0.26",
"version": "0.0.27",
"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