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

@guildofweavers/genstark

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@guildofweavers/genstark - npm Package Compare versions

Comparing version 0.7.4 to 0.7.5

3

lib/Stark.js

@@ -32,3 +32,4 @@ "use strict";

// instantiate Hash object
this.hash = merkle_1.createHash(sOptions.hashAlgorithm, this.air.field.isOptimized);
const useWasm = (wasmOptions !== undefined) || this.air.field.isOptimized;
this.hash = merkle_1.createHash(sOptions.hashAlgorithm, useWasm);
if (!this.hash.isOptimized) {

@@ -35,0 +36,0 @@ console.warn(`WARNING: WebAssembly optimization is not available for ${sOptions.hashAlgorithm} hash algorithm`);

@@ -6,3 +6,3 @@ "use strict";

// ================================================================================================
const MASK_64B = 0xffffffffffffffffn;
const MASK_32B = 0xffffffffn;
// MERKLE PROOFS

@@ -106,7 +106,6 @@ // ================================================================================================

function readBigInt(buffer, offset, elementSize) {
const limbCount = elementSize >> 3;
const limbCount = elementSize >> 2;
let value = 0n;
for (let i = 0n; i < limbCount; i++) {
value = (buffer.readBigUInt64LE(offset) << (64n * i)) | value;
offset += 8;
for (let i = 0n; i < limbCount; i++, offset += 4) {
value = (BigInt(buffer.readUInt32LE(offset)) << (32n * i)) | value;
}

@@ -117,7 +116,6 @@ return value;

function writeBigInt(value, buffer, offset, elementSize) {
const limbCount = elementSize >> 3;
for (let i = 0; i < limbCount; i++) {
buffer.writeBigUInt64LE(value & MASK_64B, offset);
value = value >> 64n;
offset += 8;
const limbCount = elementSize >> 2;
for (let i = 0; i < limbCount; i++, offset += 4) {
buffer.writeUInt32LE(Number(value & MASK_32B), offset);
value = value >> 32n;
}

@@ -124,0 +122,0 @@ return offset;

{
"name": "@guildofweavers/genstark",
"version": "0.7.4",
"version": "0.7.5",
"description": "zk-STARK generation library",

@@ -5,0 +5,0 @@ "main": "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