Enrich module APIs with snapshot and batch helpers across categories.
Adds snapshot(), domain batch methods, and clearAll aliases on consensus, core, encoding, experimental, indexes, messaging, network, oracle, pear, routing, storage, supercomputer, and trust modules. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -134,6 +134,18 @@ class HyperP2PMultisigThreshold extends EventEmitter {
|
||||
return n
|
||||
}
|
||||
|
||||
snapshot () {
|
||||
return {
|
||||
proposals: this.proposalIds().length,
|
||||
pending: this.pendingProposals().length
|
||||
}
|
||||
}
|
||||
|
||||
createProposalBatch (entries) {
|
||||
if (!Array.isArray(entries)) throw new Error('entries array required')
|
||||
return entries.map((e) => this.createProposal(e.id, e.signers, e.threshold))
|
||||
}
|
||||
|
||||
_gossip (data) {
|
||||
if (!this._peerMsgs) return
|
||||
gossipSend(this, data)
|
||||
|
||||
Reference in New Issue
Block a user