New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.1.16 to 0.1.17

22

dist/queries.js
import { log, logErr } from "./log.js";
import { bufToB64, encodeU64 } from "libskynet";
// Create the queryMap singleton.
// Create the queryMap.
let queries = {};

@@ -43,4 +43,5 @@ // Define the nonce handling. nonceSeed is 16 random bytes that get generated

function handleMessage(event) {
// Ignore all messages that aren't from approved kernel sources. The
// two approved sources are skt.us and
// Ignore all messages that aren't from approved kernel sources. The two
// approved sources are skt.us and the browser extension bridge (which has
// an event.source equal to 'window')
if (event.source !== window && event.origin !== "https://skt.us") {

@@ -75,11 +76,10 @@ return;

if (initResolved === true) {
console.error("kernel sent an auth status message, but init is already finished");
console.log("kernel sent an auth status message, but init is already finished");
return;
}
initResolved = true;
if (event.data.data.userAuthorized) {
initResolved = true;
initResolve(null);
}
else {
initResolved = true;
initResolve("user is not logged in");

@@ -115,6 +115,5 @@ }

// If no update handler was provided, there is nothing to do.
if (typeof query.receiveUpdate !== "function") {
return;
if (typeof query.receiveUpdate === "function") {
query.receiveUpdate(event.data.data);
}
query.receiveUpdate(event.data.data);
return;

@@ -124,5 +123,4 @@ }

if (event.data.method === "responseNonce") {
let knr = queries[event.data.nonce].kernelNonceReceived;
if (typeof knr === "function") {
knr(event.data.data.nonce);
if (typeof query.kernelNonceReceived === "function") {
query.kernelNonceReceived(event.data.data.nonce);
}

@@ -129,0 +127,0 @@ return;

{
"name": "libkernel",
"version": "0.1.16",
"version": "0.1.17",
"description": "helper library to interact with skynet and 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