feat(modules): deepen trust, experimental, routing, and search
Hyper-P2P Module Tests / unit-all (push) Failing after 1h17m5s

Session revoke and encrypted-topic JSON helpers; silence/void channel
snapshots; relay tunnel route listing; grow-only set algebra; CPU top
donors; attestation chain slice/export; fulltext bulk and top terms.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-21 02:25:10 -04:00
co-authored by Cursor
parent ed7f0ab34f
commit cce695e34a
12 changed files with 239 additions and 1 deletions
@@ -40,6 +40,32 @@ class HyperP2PVoidChannel extends EventEmitter {
return [...new Set([...this._subs.keys(), ...this._voids.keys()])]
}
clearVoid (channel) {
return this._voids.delete(String(channel))
}
subscriberCount () {
return this._subs.size
}
mergeSnapshot (snapshot) {
if (!snapshot || !Array.isArray(snapshot.voids)) return 0
let n = 0
for (const msg of snapshot.voids) {
if (!msg || !msg.channel) continue
const cur = this._voids.get(msg.channel)
if (!cur || msg.at > cur.at) {
this._voids.set(msg.channel, { ...msg, voided: true })
n++
}
}
return n
}
toSnapshot () {
return { voids: [...this._voids.values()] }
}
subscribeVoid (channel, fn) {
assertNonEmpty(channel, 'channel')
if (typeof fn !== 'function') throw new Error('fn must be a function')