ProofCore-Protocol commited on
Commit
1ea4600
·
verified ·
1 Parent(s): d5f1c44

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +119 -19
index.html CHANGED
@@ -1,19 +1,119 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>ProofCore | AI Blockchain Notary Demo</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ </head>
9
+ <body class="bg-[#050b14] text-slate-100 min-h-screen font-sans antialiased p-4 md:p-8 flex flex-col items-center justify-center">
10
+
11
+ <div class="max-w-2xl w-full bg-[#0a1324] border border-slate-800 rounded-2xl p-6 md:p-8 shadow-2xl space-y-6">
12
+
13
+ <!-- HEADER -->
14
+ <div class="text-center border-b border-slate-800 pb-6">
15
+ <div class="inline-block px-3 py-1 bg-emerald-500/10 border border-emerald-500/30 text-emerald-400 text-xs font-bold rounded-full uppercase tracking-wider mb-2">
16
+ Live M2M Notarization Demo
17
+ </div>
18
+ <h1 class="text-2xl md:text-3xl font-black text-white tracking-wide">
19
+ Proof<span class="text-transparent bg-clip-text bg-gradient-to-r from-emerald-400 to-cyan-400">Core</span> Protocol
20
+ </h1>
21
+ <p class="text-xs text-slate-400 mt-2">
22
+ Cryptographically anchor AI outputs, contract audits, and predictions onto the TON Blockchain.
23
+ </p>
24
+ </div>
25
+
26
+ <!-- FORM -->
27
+ <div class="space-y-4">
28
+ <div>
29
+ <label class="block text-xs font-bold text-slate-300 uppercase tracking-wider mb-1">Agent ID / Model</label>
30
+ <input id="agentInput" type="text" value="HuggingFace-Demo" class="w-full bg-[#03070c] border border-slate-800 rounded-xl px-4 py-2.5 text-sm text-cyan-300 focus:outline-none focus:border-cyan-500 transition">
31
+ </div>
32
+
33
+ <div>
34
+ <label class="block text-xs font-bold text-slate-300 uppercase tracking-wider mb-1">Report or Content to Seal</label>
35
+ <textarea id="contentInput" rows="5" placeholder="Enter your text, prediction, or smart contract audit findings here..." class="w-full bg-[#03070c] border border-slate-800 rounded-xl p-4 text-sm text-slate-200 focus:outline-none focus:border-cyan-500 transition placeholder:text-slate-600"></textarea>
36
+ </div>
37
+
38
+ <button id="sealBtn" onclick="sealContent()" class="w-full py-3.5 bg-gradient-to-r from-emerald-400 to-cyan-500 hover:opacity-90 active:scale-[0.99] text-gray-950 font-black uppercase text-xs tracking-widest rounded-xl transition shadow-lg shadow-emerald-500/10 flex items-center justify-center gap-2">
39
+ <span>🛡️</span> Seal on TON Blockchain
40
+ </button>
41
+ </div>
42
+
43
+ <!-- RESULT -->
44
+ <div id="resultBox" class="hidden bg-[#03070c] border border-emerald-500/30 rounded-xl p-5 space-y-4">
45
+ <div class="flex items-center gap-2 text-emerald-400 font-bold text-sm">
46
+ <span>✓</span> Successfully Anchored to TON Blockchain
47
+ </div>
48
+
49
+ <div class="space-y-2 text-xs font-mono">
50
+ <div><span class="text-slate-500">Deal ID:</span> <span id="dealIdText" class="text-slate-200"></span></div>
51
+ <div><span class="text-slate-500">SHA-256:</span> <span id="hashText" class="text-cyan-300 break-all"></span></div>
52
+ </div>
53
+
54
+ <div class="pt-2 border-t border-slate-800">
55
+ <label class="block text-[10px] text-slate-500 uppercase font-bold tracking-wider mb-1">Live Dynamic SVG Badge</label>
56
+ <div id="badgeContainer" class="my-2"></div>
57
+ </div>
58
+
59
+ <div class="flex gap-2">
60
+ <a id="explorerBtn" target="_blank" class="flex-1 py-2.5 bg-slate-800 hover:bg-slate-700 text-cyan-300 text-xs font-bold text-center rounded-lg border border-slate-700 transition">
61
+ 🔍 Open in Proof Explorer
62
+ </a>
63
+ </div>
64
+ </div>
65
+
66
+ <!-- FOOTER -->
67
+ <div class="text-center text-[11px] text-slate-500 pt-2 border-t border-slate-800/50">
68
+ Built for the M2M Economy by <a href="https://proofcore.org" target="_blank" class="text-cyan-400 hover:underline font-bold">ProofCore Protocol</a> • <a href="https://proofcore.org/openapi.json" target="_blank" class="text-slate-400 hover:underline">OpenAPI Spec</a>
69
+ </div>
70
+
71
+ </div>
72
+
73
+ <script>
74
+ async function sealContent() {
75
+ const content = document.getElementById('contentInput').value.trim();
76
+ const agentId = document.getElementById('agentInput').value.trim() || "HuggingFace-Demo";
77
+ const btn = document.getElementById('sealBtn');
78
+ const resultBox = document.getElementById('resultBox');
79
+
80
+ if (!content) {
81
+ alert("Please enter some text to seal.");
82
+ return;
83
+ }
84
+
85
+ btn.disabled = true;
86
+ btn.innerText = "⏳ Sealing onto Blockchain...";
87
+
88
+ try {
89
+ const res = await fetch("https://api.proofcore.org/api/v0.1/seal", {
90
+ method: "POST",
91
+ headers: { "Content-Type": "application/json" },
92
+ body: JSON.stringify({ content: content, agent_id: agentId, title: "Hugging Face Demo Seal" })
93
+ });
94
+
95
+ const data = await res.json();
96
+
97
+ if (res.ok) {
98
+ document.getElementById('dealIdText').innerText = data.deal_id;
99
+ document.getElementById('hashText').innerText = data.sha256_hash;
100
+ document.getElementById('explorerBtn').href = data.verification_url;
101
+
102
+ document.getElementById('badgeContainer').innerHTML = `
103
+ <img src="${data.badge_url}" alt="ProofCore Badge" class="inline-block shadow-md">
104
+ `;
105
+
106
+ resultBox.classList.remove('hidden');
107
+ } else {
108
+ alert("Error: " + (data.error || "Failed to seal content"));
109
+ }
110
+ } catch (err) {
111
+ alert("Connection error: " + err.message);
112
+ } finally {
113
+ btn.disabled = false;
114
+ btn.innerHTML = "<span>🛡️</span> Seal on TON Blockchain";
115
+ }
116
+ }
117
+ </script>
118
+ </body>
119
+ </html>