split relay and pool into pure and wasm modules.

This commit is contained in:
fiatjaf
2023-12-21 17:25:24 -03:00
parent 1f7378ca49
commit a4ae964ee6
11 changed files with 126 additions and 39 deletions

16
relay-wasm.ts Normal file
View 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'