-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfiro-consola.html
More file actions
182 lines (155 loc) · 9.76 KB
/
Copy pathfiro-consola.html
File metadata and controls
182 lines (155 loc) · 9.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
<!doctype html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Firo · Consola RPC</title>
<style>
:root { --gold:#9B1C2E; --gold-soft:#c0392b; --green:#31db72; --red:#ff756f; --line:rgba(155,28,46,.5); --panel:rgba(10,2,2,.91); --ui-scale:1; }
* { box-sizing:border-box; }
body { min-height:100vh; margin:0; color:#fff; font:14px/1.25 "Lucida Console",Monaco,monospace; background:#020105 url("assets/f6.png") center top/cover fixed no-repeat; }
body::after { content:""; position:fixed; inset:0; pointer-events:none; background:repeating-linear-gradient(0deg,rgba(192,57,43,.025) 0 1px,transparent 1px 4px); }
.brand { position:fixed; z-index:2; top:20px; left:50%; transform:translateX(-50%) scale(var(--ui-scale)); transform-origin:center top; color:var(--gold-soft); font-size:24px; letter-spacing:5px; text-shadow:0 0 16px var(--gold); }
main { width:min(1380px,100%); min-height:100vh; margin:0; padding:72px 10px 36px 0; display:flex; align-items:center; justify-content:flex-start; transform:scale(var(--ui-scale)); transform-origin:top left; }
.panel { position:relative; width:min(800px,98%); padding:25px 30px 20px; background:linear-gradient(135deg,rgba(30,10,5,.95),var(--panel)); border:3px solid var(--gold); clip-path:polygon(0 31px,31px 0,calc(100% - 31px) 0,100% 31px,100% calc(100% - 31px),calc(100% - 31px) 100%,31px 100%,0 calc(100% - 31px)); box-shadow:0 0 16px rgba(155,28,46,.85),0 0 48px rgba(155,28,46,.2),inset 0 0 30px rgba(155,28,46,.08); }
.panel::before,.panel::after { content:""; position:absolute; width:62px; height:8px; background:repeating-linear-gradient(52deg,var(--gold) 0 11px,transparent 11px 18px); }
.panel::before { top:17px; right:58px; } .panel::after { bottom:17px; left:80px; transform:scaleX(-1); }
.panel-title { display:flex; align-items:center; gap:12px; margin:2px 0 16px; color:var(--gold-soft); font-size:17px; letter-spacing:1px; text-shadow:0 0 10px var(--gold); }
.logo { width:36px; height:36px; object-fit:contain; filter:drop-shadow(0 0 7px rgba(192,57,43,.65)); }
.top-links { border-top:1px solid var(--line); padding:8px 0; font-size:12px; line-height:1.6; }
a { color:var(--gold-soft); text-decoration:none; } a:hover { text-decoration:underline; }
.section { border-top:1px solid var(--line); padding:9px 0 10px; }
.subheader { margin:0 0 5px; color:var(--gold-soft); font-size:12px; letter-spacing:.5px; text-transform:uppercase; }
.note { color:var(--gold-soft); font-size:11px; line-height:1.4; }
.api { font-size:11px; overflow-wrap:anywhere; }
.footer { border-top:1px solid var(--line); margin-top:2px; padding-top:9px; color:#e6ddce; font-size:11px; line-height:1.4; }
.small { color:#afa391; }
.donation { font-size:10px; color:#7a7060; word-break:break-all; }
.input-line { display:flex; align-items:center; margin:8px 0; gap:8px; }
.prompt { color:var(--gold-soft); font-size:13px; white-space:nowrap; }
#cmdInput { background:transparent; color:#fff; border:none; border-bottom:1px solid var(--line); font-family:"Lucida Console",Monaco,monospace; font-size:13px; padding:3px 5px; width:100%; outline:none; caret-color:var(--gold); }
#cmdInput:focus { border-bottom-color:var(--gold); }
#output { margin-top:6px; }
#output pre { margin:6px 0 0 0; font-family:"Lucida Console",Monaco,monospace; font-size:12px; white-space:pre-wrap; word-wrap:break-word; color:#e6ddce; line-height:1.5; }
#output pre .gold { color:var(--gold-soft); }
#output pre .error { color:var(--red); }
.result-footer { font-size:10px; color:#7a7060; margin-top:8px; padding-top:6px; border-top:1px solid var(--line); }
.server-list-container { max-height:450px; overflow-y:auto; padding-right:5px; }
.server-list-container::-webkit-scrollbar { width:3px; }
.server-list-container::-webkit-scrollbar-track { background:rgba(155,28,46,.1); }
.server-list-container::-webkit-scrollbar-thumb { background:var(--gold); border-radius:2px; }
.copy-btn { background:transparent; border:1px solid var(--line); color:var(--gold-soft); font-family:'Lucida Console',monospace; font-size:11px; padding:3px 10px; cursor:pointer; margin-top:6px; }
.copy-btn:hover { border-color:var(--gold); background:rgba(155,28,46,.1); }
.help-box { margin-top:10px; padding:8px 12px; border-left:2px solid var(--line); color:#888; font-size:11px; line-height:1.6; }
.help-box .title { color:var(--gold-soft); font-weight:bold; }
.help-box .simple { color:#aaa; margin:3px 0 6px 0; }
.help-box .params { color:#aaa; }
@media (max-width:700px) {
.brand { position:absolute; font-size:18px; letter-spacing:3px; }
main { padding:65px 10px 24px 5px; align-items:flex-start; }
.panel { padding:22px 18px 18px; width:98%; }
.panel-title { font-size:16px; }
#cmdInput { font-size:12px; }
#output pre { font-size:11px; }
.server-list-container { max-height:300px; }
.help-box { font-size:10px; }
}
@media (min-width:1920px) {
:root { --ui-scale:1.1; }
main { padding:72px 20px 36px 0; }
.panel { width:min(750px,90%); }
}
</style>
</head>
<body>
<main><section class="panel">
<div class="panel-title"><img class="logo" src="assets/firo.png" alt="Firo">CONSOLA RPC</div>
<nav class="top-links"><a href="https://carover0.github.io/pagina/firo-nodo.html">[NODO]</a> · <a href="https://carover0.github.io/pagina/firo-explorer.html">[EXPLORADOR]</a> · <a href="https://carover0.github.io/pagina/">[INICIO]</a></nav>
<section class="section">
<div class="help-box">
<div class="title">COMANDOS BÁSICOS (sin parámetros)</div>
<div class="simple">getblockchaininfo · getblockcount · getbestblockhash · getdifficulty · getpeerinfo · getmempoolinfo · getrawmempool · getchaintips · gettxoutsetinfo · getinfo · getconnectioncount · getnettotals · getnetworkhashps · getmininginfo</div>
<div class="title">COMANDOS CON PARÁMETROS</div>
<div class="params">getblockhash <altura> · getblock <hash> · getrawtransaction <txid> 1 · validateaddress <dirección> · gettxout <txid> <vout></div>
</div>
<div class="input-line">
<span class="prompt">firo></span>
<input type="text" id="cmdInput" placeholder="getblockchaininfo" autofocus autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false">
</div>
<div id="output" class="server-list-container">
<pre style="color:#888;">Listo para ejecutar comandos...</pre>
</div>
</section>
<section class="section"><h2 class="subheader">► API pública</h2>
<a class="api" href="https://carover0.xyz/api/firo.json" target="_blank" rel="noopener">https://carover0.xyz/api/firo.json</a>
</section>
<footer class="footer">
<div class="small">[Enter] ejecutar · [F8] copiar · [F9] limpiar</div>
<div class="donation"><br></div>
</footer>
</section></main>
<script>
const API_URL = "https://carover0.xyz/api/firo/rpc.php";
const TOKEN = "firo2026";
function escapeHtml(text) {
if (!text) return '';
return String(text).replace(/[&<>]/g, function(m) {
if (m === '&') return '&';
if (m === '<') return '<';
if (m === '>') return '>';
return m;
});
}
async function sendCommand() {
const input = document.getElementById('cmdInput');
const cmd = input.value.trim();
const outputDiv = document.getElementById('output');
if (!cmd) return;
outputDiv.innerHTML = `<pre style="color:#888;">ejecutando: ${escapeHtml(cmd)}...</pre>`;
try {
const response = await fetch(`${API_URL}?token=${TOKEN}&cmd=${encodeURIComponent(cmd)}`);
const data = await response.json();
let output = `<pre>`;
output += `<span style="color:#9B1C2E;">firo> ${escapeHtml(cmd)}</span>\n\n`;
if (data.error) {
output += `<span class="error">Error:</span> ${JSON.stringify(data.error, null, 2)}`;
} else {
output += JSON.stringify(data.result || data, null, 2);
}
output += `\n</pre>`;
output += `<button class="copy-btn" onclick="copyResult()">[F8] copiar resultado</button>`;
outputDiv.innerHTML = output;
} catch (error) {
outputDiv.innerHTML = `<pre><span class="error">Error:</span> ${escapeHtml(error.message)}</pre>`;
}
input.value = '';
}
window.copyResult = function() {
const outputPre = document.querySelector('#output pre:last-of-type');
if (outputPre) {
navigator.clipboard.writeText(outputPre.innerText).then(() => {
document.querySelector('.prompt').textContent = '✓';
setTimeout(() => document.querySelector('.prompt').textContent = 'firo>', 1000);
});
}
};
document.addEventListener('keydown', function(e) {
if (e.key === 'F8') { e.preventDefault(); window.copyResult(); }
if (e.key === 'F9') {
e.preventDefault();
document.getElementById('cmdInput').value = '';
document.getElementById('output').innerHTML = '<pre style="color:#888;">Listo para ejecutar comandos...</pre>';
document.querySelector('.prompt').textContent = '♥';
setTimeout(() => document.querySelector('.prompt').textContent = 'firo>', 1000);
}
});
document.getElementById('cmdInput').addEventListener('keydown', (e) => {
if (e.key === 'Enter') {
e.preventDefault();
sendCommand();
}
});
window.onload = () => document.getElementById('cmdInput').focus();
</script>
</body>
</html>