mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-09 00:28:51 +00:00
bring back relayConnect() as deprecated.
This commit is contained in:
7
relay.ts
7
relay.ts
@@ -1,6 +1,13 @@
|
|||||||
import { verifyEvent } from './pure.ts'
|
import { verifyEvent } from './pure.ts'
|
||||||
import { AbstractRelay } from './abstract-relay.ts'
|
import { AbstractRelay } from './abstract-relay.ts'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated use Relay.connect() instead.
|
||||||
|
*/
|
||||||
|
export function relayConnect(url: string): Promise<Relay> {
|
||||||
|
return Relay.connect(url)
|
||||||
|
}
|
||||||
|
|
||||||
export class Relay extends AbstractRelay {
|
export class Relay extends AbstractRelay {
|
||||||
constructor(url: string) {
|
constructor(url: string) {
|
||||||
super(url, { verifyEvent })
|
super(url, { verifyEvent })
|
||||||
|
|||||||
Reference in New Issue
Block a user