Network hub shadow mode (Marty 2026-11-13): hubreport.js reports every on-chain member to the hub as a contract bind by wallet (one way; unknown wallets kept and re-asked every 6 h), visible in /api/admin/status; off unless HUB_ENABLED
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -186,6 +186,7 @@ function spots() { return [...d().spots.values()].sort((a, b) => b.id - a.id); }
|
||||
function spot(id) { return d().spots.get(Number(id)) || null; }
|
||||
function spotsOf(addr) { const a = String(addr).toLowerCase(); return spots().filter(s => s.owner === a); }
|
||||
function member(addr) { return d().members.get(String(addr).toLowerCase()) || null; }
|
||||
function allMembers() { return [...d().members.values()]; }
|
||||
function isMember(addr) { const a = String(addr || '').toLowerCase(); if (a === String(cfgMod.get().contract).toLowerCase()) return false; return d().members.has(a) || spots().some(s => s.owner === a && s.kind !== 3); }
|
||||
function directs(addr) { const a = String(addr).toLowerCase(); return [...d().members.values()].filter(m => m.sponsor === a); }
|
||||
function walletTotals(addr) { const w = d().wallets.get(String(addr).toLowerCase()); return w ? { inWei: w.inWei.toString(), outWei: w.outWei.toString(), byRole: w.byRole, payouts: w.payouts } : { inWei: '0', outWei: '0', byRole: {}, payouts: 0 }; }
|
||||
@@ -218,4 +219,4 @@ function init(opts) {
|
||||
}
|
||||
|
||||
module.exports = { init, tail, rpc, read, tryRead, quote, decodeLog, receipt, suggestedFees, spots, spot, spotsOf, member, isMember,
|
||||
directs, walletTotals, paidOf, fundBuys, totals, status, recent, ZERO };
|
||||
allMembers, directs, walletTotals, paidOf, fundBuys, totals, status, recent, ZERO };
|
||||
|
||||
Reference in New Issue
Block a user