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

View File

@@ -1,10 +1,10 @@
import { test, expect } from 'bun:test'
import { makeAuthEvent } from './nip42.ts'
import { relayConnect } from './relay.ts'
import Relay from './relay-pure.ts'
test('auth flow', async () => {
const relay = await relayConnect('wss://nostr.wine')
const relay = await Relay.connect('wss://nostr.wine')
const auth = makeAuthEvent(relay.url, 'chachacha')
expect(auth.tags).toHaveLength(2)