The Human Guestbook ↗
A guest book where every entry was typed by a person and signed on their phone. Plain HTML and the script tag; the server checks each token with the verify API and keeps entries in one JSON file.
- Script tag + ProofOfType.mount()
- input.verify() from your own button
- Server check: valid, text_matches, origin_matches, fresh
- One entry per proof id
- A "View proof" link on every entry
Source: index.html · app.js · server check
// POST /api/example/guestbook { text, token }
const r = await fetch('https://www.proofoftype.com/api/v1/verify', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ token, text, origin: 'https://www.proofoftype.com', max_age_seconds: 600 }),
});
const v = await r.json();
if (!v.valid || !v.text_matches || !v.origin_matches || !v.fresh) {
return res.status(400).json({ error: 'Your message needs a fresh Proof of Type signature.' });
}
// Keep it: one entry per proof id; the author comes from the verified proof.
save({ id: v.proof.id, author: v.proof.author, body: text, token });