mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-06-06 02:31:13 +02:00
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.
This commit is contained in:
@@ -95,9 +95,10 @@ export class Nip86Client {
|
||||
async call<T>(method: string, params: unknown[] = []): Promise<T> {
|
||||
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,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user