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:
parent
89cc999a57
commit
f02e15dea1
3 changed files with 6 additions and 3 deletions
1
changelogs/unreleased/1338-dark64
Normal file
1
changelogs/unreleased/1338-dark64
Normal file
|
@ -0,0 +1 @@
|
|||
Set webcrypto only if crypto instance is not available (nodejs)
|
|
@ -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";
|
||||
|
|
4
zokrates_js/package-lock.json
generated
4
zokrates_js/package-lock.json
generated
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue