Comparing version 0.7.1 to 0.7.2
{ | ||
"name": "snarkjs", | ||
"type": "module", | ||
"version": "0.7.1", | ||
"version": "0.7.2", | ||
"description": "zkSNARKs implementation in JavaScript", | ||
@@ -9,4 +9,10 @@ "main": "./build/main.cjs", | ||
"exports": { | ||
"import": "./main.js", | ||
"require": "./build/main.cjs" | ||
".": { | ||
"node": { | ||
"import": "./main.js", | ||
"require": "./build/main.cjs" | ||
}, | ||
"browser": "./build/browser.esm.js", | ||
"umd": "./build/snarkjs.min.js" | ||
} | ||
}, | ||
@@ -25,6 +31,8 @@ "files": [ | ||
"testv12": "mocha test/fflonk.test.js test/fullprocess.js test/keypar_test.js test/polynomial.test.js", | ||
"build": "rollup -c config/rollup.cjs.config.js", | ||
"build": "npm run buildcjs && npm run buildcli && npm run buildiife && npm run buildiifemin && npm run buildesm", | ||
"buildcjs": "rollup -c config/rollup.cjs.config.js", | ||
"buildcli": "rollup -c config/rollup.cli.config.js", | ||
"buildiife": "BROWSER=true rollup -c config/rollup.iife.config.js", | ||
"buildiifemin": "BROWSER=true rollup -c config/rollup.iife_min.config.js" | ||
"buildiifemin": "BROWSER=true rollup -c config/rollup.iife_min.config.js", | ||
"buildesm": "BROWSER=true rollup -c config/rollup.browser.esm.config" | ||
}, | ||
@@ -59,3 +67,3 @@ "bin": { | ||
"fastfile": "0.0.20", | ||
"ffjavascript": "0.2.60", | ||
"ffjavascript": "0.2.62", | ||
"js-sha3": "^0.8.0", | ||
@@ -62,0 +70,0 @@ "logplease": "^1.2.15", |
@@ -119,3 +119,3 @@ /* | ||
let array = new Uint8Array(n); | ||
if (typeof globalThis.crypto !== "undefined") { // Supported | ||
if (process.browser) { // Supported | ||
globalThis.crypto.getRandomValues(array); | ||
@@ -129,3 +129,3 @@ } else { // NodeJS | ||
export async function sha256digest(data) { | ||
if (typeof globalThis.crypto !== "undefined" && typeof globalThis.crypto.subtle !== "undefined") { // Supported | ||
if (process.browser) { // Supported | ||
const buffer = await globalThis.crypto.subtle.digest("SHA-256", data.buffer); | ||
@@ -225,2 +225,2 @@ return new Uint8Array(buffer); | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9906419
87
49035
6
2
+ Addedffjavascript@0.2.62(transitive)
Updatedffjavascript@0.2.62