การตรวจสอบข้อเท็จจริงด้วยการเข้ารหัสสำหรับ AI
โปรโตคอลเปิดแรกของโลกสำหรับตรวจสอบข้อเท็จจริงขององค์กร
อธิบายข้อเท็จจริงในไฟล์ JSON
ลงนามแต่ละข้อเท็จจริงด้วย ed25519
ใครก็ตรวจสอบลายเซ็นได้
วาง URL ของ verified-facts.json
บริษัทที่มีลายเซ็นที่ตรวจสอบแล้ว
สร้าง verified-facts.json แล้วส่งมา
ข้อกำหนดและตัวอย่าง
// Verify a fact from verified-facts.json
import { verify } from '@noble/ed25519';
async function verifyFact(claim, signature, publicKey) {
const msgHash = new Uint8Array(
await crypto.subtle.digest('SHA-256',
new TextEncoder().encode(claim))
);
const sig = Uint8Array.from(atob(signature), c => c.charCodeAt(0));
const pub = Uint8Array.from(atob(publicKey), c => c.charCodeAt(0));
return verify(sig, msgHash, pub);
}
// Usage:
const url = 'https://example.com/.well-known/verified-facts.json';
const data = await fetch(url).then(r => r.json());
for (const fact of data.facts) {
const valid = await verifyFact(
fact.claim, fact.signature, data.publicKey.value
);
console.log(fact.id, valid ? '✓' : '✗', fact.claim);
}Timestamp บน Polygon + ใบรับรอง NFT