From 65a13fefa401e0f912a08571668a6117f7bec986 Mon Sep 17 00:00:00 2001 From: Bas van den Aakster Date: Fri, 5 Dec 2025 19:19:47 +0100 Subject: [PATCH] fix: use async ed25519.verifyAsync function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Switch from sync verify() to async verifyAsync() to work with hashes.sha512Async which uses WebCrypto API. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- package.json | 2 +- src/crypto.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 4987aca..0be91ba 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@xtr-dev/rondevu-server", - "version": "0.2.2", + "version": "0.2.3", "description": "DNS-like WebRTC signaling server with username claiming and service discovery", "main": "dist/index.js", "scripts": { diff --git a/src/crypto.ts b/src/crypto.ts index afe0d15..ed77a42 100644 --- a/src/crypto.ts +++ b/src/crypto.ts @@ -267,8 +267,8 @@ export async function verifyEd25519Signature( const encoder = new TextEncoder(); const messageBytes = encoder.encode(message); - // Verify signature using @noble/ed25519 - const isValid = await ed25519.verify(signatureBytes, messageBytes, publicKeyBytes); + // Verify signature using @noble/ed25519 (async version) + const isValid = await ed25519.verifyAsync(signatureBytes, messageBytes, publicKeyBytes); return isValid; } catch (err) { console.error('Ed25519 signature verification failed:', err);