SC CODE: Function InitializePrivate() Uint64
10 IF init() == 0 THEN GOTO 30
20 RETURN 1
30 STORE("nameHdr", "network-analytics.js")
31 STORE("descrHdr", "Advanced network analytics renderer")
32 STORE("iconURLHdr", "")
33 STORE("dURL", "explorer.tela")
34 STORE("docType", "TELA-JS-1")
35 STORE("subDir", "")
36 STORE("fileCheckC", "133aaf46f9e70007d7ca4764f635f44576a95b40d9efca1995284ee89ac915b")
37 STORE("fileCheckS", "28e7e8b40a82773b582f9609f2e3df44dfc74b66a29e57e71a24de5b252ede17")
100 RETURN 0
End Function
Function init() Uint64
10 IF EXISTS("owner") == 0 THEN GOTO 30
20 RETURN 1
30 STORE("owner", address())
50 STORE("docVersion", "1.0.0")
60 STORE("hash", HEX(TXID()))
70 STORE("likes", 0)
80 STORE("dislikes", 0)
100 RETURN 0
End Function
Function address() String
10 DIM s as String
20 LET s = SIGNER()
30 IF IS_ADDRESS_VALID(s) THEN GOTO 50
40 RETURN "anon"
50 RETURN ADDRESS_STRING(s)
End Function
Function Rate(r Uint64) Uint64
10 DIM addr as String
15 LET addr = address()
16 IF r < 100 && EXISTS(addr) == 0 && addr != "anon" THEN GOTO 30
20 RETURN 1
30 STORE(addr, ""+r+"_"+BLOCK_HEIGHT())
40 IF r < 50 THEN GOTO 70
50 STORE("likes", LOAD("likes")+1)
60 RETURN 0
70 STORE("dislikes", LOAD("dislikes")+1)
100 RETURN 0
End Function
/*
({
name:'network-analytics',version:'1.0.0',
cs:'background:rgba(0,0,0,0.2);border:1px solid rgba(185,89,182,0.3);border-radius:16px;padding:1.5rem;transition:all 0.2s ease',
hdr:'display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem',
lbl:'color:#b3b3b3;font-size:0.8rem;margin-bottom:0.25rem;text-transform:uppercase;letter-spacing:0.5px',
val:'font-size:1.3rem;font-weight:700',
mb:'margin-bottom:0.75rem',
renderMiningProduction(d){const c=d.miningStatus==='Active'?'#4ade80':'#fbbf24';return`<div class="enhanced-stat-card" style="${this.cs}"><div style="${this.hdr}"><h4 style="color:#b959b6;margin:0;font-size:1.2rem;font-weight:600">Mining Production</h4><div style="width:8px;height:8px;background:#b959b6;border-radius:50%;box-shadow:0 0 8px rgba(185,89,182,0.4)"></div></div><div style="${this.mb}"><div style="${this.lbl}">Expected Daily</div><div style="color:#b959b6;${this.val}">${d.expectedDaily.toLocaleString()} blocks</div></div><div style="${this.mb}"><div style="${this.lbl}">Block Reward</div><div style="color:#fbbf24;font-size:1.1rem;font-weight:600">~${d.blockReward.toFixed(3)} DERO + fees</div></div><div style="${this.mb}"><div style="${this.lbl}">Daily Emission</div><div style="color:#52c8db;font-size:1.1rem;font-weight:600">~${d.dailyEmission.toFixed(0)} DERO</div></div><div><div style="${this.lbl}">Mining Status</div><div style="color:${c};font-size:1.1rem;font-weight:600">${d.miningStatus}</div></div></div>`},
renderMiningEfficiency(d){const c=d.syncStatus==='OK'?'#4ade80':'#fbbf24';return`<div class="enhanced-stat-card" style="${this.cs.replace('185,89,182','82,200,219')}"><div style="${this.hdr}"><h4 style="color:#52c8db;margin:0;font-size:1.2rem;font-weight:600">Mining Efficiency</h4><div style="width:8px;height:8px;background:#52c8db;border-radius:50%;box-shadow:0 0 8px rgba(82,200,219,0.4)"></div></div><div style="${this.mb}"><div style="${this.lbl}">Algorithm</div><div style="color:#4ade80;${this.val}">${d.algorithm}</div></div><div style="${this.mb}"><div style="${this.lbl}">Block Size</div><div style="color:#52c8db;font-size:1.1rem;font-weight:600">${d.avgBlockSize.toFixed(1)} KB avg</div></div><div style="${this.mb}"><div style="${this.lbl}">Network Type</div><div style="color:#4ade80;font-size:1.1rem;font-weight:600">${d.networkType}</div></div><div><div style="${this.lbl}">Sync Status</div><div style="color:${c};font-size:1.1rem;font-weight:600">${d.syncStatus}</div></div></div>`},
renderMiniblocksActivity(){const m=0,o=0,r=(o/(m||1)*100).toFixed(1),mb=0.0;return`<div class="enhanced-stat-card" style="${this.cs.replace('185,89,182','74,222,128')}"><div style="${this.hdr}"><h4 style="color:#4ade80;margin:0;font-size:1.2rem;font-weight:600">Miniblock Activity</h4><div style="width:8px;height:8px;background:#4ade80;border-radius:50%;box-shadow:0 0 8px rgba(74,222,128,0.4)"></div></div><div style="${this.mb}"><div style="${this.lbl}">10min Miniblocks</div><div style="color:#b959b6;${this.val}">${m}</div></div><div style="${this.mb}"><div style="${this.lbl}">10min Orphans</div><div style="color:#fbbf24;font-size:1.1rem;font-weight:600">${o}</div></div><div style="${this.mb}"><div style="${this.lbl}">Orphan Rate</div><div style="color:${r<1?'#4ade80':'#fbbf24'};font-size:1.1rem;font-weight:600">${r}%</div></div><div><div style="${this.lbl}">MB Orphan Rate</div><div style="color:#52c8db;font-size:1.1rem;font-weight:600">${mb.toFixed(1)}%</div></div></div>`},
renderMemoryStorage(d){return`<div class="enhanced-stat-card" style="${this.cs.replace('185,89,182','251,191,36')}"><div style="${this.hdr}"><h4 style="color:#fbbf24;margin:0;font-size:1.2rem;font-weight:600">Memory & Storage</h4><div style="width:8px;height:8px;background:#fbbf24;border-radius:50%;box-shadow:0 0 8px rgba(251,191,36,0.4)"></div></div><div style="${this.mb}"><div style="${this.lbl}">Miniblocks in Memory</div><div style="color:#b959b6;${this.val}">${d.miniblocksInMemory}</div></div><div style="${this.mb}"><div style="${this.lbl}">Whitelist Peers</div><div style="color:#4ade80;font-size:1.1rem;font-weight:600">${d.whitelistPeers}</div></div><div style="${this.mb}"><div style="${this.lbl}">Greylist Peers</div><div style="color:#888;font-size:1.1rem;font-weight:600">${d.greylistPeers}</div></div><div><div style="${this.lbl}">Connected Miners</div><div style="color:#fbbf24;font-size:1.1rem;font-weight:600">${d.connectedMiners}</div></div></div>`},
renderTransactionPool(d){const gs='display:grid;grid-template-columns:repeat(2,1fr);gap:0.75rem',cs2='background:rgba(0,0,0,0.3);border-radius:8px;padding:0.75rem;text-align:center',sv='font-size:1.3rem;font-weight:700;margin-bottom:0.25rem',sl='color:#b3b3b3;font-size:0.7rem;text-transform:uppercase;letter-spacing:0.5px';return`<div class="enhanced-stat-card" style="${this.cs.replace('185,89,182','82,200,219')}"><div style="${this.hdr}"><h4 style="color:#52c8db;margin:0;font-size:1.2rem;font-weight:600">Transaction Pool</h4><div style="width:8px;height:8px;background:#52c8db;border-radius:50%;box-shadow:0 0 8px rgba(82,200,219,0.4)"></div></div><div style="${gs}"><div style="${cs2};border:1px solid rgba(185,89,182,0.3)"><div style="color:#b959b6;${sv}">${d.poolSize}</div><div style="${sl}">Pool Size</div></div><div style="${cs2};border:1px solid rgba(139,139,139,0.3)"><div style="color:#888;${sv}">${d.registrationPool}</div><div style="${sl}">Registration Pool</div></div><div style="${cs2};border:1px solid rgba(251,191,36,0.3)"><div style="color:#fbbf24;${sv}">${d.dynamicFeeKB.toFixed(3)}</div><div style="${sl}">Dynamic Fee/KB</div></div><div style="${cs2};border:1px solid rgba(74,222,128,0.3)"><div style="color:#4ade80;${sv}">${d.totalSupply}</div><div style="${sl}">Total Supply DERO</div></div></div></div>`},
renderSecurityStatus(d){const t=d.topBlockHash.length>32?d.topBlockHash.substring(0,32)+'<br/>'+d.topBlockHash.substring(32,64):d.topBlockHash;const tr=d.treeHash.length>32?d.treeHash.substring(0,32)+'<br/>'+d.treeHash.substring(32,64):d.treeHash;return`<div class="enhanced-stat-card" style="${this.cs.replace('185,89,182','139,92,246')}"><div style="${this.hdr}"><h4 style="color:#8b5cf6;margin:0;font-size:1.2rem;font-weight:600">Security Status</h4><div style="width:8px;height:8px;background:#8b5cf6;border-radius:50%;box-shadow:0 0 8px rgba(139,92,246,0.4)"></div></div><div style="${this.mb}"><div style="color:#b3b3b3;font-size:0.7rem;margin-bottom:0.25rem;text-transform:uppercase;letter-spacing:0.5px">Top Block Hash</div><div style="color:#52c8db;font-size:0.8rem;font-weight:600;font-family:monospace;word-break:break-all">${t}</div></div><div style="${this.mb}"><div style="color:#b3b3b3;font-size:0.7rem;margin-bottom:0.25rem;text-transform:uppercase;letter-spacing:0.5px">Tree Hash</div><div style="color:#52c8db;font-size:0.8rem;font-weight:600;font-family:monospace;word-break:break-all">${tr}</div></div><div style="${this.mb}"><div style="${this.lbl}">Alt Blocks</div><div style="color:${d.altBlocks>0?'#fbbf24':'#4ade80'};font-size:1.1rem;font-weight:600">${d.altBlocks}</div></div><div><div style="${this.lbl}">Chain Extended</div><div style="color:#4ade80;font-size:1.1rem;font-weight:600">${d.chainExtended}</div></div></div>`},
renderNodeInfo(d){const sb=d.status==='OK'?'rgba(74,222,128,0.3)':'rgba(251,191,36,0.3)';return`<div class="enhanced-card" style="background:rgba(0,0,0,0.2);border:1px solid rgba(82,200,219,0.3);border-radius:8px;padding:1.2rem;margin-bottom:1rem"><div class="card-header" style="margin-bottom:1rem;border-bottom:1px solid rgba(255,255,255,0.1);padding-bottom:0.75rem"><h4 style="color:#52c8db;margin:0;font-size:1.1rem;font-weight:600">Node & System Info</h4></div><div class="card-content"><div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:0.75rem;margin-bottom:1rem"><div style="background:rgba(0,0,0,0.3);border:1px solid ${sb};border-radius:6px;padding:0.75rem;text-align:center"><div style="color:${d.statusColor};font-size:1.3rem;font-weight:700;margin-bottom:0.4rem">${d.status}</div><div style="color:#b3b3b3;font-size:0.7rem;text-transform:uppercase;letter-spacing:0.5px">Node Status</div></div><div style="background:rgba(0,0,0,0.3);border:1px solid rgba(82,200,219,0.3);border-radius:6px;padding:0.75rem;text-align:center"><div style="color:#52c8db;font-size:0.85rem;font-weight:600;margin-bottom:0.4rem;word-break:break-all;line-height:1.2">${d.versionDisplay}</div><div style="color:#b3b3b3;font-size:0.7rem;text-transform:uppercase;letter-spacing:0.5px">DERO Version</div></div><div style="background:rgba(0,0,0,0.3);border:1px solid rgba(82,200,219,0.3);border-radius:6px;padding:0.75rem;text-align:center"><div style="color:#52c8db;font-size:1.3rem;font-weight:700;margin-bottom:0.4rem">${d.rpcConnections}</div><div style="color:#b3b3b3;font-size:0.7rem;text-transform:uppercase;letter-spacing:0.5px">RPC Connections</div></div><div style="background:rgba(0,0,0,0.3);border:1px solid rgba(251,191,36,0.3);border-radius:6px;padding:0.75rem;text-align:center"><div style="color:${d.memColor};font-size:1.3rem;font-weight:700;margin-bottom:0.4rem">${d.memPercent}%</div><div style="color:#b3b3b3;font-size:0.7rem;text-transform:uppercase;letter-spacing:0.5px">Memory Usage</div></div></div><div style="background:rgba(0,0,0,0.1);border-radius:6px;padding:0.75rem;font-size:0.8rem;color:#888">Alt Blocks: <span style="color:#ef4444;font-weight:600">${d.altBlocks}</span> • Cache: <span style="color:#4ade80;font-weight:600">${(d.altBlocks*0.5).toFixed(1)} MB</span></div></div></div>`},
async renderAdvancedAnalytics(i,x){const n=await window.lm('network-core');const a=await n.gatherAdvancedAnalytics(i,x);if(!a.success){return`<div style="margin-bottom:1.5rem"><h3 style="color:#52c8db;margin-bottom:1rem;font-size:1.2rem;font-weight:600">Advanced Network Analytics</h3><div style="background:rgba(239,68,68,0.1);border:1px solid rgba(239,68,68,0.3);border-radius:8px;padding:1rem;color:#ef4444">Error loading advanced analytics: ${a.error}</div></div>`}return`<div class="enhanced-card"><div class="card-header"><h3 style="color:#fff;margin:0;font-size:1.6rem;font-weight:700">Advanced Network Analytics</h3><div class="section-info" style="color:#b3b3b3;font-size:0.9rem;margin-top:0.5rem">Detailed mining, memory, and security analytics</div></div><div class="card-content"><div class="stats-grid" style="display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:1.5rem">${this.renderMiningProduction(n.analyzeMiningProduction(i))}${this.renderMiningEfficiency(n.analyzeMiningEfficiency(i))}${this.renderMiniblocksActivity()}${this.renderMemoryStorage(n.analyzeMemoryStorage(i))}${this.renderTransactionPool(n.analyzeTransactionPool(i,a.poolData))}${this.renderSecurityStatus(n.analyzeSecurityStatus(i,a.lastBlockData))}</div></div></div>`}
});
*/ |
SC Arguments: [Name:SC_ACTION Type:uint64 Value:'1' Name:SC_CODE Type:string Value:'Function InitializePrivate() Uint64
10 IF init() == 0 THEN GOTO 30
20 RETURN 1
30 STORE("nameHdr", "network-analytics.js")
31 STORE("descrHdr", "Advanced network analytics renderer")
32 STORE("iconURLHdr", "")
33 STORE("dURL", "explorer.tela")
34 STORE("docType", "TELA-JS-1")
35 STORE("subDir", "")
36 STORE("fileCheckC", "133aaf46f9e70007d7ca4764f635f44576a95b40d9efca1995284ee89ac915b")
37 STORE("fileCheckS", "28e7e8b40a82773b582f9609f2e3df44dfc74b66a29e57e71a24de5b252ede17")
100 RETURN 0
End Function
Function init() Uint64
10 IF EXISTS("owner") == 0 THEN GOTO 30
20 RETURN 1
30 STORE("owner", address())
50 STORE("docVersion", "1.0.0")
60 STORE("hash", HEX(TXID()))
70 STORE("likes", 0)
80 STORE("dislikes", 0)
100 RETURN 0
End Function
Function address() String
10 DIM s as String
20 LET s = SIGNER()
30 IF IS_ADDRESS_VALID(s) THEN GOTO 50
40 RETURN "anon"
50 RETURN ADDRESS_STRING(s)
End Function
Function Rate(r Uint64) Uint64
10 DIM addr as String
15 LET addr = address()
16 IF r < 100 && EXISTS(addr) == 0 && addr != "anon" THEN GOTO 30
20 RETURN 1
30 STORE(addr, ""+r+"_"+BLOCK_HEIGHT())
40 IF r < 50 THEN GOTO 70
50 STORE("likes", LOAD("likes")+1)
60 RETURN 0
70 STORE("dislikes", LOAD("dislikes")+1)
100 RETURN 0
End Function
/*
({
name:'network-analytics',version:'1.0.0',
cs:'background:rgba(0,0,0,0.2);border:1px solid rgba(185,89,182,0.3);border-radius:16px;padding:1.5rem;transition:all 0.2s ease',
hdr:'display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem',
lbl:'color:#b3b3b3;font-size:0.8rem;margin-bottom:0.25rem;text-transform:uppercase;letter-spacing:0.5px',
val:'font-size:1.3rem;font-weight:700',
mb:'margin-bottom:0.75rem',
renderMiningProduction(d){const c=d.miningStatus==='Active'?'#4ade80':'#fbbf24';return`<div class="enhanced-stat-card" style="${this.cs}"><div style="${this.hdr}"><h4 style="color:#b959b6;margin:0;font-size:1.2rem;font-weight:600">Mining Production</h4><div style="width:8px;height:8px;background:#b959b6;border-radius:50%;box-shadow:0 0 8px rgba(185,89,182,0.4)"></div></div><div style="${this.mb}"><div style="${this.lbl}">Expected Daily</div><div style="color:#b959b6;${this.val}">${d.expectedDaily.toLocaleString()} blocks</div></div><div style="${this.mb}"><div style="${this.lbl}">Block Reward</div><div style="color:#fbbf24;font-size:1.1rem;font-weight:600">~${d.blockReward.toFixed(3)} DERO + fees</div></div><div style="${this.mb}"><div style="${this.lbl}">Daily Emission</div><div style="color:#52c8db;font-size:1.1rem;font-weight:600">~${d.dailyEmission.toFixed(0)} DERO</div></div><div><div style="${this.lbl}">Mining Status</div><div style="color:${c};font-size:1.1rem;font-weight:600">${d.miningStatus}</div></div></div>`},
renderMiningEfficiency(d){const c=d.syncStatus==='OK'?'#4ade80':'#fbbf24';return`<div class="enhanced-stat-card" style="${this.cs.replace('185,89,182','82,200,219')}"><div style="${this.hdr}"><h4 style="color:#52c8db;margin:0;font-size:1.2rem;font-weight:600">Mining Efficiency</h4><div style="width:8px;height:8px;background:#52c8db;border-radius:50%;box-shadow:0 0 8px rgba(82,200,219,0.4)"></div></div><div style="${this.mb}"><div style="${this.lbl}">Algorithm</div><div style="color:#4ade80;${this.val}">${d.algorithm}</div></div><div style="${this.mb}"><div style="${this.lbl}">Block Size</div><div style="color:#52c8db;font-size:1.1rem;font-weight:600">${d.avgBlockSize.toFixed(1)} KB avg</div></div><div style="${this.mb}"><div style="${this.lbl}">Network Type</div><div style="color:#4ade80;font-size:1.1rem;font-weight:600">${d.networkType}</div></div><div><div style="${this.lbl}">Sync Status</div><div style="color:${c};font-size:1.1rem;font-weight:600">${d.syncStatus}</div></div></div>`},
renderMiniblocksActivity(){const m=0,o=0,r=(o/(m||1)*100).toFixed(1),mb=0.0;return`<div class="enhanced-stat-card" style="${this.cs.replace('185,89,182','74,222,128')}"><div style="${this.hdr}"><h4 style="color:#4ade80;margin:0;font-size:1.2rem;font-weight:600">Miniblock Activity</h4><div style="width:8px;height:8px;background:#4ade80;border-radius:50%;box-shadow:0 0 8px rgba(74,222,128,0.4)"></div></div><div style="${this.mb}"><div style="${this.lbl}">10min Miniblocks</div><div style="color:#b959b6;${this.val}">${m}</div></div><div style="${this.mb}"><div style="${this.lbl}">10min Orphans</div><div style="color:#fbbf24;font-size:1.1rem;font-weight:600">${o}</div></div><div style="${this.mb}"><div style="${this.lbl}">Orphan Rate</div><div style="color:${r<1?'#4ade80':'#fbbf24'};font-size:1.1rem;font-weight:600">${r}%</div></div><div><div style="${this.lbl}">MB Orphan Rate</div><div style="color:#52c8db;font-size:1.1rem;font-weight:600">${mb.toFixed(1)}%</div></div></div>`},
renderMemoryStorage(d){return`<div class="enhanced-stat-card" style="${this.cs.replace('185,89,182','251,191,36')}"><div style="${this.hdr}"><h4 style="color:#fbbf24;margin:0;font-size:1.2rem;font-weight:600">Memory & Storage</h4><div style="width:8px;height:8px;background:#fbbf24;border-radius:50%;box-shadow:0 0 8px rgba(251,191,36,0.4)"></div></div><div style="${this.mb}"><div style="${this.lbl}">Miniblocks in Memory</div><div style="color:#b959b6;${this.val}">${d.miniblocksInMemory}</div></div><div style="${this.mb}"><div style="${this.lbl}">Whitelist Peers</div><div style="color:#4ade80;font-size:1.1rem;font-weight:600">${d.whitelistPeers}</div></div><div style="${this.mb}"><div style="${this.lbl}">Greylist Peers</div><div style="color:#888;font-size:1.1rem;font-weight:600">${d.greylistPeers}</div></div><div><div style="${this.lbl}">Connected Miners</div><div style="color:#fbbf24;font-size:1.1rem;font-weight:600">${d.connectedMiners}</div></div></div>`},
renderTransactionPool(d){const gs='display:grid;grid-template-columns:repeat(2,1fr);gap:0.75rem',cs2='background:rgba(0,0,0,0.3);border-radius:8px;padding:0.75rem;text-align:center',sv='font-size:1.3rem;font-weight:700;margin-bottom:0.25rem',sl='color:#b3b3b3;font-size:0.7rem;text-transform:uppercase;letter-spacing:0.5px';return`<div class="enhanced-stat-card" style="${this.cs.replace('185,89,182','82,200,219')}"><div style="${this.hdr}"><h4 style="color:#52c8db;margin:0;font-size:1.2rem;font-weight:600">Transaction Pool</h4><div style="width:8px;height:8px;background:#52c8db;border-radius:50%;box-shadow:0 0 8px rgba(82,200,219,0.4)"></div></div><div style="${gs}"><div style="${cs2};border:1px solid rgba(185,89,182,0.3)"><div style="color:#b959b6;${sv}">${d.poolSize}</div><div style="${sl}">Pool Size</div></div><div style="${cs2};border:1px solid rgba(139,139,139,0.3)"><div style="color:#888;${sv}">${d.registrationPool}</div><div style="${sl}">Registration Pool</div></div><div style="${cs2};border:1px solid rgba(251,191,36,0.3)"><div style="color:#fbbf24;${sv}">${d.dynamicFeeKB.toFixed(3)}</div><div style="${sl}">Dynamic Fee/KB</div></div><div style="${cs2};border:1px solid rgba(74,222,128,0.3)"><div style="color:#4ade80;${sv}">${d.totalSupply}</div><div style="${sl}">Total Supply DERO</div></div></div></div>`},
renderSecurityStatus(d){const t=d.topBlockHash.length>32?d.topBlockHash.substring(0,32)+'<br/>'+d.topBlockHash.substring(32,64):d.topBlockHash;const tr=d.treeHash.length>32?d.treeHash.substring(0,32)+'<br/>'+d.treeHash.substring(32,64):d.treeHash;return`<div class="enhanced-stat-card" style="${this.cs.replace('185,89,182','139,92,246')}"><div style="${this.hdr}"><h4 style="color:#8b5cf6;margin:0;font-size:1.2rem;font-weight:600">Security Status</h4><div style="width:8px;height:8px;background:#8b5cf6;border-radius:50%;box-shadow:0 0 8px rgba(139,92,246,0.4)"></div></div><div style="${this.mb}"><div style="color:#b3b3b3;font-size:0.7rem;margin-bottom:0.25rem;text-transform:uppercase;letter-spacing:0.5px">Top Block Hash</div><div style="color:#52c8db;font-size:0.8rem;font-weight:600;font-family:monospace;word-break:break-all">${t}</div></div><div style="${this.mb}"><div style="color:#b3b3b3;font-size:0.7rem;margin-bottom:0.25rem;text-transform:uppercase;letter-spacing:0.5px">Tree Hash</div><div style="color:#52c8db;font-size:0.8rem;font-weight:600;font-family:monospace;word-break:break-all">${tr}</div></div><div style="${this.mb}"><div style="${this.lbl}">Alt Blocks</div><div style="color:${d.altBlocks>0?'#fbbf24':'#4ade80'};font-size:1.1rem;font-weight:600">${d.altBlocks}</div></div><div><div style="${this.lbl}">Chain Extended</div><div style="color:#4ade80;font-size:1.1rem;font-weight:600">${d.chainExtended}</div></div></div>`},
renderNodeInfo(d){const sb=d.status==='OK'?'rgba(74,222,128,0.3)':'rgba(251,191,36,0.3)';return`<div class="enhanced-card" style="background:rgba(0,0,0,0.2);border:1px solid rgba(82,200,219,0.3);border-radius:8px;padding:1.2rem;margin-bottom:1rem"><div class="card-header" style="margin-bottom:1rem;border-bottom:1px solid rgba(255,255,255,0.1);padding-bottom:0.75rem"><h4 style="color:#52c8db;margin:0;font-size:1.1rem;font-weight:600">Node & System Info</h4></div><div class="card-content"><div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:0.75rem;margin-bottom:1rem"><div style="background:rgba(0,0,0,0.3);border:1px solid ${sb};border-radius:6px;padding:0.75rem;text-align:center"><div style="color:${d.statusColor};font-size:1.3rem;font-weight:700;margin-bottom:0.4rem">${d.status}</div><div style="color:#b3b3b3;font-size:0.7rem;text-transform:uppercase;letter-spacing:0.5px">Node Status</div></div><div style="background:rgba(0,0,0,0.3);border:1px solid rgba(82,200,219,0.3);border-radius:6px;padding:0.75rem;text-align:center"><div style="color:#52c8db;font-size:0.85rem;font-weight:600;margin-bottom:0.4rem;word-break:break-all;line-height:1.2">${d.versionDisplay}</div><div style="color:#b3b3b3;font-size:0.7rem;text-transform:uppercase;letter-spacing:0.5px">DERO Version</div></div><div style="background:rgba(0,0,0,0.3);border:1px solid rgba(82,200,219,0.3);border-radius:6px;padding:0.75rem;text-align:center"><div style="color:#52c8db;font-size:1.3rem;font-weight:700;margin-bottom:0.4rem">${d.rpcConnections}</div><div style="color:#b3b3b3;font-size:0.7rem;text-transform:uppercase;letter-spacing:0.5px">RPC Connections</div></div><div style="background:rgba(0,0,0,0.3);border:1px solid rgba(251,191,36,0.3);border-radius:6px;padding:0.75rem;text-align:center"><div style="color:${d.memColor};font-size:1.3rem;font-weight:700;margin-bottom:0.4rem">${d.memPercent}%</div><div style="color:#b3b3b3;font-size:0.7rem;text-transform:uppercase;letter-spacing:0.5px">Memory Usage</div></div></div><div style="background:rgba(0,0,0,0.1);border-radius:6px;padding:0.75rem;font-size:0.8rem;color:#888">Alt Blocks: <span style="color:#ef4444;font-weight:600">${d.altBlocks}</span> • Cache: <span style="color:#4ade80;font-weight:600">${(d.altBlocks*0.5).toFixed(1)} MB</span></div></div></div>`},
async renderAdvancedAnalytics(i,x){const n=await window.lm('network-core');const a=await n.gatherAdvancedAnalytics(i,x);if(!a.success){return`<div style="margin-bottom:1.5rem"><h3 style="color:#52c8db;margin-bottom:1rem;font-size:1.2rem;font-weight:600">Advanced Network Analytics</h3><div style="background:rgba(239,68,68,0.1);border:1px solid rgba(239,68,68,0.3);border-radius:8px;padding:1rem;color:#ef4444">Error loading advanced analytics: ${a.error}</div></div>`}return`<div class="enhanced-card"><div class="card-header"><h3 style="color:#fff;margin:0;font-size:1.6rem;font-weight:700">Advanced Network Analytics</h3><div class="section-info" style="color:#b3b3b3;font-size:0.9rem;margin-top:0.5rem">Detailed mining, memory, and security analytics</div></div><div class="card-content"><div class="stats-grid" style="display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:1.5rem">${this.renderMiningProduction(n.analyzeMiningProduction(i))}${this.renderMiningEfficiency(n.analyzeMiningEfficiency(i))}${this.renderMiniblocksActivity()}${this.renderMemoryStorage(n.analyzeMemoryStorage(i))}${this.renderTransactionPool(n.analyzeTransactionPool(i,a.poolData))}${this.renderSecurityStatus(n.analyzeSecurityStatus(i,a.lastBlockData))}</div></div></div>`}
});
*/'] |