mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-15 19:38:51 +00:00
split relay and pool into pure and wasm modules.
This commit is contained in:
16
relay-wasm.ts
Normal file
16
relay-wasm.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { verifyEvent } from './wasm.ts'
|
||||
import TrustedRelay from './trusted-relay.ts'
|
||||
|
||||
export default class WasmRelay extends TrustedRelay {
|
||||
constructor(url: string) {
|
||||
super(url, { verifyEvent })
|
||||
}
|
||||
|
||||
static async connect(url: string) {
|
||||
const relay = new WasmRelay(url)
|
||||
await relay.connect()
|
||||
return relay
|
||||
}
|
||||
}
|
||||
|
||||
export * from './trusted-relay.ts'
|
||||
Reference in New Issue
Block a user