Update index.html
Browse files2 unmodified lines3456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172732 unmodified lines<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Autonomous Compute Arbitrage Gateway</title><style>body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #0f172a; color: #f8fafc; padding: 20px; display: flex; justify-content: center; }.card { background: #1e293b; border: 1px solid #334155; border-radius: 12px; max-width: 540px; width: 100%; padding: 24px; box-shadow: 0 10px 25px rgba(0,0,0,0.5); }h2 { margin-top: 0; color: #38bdf8; font-size: 1.4rem; }label { display: block; margin-top: 15px; font-weight: 600; color: #94a3b8; font-size: 0.85rem; }select, input { width: 100%; padding: 10px; margin-top: 6px; border-radius: 6px; border: 1px solid #475569; background: #0f172a; color: #fff; box-sizing: border-box; }button { width: 100%; margin-top: 18px; padding: 12px; background: #0284c7; color: white; border: none; border-radius: 6px; font-weight: bold; cursor: pointer; font-size: 0.95rem; }button:hover { background: #0369a1; }.wallet-box { margin-top: 15px; padding: 10px; background: #022c22; border: 1px solid #059669; border-radius: 6px; font-size: 0.8rem; word-break: break-all; color: #6ee7b7; }.output { margin-top: 18px; background: #0f172a; border: 1px solid #334155; border-radius: 6px; padding: 12px; font-family: monospace; font-size: 0.82rem; color: #4ade80; white-space: pre-wrap; word-break: break-all; }</style></head><body><div class="card"><h2>⚡ Liquid Compute Dispatcher</h2><p style="font-size: 0.82rem; color: #94a3b8;">Decentralized GPU Compute Allocation & Real-Time Settlement Router</p><label for="gpu">Select Compute Hardware</label><select id="gpu"><option value="NVIDIA H100">NVIDIA H100 (Spread: $2.70/hr)</option><option value="NVIDIA A100">NVIDIA A100 (Spread: $1.68/hr)</option><option value="RTX 4090">RTX 4090 (Spread: $0.57/hr)</option></select><label for="hours">Duration (Hours): <span id="hrs-val">5</span> hrs</label><input type="range" id="hours" min="1" max="168" value="5" oninput="document.getElementById('hrs-val').innerText = this.value"><div class="wallet-box"><strong>Official Settlement Target (Solana SPL-USDC):</strong><br><code>3xdY7ZzunKpptQorAadst2GkfDX1mz7aqZsrwqWSioQX</code></div><label for="txsig">Solana Transaction Signature (Optional for Quote, Required for Node Dispatch)</label><input type="text" id="txsig" placeholder="Paste Solana TX hash to verify on-chain"><button onclick="dispatchJob()">🚀 Calculate Quote / Verify & Dispatch Node</button><div id="result" class="output" style="display:none;"></div></div><script>async function dispatchJob() {const gpu = document.getElementById('gpu').value;const hours = document.getElementById('hours').value;const txSig = document.getElementById('txsig').value.trim();const out = document.getElementById('result');out.style.display = 'block';out.innerText = 'Connecting to Cloudflare Sentinel & Solana RPC...';try {const payload = { gpu: gpu, hours: Number(hours) };if (txSig) payload.tx_signature = txSig;const res = await fetch("https://compute-arbitrage-engine.sarkarirojgarofficials.workers.dev/", {method: "POST",headers: { "Content-Type": "application/json" },body: JSON.stringify(payload)});const data = await res.json();out.innerText = JSON.stringify(data, null, 2);} catch (err) {out.innerText = 'Error: ' + err.message;}}</script></body></html>2 unmodified lines34567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061072 unmodified lines<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Liquid Compute Gateway Multi-Mesh</title><script src="https://cdn.tailwindcss.com"></script></head><body class="bg-slate-950 text-slate-100 min-h-screen flex flex-col items-center justify-center p-4"><div class="max-w-xl w-full bg-slate-900 border border-slate-800 rounded-2xl p-6 shadow-2xl"><div class="flex items-center justify-between border-b border-slate-800 pb-4 mb-6"><div><h1 class="text-xl font-bold text-white flex items-center gap-2"><span>⚡</span> Liquid Compute Gateway</h1><p class="text-xs text-slate-400">Autonomous Edge Arbitrage Mesh v2.0</p></div><span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-emerald-950 text-emerald-400 border border-emerald-800">Live 🟢</span></div><form id="arbitrageForm" class="space-y-4"><div><label for="gpu" class="block text-xs font-semibold text-slate-300 uppercase tracking-wider mb-2">Select Hardware Node</label><select id="gpu" class="w-full bg-slate-950 border border-slate-700 rounded-lg px-3 py-2.5 text-sm text-white focus:outline-none focus:border-indigo-500"><option value="NVIDIA H200">NVIDIA H200 (Extreme Cluster - $5.30/hr)</option><option value="NVIDIA H100" selected>NVIDIA H100 (Enterprise Fine-Tuning - $3.85/hr)</option><option value="NVIDIA A100">NVIDIA A100 (Deep Learning Standard - $2.40/hr)</option><option value="RTX 4090">RTX 4090 (Mid-tier Inference - $0.85/hr)</option><option value="RTX 3090">RTX 3090 (Budget Open-Source - $0.46/hr)</option></select></div><div><label for="hours" class="block text-xs font-semibold text-slate-300 uppercase tracking-wider mb-2">Compute Duration (Hours)</label><input type="number" id="hours" min="1" max="168" value="1" class="w-full bg-slate-950 border border-slate-700 rounded-lg px-3 py-2.5 text-sm text-white focus:outline-none focus:border-indigo-500"></div><div><label for="txSig" class="block text-xs font-semibold text-slate-300 uppercase tracking-wider mb-2">Solana Settlement Tx Signature (Optional for Quote)</label><input type="text" id="txSig" placeholder="Paste SPL-USDC Tx Hash after payment" class="w-full bg-slate-950 border border-slate-700 rounded-lg px-3 py-2.5 text-sm text-white focus:outline-none focus:border-indigo-500 font-mono"></div><button type="submit" id="submitBtn" class="w-full bg-indigo-600 hover:bg-indigo-500 active:bg-indigo-700 text-white font-medium py-2.5 rounded-lg text-sm transition-all shadow-lg shadow-indigo-600/30">Fetch Instant Mesh Route</button></form><div id="outputContainer" class="mt-6 hidden"><div class="flex items-center justify-between mb-2"><span class="text-xs font-semibold text-slate-400 uppercase tracking-wider">Gateway Dispatch Response</span><span id="badgeStatus" class="text-xs font-mono text-emerald-400"></span></div><pre id="output" class="bg-slate-950 border border-slate-800 rounded-lg p-3 text-xs font-mono text-slate-300 overflow-x-auto max-h-64"></pre></div><div class="mt-6 pt-4 border-t border-slate-800 flex items-center justify-between text-xs text-slate-500"><span>Settlement: Solana SPL-USDC</span><a href="https://compute-arbitrage-engine.sarkarirojgarofficials.workers.dev/openapi.json" target="_blank" class="text-indigo-400 hover:underline">OpenAPI 3.0.0 Spec</a></div></div><script>const WORKER_URL = "https://compute-arbitrage-engine.sarkarirojgarofficials.workers.dev";document.getElementById("arbitrageForm").addEventListener("submit", async (e) => {e.preventDefault();const btn = document.getElementById("submitBtn");const outBox = document.getElementById("outputContainer");const out = document.getElementById("output");const badge = document.getElementById("badgeStatus");btn.disabled = true;btn.innerText = "Routing across Mesh...";const payload = {gpu: document.getElementById("gpu").value,hours: Number(document.getElementById("hours").value) || 1,tx_signature: document.getElementById("txSig").value.trim() || null};try {const res = await fetch(WORKER_URL, {method: "POST",headers: { "Content-Type": "application/json" },body: JSON.stringify(payload)});const data = await res.json();outBox.classList.remove("hidden");badge.innerText = data.status || "ROUTED";out.textContent = JSON.stringify(data, null, 2);} catch (err) {outBox.classList.remove("hidden");badge.innerText = "ERROR";out.textContent = JSON.stringify({ error: "Failed to connect to Edge Gateway", details: err.message }, null, 2);} finally {btn.disabled = false;btn.innerText = "Fetch Instant Mesh Route";}});</script></body></html>
index.html+80-46