async function loadLedger() { // In production, serve ledger.jsonl via a small API; here we assume static hosting. const res = await fetch('../attest/ledger.jsonl').catch(()=>null); if(!res || !res.ok) return []; const text = await res.text(); return text.trim().split('\n').map(line => JSON.parse(line)); } function cardHTML(r){ const a=r.attestation||{}, c=r.concordium_decision||{}; return `

${a.model || 'model: ?'}

Continuity
${a.continuity}
Truth-Lock
${String(a.truth_lock)}
ACK Mandate
${String(a.ack_mandate)}
Compliant
${String(c.is_compliant)}
Timestamp
${a.timestamp}
Prompt hash
${a.prompt_sha256}
Output hash
${a.output_sha256}
`; } async function render(){ const q = document.getElementById('q').value.toLowerCase().trim(); const data = await loadLedger(); const filtered = data.filter(x => JSON.stringify(x).toLowerCase().includes(q)); document.getElementById('cards').innerHTML = filtered.map(cardHTML).join(''); } document.getElementById('refresh').onclick = render; document.getElementById('q').oninput = render; render();