Add toJSON() serialization helpers across all module categories on main.
Fourth pass: toJSON() delegates to snapshot() (or exportSnapshot/stateSnapshot) for JSON export and logging across agents, applications, consensus, core, encoding, experimental, indexes, media, messaging, network, observability, pear-platform, routing, scheduling, storage, supercomputer, trust, measurement, oracles, and time-ordering modules. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -135,6 +135,10 @@ class HyperP2PBandwidthShare extends EventEmitter {
|
||||
return { offers: this._offers.size }
|
||||
}
|
||||
|
||||
toJSON () {
|
||||
return this.snapshot()
|
||||
}
|
||||
|
||||
async ready () {
|
||||
if (this.swarm || !this.topic) return this
|
||||
await initModuleSwarm(this, {
|
||||
|
||||
Reference in New Issue
Block a user