Expand category docs and module APIs across the library.
Manual pass adds helpers (listChannels, taskCounts, openProposals), richer getStats with protocol fields, category README hubs, and tightened api.md for core, messaging, network, routing, supercomputer, and consensus modules. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -60,6 +60,10 @@ class HyperP2PSessionBridge extends EventEmitter {
|
||||
return this._tokens.get(token) || null
|
||||
}
|
||||
|
||||
listPairs () { return [...this._tokens.keys()] }
|
||||
|
||||
pairCount () { return this._tokens.size }
|
||||
|
||||
async ready () {
|
||||
if (this.swarm || !this.topic) return this
|
||||
await initModuleSwarm(this, {
|
||||
@@ -75,7 +79,7 @@ class HyperP2PSessionBridge extends EventEmitter {
|
||||
|
||||
|
||||
getStats () {
|
||||
return { ...this._stats }
|
||||
return { ...this._stats, pairs: this._tokens.size, protocol: PROTOCOL }
|
||||
}
|
||||
|
||||
async close () {
|
||||
|
||||
Reference in New Issue
Block a user