1
0
Fork 0
mirror of synced 2025-09-23 04:08:33 +00:00

Set webcrypto only if crypto instance is not available (#1338)

* set webcrypto only if not available

* update package-lock.json

* add changelog
This commit is contained in:
Darko Macesic 2023-09-12 11:21:56 +02:00 committed by GitHub
parent 89cc999a57
commit f02e15dea1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View file

@ -0,0 +1 @@
Set webcrypto only if crypto instance is not available (nodejs)

View file

@ -1,5 +1,7 @@
// https://docs.rs/getrandom/0.2.8/getrandom/index.html#nodejs-es-module-support
import { webcrypto } from "node:crypto";
globalThis.crypto = webcrypto;
if (typeof globalThis.crypto === "undefined") {
globalThis.crypto = webcrypto;
}
export * from "./index.js";

View file

@ -1,12 +1,12 @@
{
"name": "zokrates-js",
"version": "1.1.5",
"version": "1.1.8",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "zokrates-js",
"version": "1.1.5",
"version": "1.1.8",
"license": "GPLv3",
"dependencies": {
"pako": "^2.1.0"