From 4ce52171354eb1e478adacb4ef4af0fbec281496 Mon Sep 17 00:00:00 2001 From: Bas van den Aakster Date: Fri, 12 Dec 2025 20:26:48 +0100 Subject: [PATCH] Fix: Remove redundant signature generation in publishService MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The rondevu.ts wrapper was generating its own message and signature which were being ignored by the API layer (which generates its own). This caused the old signature to be passed but not used. Simplified by removing the redundant code and letting the API layer handle all authentication. 🤖 Generated with Claude Code https://claude.com/claude-code Co-Authored-By: Claude Sonnet 4.5 --- src/rondevu.ts | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/src/rondevu.ts b/src/rondevu.ts index 601ce54..1a5dabf 100644 --- a/src/rondevu.ts +++ b/src/rondevu.ts @@ -176,21 +176,15 @@ export class Rondevu { const { serviceFqn, offers, ttl } = options - // Generate signature for service publication - const message = `publish:${this.username}:${serviceFqn}:${Date.now()}` - const signature = await RondevuAPI.signMessage(message, this.keypair.privateKey) - - // Create service request - const serviceRequest: ServiceRequest = { - serviceFqn, // Must include @username - offers, - signature, - message, - ttl, - } - // Publish to server (server will auto-claim username if needed) - const result = await this.getAPI().publishService(serviceRequest) + // Note: signature and message are generated by the API layer + const result = await this.getAPI().publishService({ + serviceFqn, + offers, + ttl, + signature: '', // Not used, generated by API layer + message: '', // Not used, generated by API layer + }) // Mark username as claimed after successful publish this.usernameClaimed = true