fix: use async ed25519.verifyAsync function

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 <noreply@anthropic.com>
This commit is contained in:
2025-12-05 19:19:47 +01:00
parent 1dadf5461e
commit 65a13fefa4
2 changed files with 3 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "@xtr-dev/rondevu-server", "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", "description": "DNS-like WebRTC signaling server with username claiming and service discovery",
"main": "dist/index.js", "main": "dist/index.js",
"scripts": { "scripts": {

View File

@@ -267,8 +267,8 @@ export async function verifyEd25519Signature(
const encoder = new TextEncoder(); const encoder = new TextEncoder();
const messageBytes = encoder.encode(message); const messageBytes = encoder.encode(message);
// Verify signature using @noble/ed25519 // Verify signature using @noble/ed25519 (async version)
const isValid = await ed25519.verify(signatureBytes, messageBytes, publicKeyBytes); const isValid = await ed25519.verifyAsync(signatureBytes, messageBytes, publicKeyBytes);
return isValid; return isValid;
} catch (err) { } catch (err) {
console.error('Ed25519 signature verification failed:', err); console.error('Ed25519 signature verification failed:', err);