From c1172caf1d064d9c4fe3b3182e7f0361045fcc97 Mon Sep 17 00:00:00 2001 From: Asai Toshiya Date: Sat, 22 Feb 2025 00:26:30 +0900 Subject: [PATCH] mark getRelays and get_relays as deprecated. --- nip07.ts | 1 + nip46.ts | 2 +- nip55.ts | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/nip07.ts b/nip07.ts index aff6163..7b737aa 100644 --- a/nip07.ts +++ b/nip07.ts @@ -4,6 +4,7 @@ import { RelayRecord } from './relay.ts' export interface WindowNostr { getPublicKey(): Promise signEvent(event: EventTemplate): Promise + /** @deprecated removed from NIP */ getRelays(): Promise nip04?: { encrypt(pubkey: string, plaintext: string): Promise diff --git a/nip46.ts b/nip46.ts index f07a4a9..f887969 100644 --- a/nip46.ts +++ b/nip46.ts @@ -223,7 +223,7 @@ export class BunkerSigner { } /** - * Calls the "get_relays" method on the bunker. + * @deprecated removed from NIP */ async getRelays(): Promise { return JSON.parse(await this.sendRequest('get_relays', [])) diff --git a/nip55.ts b/nip55.ts index 10c57cb..ab67225 100644 --- a/nip55.ts +++ b/nip55.ts @@ -90,6 +90,9 @@ export function signEventUri({ eventJson, ...params }: EventUriParams): string { }) } +/** + * @deprecated removed from NIP + */ export function getRelaysUri(params: BaseParams & { id?: string; currentUser?: string }): string { return buildDefaultUri('get_relays', params) }