mark getRelays and get_relays as deprecated.

This commit is contained in:
Asai Toshiya 2025-02-22 00:26:30 +09:00 committed by fiatjaf_
parent 86f37d6003
commit c1172caf1d
3 changed files with 5 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import { RelayRecord } from './relay.ts'
export interface WindowNostr {
getPublicKey(): Promise<string>
signEvent(event: EventTemplate): Promise<NostrEvent>
/** @deprecated removed from NIP */
getRelays(): Promise<RelayRecord>
nip04?: {
encrypt(pubkey: string, plaintext: string): Promise<string>

View File

@ -223,7 +223,7 @@ export class BunkerSigner {
}
/**
* Calls the "get_relays" method on the bunker.
* @deprecated removed from NIP
*/
async getRelays(): Promise<RelayRecord> {
return JSON.parse(await this.sendRequest('get_relays', []))

View File

@ -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)
}