1
0
Fork 0
mirror of synced 2025-09-23 12:18:44 +00:00
ZoKrates/zokrates_js/index-node.js
Darko Macesic f02e15dea1
Set webcrypto only if crypto instance is not available (#1338)
* set webcrypto only if not available

* update package-lock.json

* add changelog
2023-09-12 11:21:56 +02:00

7 lines
234 B
JavaScript

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