Migrate collections to new stores, change some conventions

This commit is contained in:
Jon Staab
2025-11-19 16:47:17 -08:00
parent d197acc41e
commit 6d36f5a912
29 changed files with 354 additions and 414 deletions
+2 -2
View File
@@ -2,13 +2,13 @@ import type {Filter} from "@welshman/util"
import {isSignedEvent, SignedEvent} from "@welshman/util"
import {push as basePush, pull as basePull, publishOne, requestOne} from "@welshman/net"
import {repository} from "./core.js"
import {relaysByUrl} from "./relays.js"
import {getRelay} from "./relays.js"
const query = (filters: Filter[]) =>
repository.query(filters, {shouldSort: filters.every(f => f.limit === undefined)})
export const hasNegentropy = (url: string) => {
const relay = relaysByUrl.get().get(url)
const relay = getRelay(url)
if (relay?.negentropy) return true
if (relay?.supported_nips?.includes?.(77)) return true