From 3c5f460c72af4361a9820af8d16d9a406ce288e7 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 14 Jan 2026 20:52:01 +0000 Subject: [PATCH] fix: Use WebSocket URL for NIP-98 'u' tag per NIP-86 spec NIP-86 specifies "The `u` tag is the relay URL" which means the canonical WebSocket URL (wss://...), not the HTTP URL we're making the request to. --- src/lib/nip86-client.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/nip86-client.ts b/src/lib/nip86-client.ts index 31e291d..800cf0a 100644 --- a/src/lib/nip86-client.ts +++ b/src/lib/nip86-client.ts @@ -95,9 +95,10 @@ export class Nip86Client { async call(method: string, params: unknown[] = []): Promise { const body = JSON.stringify({ method, params }); + // NIP-86: "The `u` tag is the relay URL" - use WebSocket URL, not HTTP const authHeader = await createAuthHeader( { - url: this.httpUrl, + url: this.relayUrl, method: "POST", payload: body, },