summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPawel Zelawski <pawel@pzelawski.com>2026-05-23 10:07:34 +0200
committerPawel Zelawski <pawel@pzelawski.com>2026-05-23 10:07:34 +0200
commit63805760ab36357bbd8d67aa3c510e894785335f (patch)
tree9e1ceb7ecef3df9d85b42291875c2cddb668dff2 /src
parent3f3521cf5dad43dc537e6a56e469ccf73ae41927 (diff)
chore!: upgrade deps/tooling, fix postcss vulnerability, and require Node >=20.19.0HEADv3.0.0main
Diffstat (limited to 'src')
-rw-r--r--src/digiid.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/digiid.ts b/src/digiid.ts
index d413697..95bc620 100644
--- a/src/digiid.ts
+++ b/src/digiid.ts
@@ -1,6 +1,6 @@
import { secp256k1 } from '@noble/curves/secp256k1.js';
-import { ripemd160 } from '@noble/hashes/ripemd160';
-import { sha256 } from '@noble/hashes/sha256';
+import { ripemd160 } from '@noble/hashes/legacy.js';
+import { sha256 } from '@noble/hashes/sha2.js';
import { randomBytes } from 'crypto';
import {
DigiIDCallbackData,
@@ -197,7 +197,7 @@ function recoverPublicKey(messageHash: Uint8Array, signature: Uint8Array): Uint8
// Add compressed first (more common for SegWit)
results.push(compressedBytes);
results.push(uncompressedBytes);
- } catch (e) {
+ } catch {
// This recovery ID didn't work, try the next one
continue;
}
@@ -295,7 +295,7 @@ export async function _internalVerifySignature(
try {
// Decode base64 signature
- const sigBytes = Uint8Array.from(atob(signature), c => c.charCodeAt(0));
+ const sigBytes = Uint8Array.from(globalThis.atob(signature), c => c.charCodeAt(0));
if (sigBytes.length !== 65) {
throw new Error('Invalid signature length');