mirror of
https://github.com/xtr-dev/rondevu-client.git
synced 2025-12-13 04:13:25 +00:00
Fix: Remove redundant signature generation in publishService
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 <noreply@anthropic.com>
This commit is contained in:
@@ -176,21 +176,15 @@ export class Rondevu {
|
|||||||
|
|
||||||
const { serviceFqn, offers, ttl } = options
|
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)
|
// 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
|
// Mark username as claimed after successful publish
|
||||||
this.usernameClaimed = true
|
this.usernameClaimed = true
|
||||||
|
|||||||
Reference in New Issue
Block a user