diff --git a/rin/wallet/web/server.py b/rin/wallet/web/server.py index 8163fc3..6ca5e8c 100644 --- a/rin/wallet/web/server.py +++ b/rin/wallet/web/server.py @@ -131,6 +131,34 @@ def list_transactions(): return jsonify({"error": str(exc)}), 500 +@app.route("/api/network", methods=["GET"]) +@require_token +def get_network_info(): + try: + network_info = rpc_call("getnetworkinfo") + peer_info = rpc_call("getpeerinfo") + mempool = rpc_call("getrawmempool") + blockchain_info = rpc_call("getblockchaininfo") + + return jsonify({ + "network": { + "connections": network_info.get("connections", 0), + "networkactive": network_info.get("networkactive", False), + "relayfee": network_info.get("relayfee", 0), + }, + "peers": len(peer_info), + "mempool_size": len(mempool), + "blockchain": { + "blocks": blockchain_info.get("blocks", 0), + "headers": blockchain_info.get("headers", 0), + "difficulty": blockchain_info.get("difficulty", 0), + "chain": blockchain_info.get("chain", "unknown"), + } + }) + except RuntimeError as exc: + return jsonify({"error": str(exc)}), 500 + + @app.route("/") def root(): return send_from_directory(app.static_folder, "index.html") diff --git a/rin/wallet/web/static/index.html b/rin/wallet/web/static/index.html index 4b7a3bc..560a95a 100644 --- a/rin/wallet/web/static/index.html +++ b/rin/wallet/web/static/index.html @@ -147,6 +147,14 @@ background: rgba(255, 152, 0, 0.2); color: #ff9800; } + .tx-link { + color: #29b6f6; + text-decoration: none; + word-break: break-all; + } + .tx-link:hover { + text-decoration: underline; + } @media (max-width: 900px) { body { flex-direction: column; @@ -207,6 +215,13 @@

Recent Activity

+ +
+

Network Status

+
+
Loading network information...
+
+