mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-09 00:28:51 +00:00
unsplit, backwards-compatibility, wasm relay and pool must be configured manually from the abstract classes.
This commit is contained in:
16
relay.ts
Normal file
16
relay.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { verifyEvent } from './pure.ts'
|
||||
import { AbstractRelay } from './abstract-relay.ts'
|
||||
|
||||
export class Relay extends AbstractRelay {
|
||||
constructor(url: string) {
|
||||
super(url, { verifyEvent })
|
||||
}
|
||||
|
||||
static async connect(url: string) {
|
||||
const relay = new Relay(url)
|
||||
await relay.connect()
|
||||
return relay
|
||||
}
|
||||
}
|
||||
|
||||
export * from './abstract-relay.ts'
|
||||
Reference in New Issue
Block a user