Expand pubsub, economy, routing-advanced, and platform categories.
Manual pass adds listChannels, totalSupply, openCount, listSessionIds, new api.md files, corrected trust/reactive/conflict getStats docs, and category README hubs for routing-advanced, measurement, pear-platform, and trust-security. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -54,6 +54,16 @@ class HyperP2PCreditLedger extends EventEmitter {
|
||||
return a ? a.balance : null
|
||||
}
|
||||
|
||||
listAccounts () { return [...this._accounts.keys()] }
|
||||
|
||||
hasAccount (accountId) { return this._accounts.has(accountId) }
|
||||
|
||||
totalSupply () {
|
||||
let sum = 0
|
||||
for (const acct of this._accounts.values()) sum += acct.balance
|
||||
return sum
|
||||
}
|
||||
|
||||
_apply (accountId, delta, kind, reason) {
|
||||
assertNonEmpty(accountId, 'accountId')
|
||||
const acct = this._accounts.get(accountId)
|
||||
|
||||
Reference in New Issue
Block a user