Closed max64mode closed 1 month ago
Hi, thanks for reporting, this part of code has been removed from the latest version 0.4.0
, allowing you to add the global reference manually depending your setup. You'll have to add this before using the lib:
import { webcrypto } from 'node:crypto';
globalThis.crypto = webcrypto;
Hi! I'm trying to make a function for generating ALTCHA challenges on my Appwrite server, but while doing so I've found a bug in altcha-lib.
This bug prevents the altcha-lib library from working in NodeJS 16.0, as this condition is only triggered when crypto is not present in globalThis.
Trying to use altcha-lib in NodeJS 16.0 gives this error:
Would it be possible to change the syntax to ES module syntax (for compatibility reasons)? Thank you!