AI를 위한 암호학적 사실 검증
기업 사실을 검증하는 세계 최초의 오픈 프로토콜.
JSON 파일에 사실을 기술
각 사실을 ed25519로 서명
누구나 서명을 검증 가능
verified-facts.json URL을 붙여넣기
암호 서명이 검증된 기업
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);
}Polygon의 불변 타임스탬프 + NFT 인증서.