feat(encoding,oracles,time-ordering): expand wire registry and singleton categories

- wire-registry: builtins, encodeBatch, snapshot, unregisterCodec
- decentralized-oracle: listFeeds, feedStats, setQuorum
- temporal-index: queryBucket, bucketsForRange
- Add category README hubs for oracles and time-ordering
- Add _shared/gossip-base.js envelope helpers

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-21 02:14:41 -04:00
co-authored by Cursor
parent 713a450f2f
commit f62eaaac13
6 changed files with 138 additions and 18 deletions
@@ -349,7 +349,31 @@ class HyperP2PTemporalIndex extends EventEmitter {
}
eventCount () { return this.events.size }
eventCount () {
return this.events.size
}
queryBucket (bucket, limit = 100) {
const set = this.timeIndex.get(bucket)
if (!set) return []
const out = []
for (const id of set) {
const ev = this.events.get(id)
if (ev) out.push(ev)
if (out.length >= limit) break
}
return out.sort((a, b) => a.timestamp - b.timestamp)
}
bucketsForRange (startTime, endTime) {
const buckets = new Set()
let t = startTime
while (t <= endTime) {
buckets.add(this._getTimeBucket(t, 'hour'))
t += 3600000
}
return [...buckets]
}
getStats () {
return {