Semantic Web and Web 3.0 · class 11 · demo

Anchor a document

On chain goes the digest — 32 bytes — never the document. Type a document: the page computes its digest and asks the contract whether it has it, with get(digest). As in example 06, the certificates' «document» is their URI, so typing a certificate URI finds it.

Try: certificate:2026-001 · certificate:2026-003 · revocation:2026-002 · «Hello, class 11»

The digests

FunctionDigest of these 43 bytes (UTF-8)
keccak2560x736e394a86226f896b7fda931ce781f70f281ebcbeeb65610ddfb98c9eab42d6
sha2560x2204a4a4a5f179e958c9e3fb0aba7ec367e64a0703a6819d0555fd064a7292be

Both are 32 bytes, so either fits a bytes32. The class uses keccak256 (what Solidity and ethers call natively); a registry must just say which one. One character more — a space, a newline — and both change completely.

On the chain?

Registered

author 0x1111111111111111111111111111111111111111
registeredAt 1793404836 (2026-10-31 00:00:36 UTC)
uri https://data.csoares.me/revocation/2026-002
block 8412994 · tx 0xb8f20a…1fd509

Whoever holds these exact bytes can prove they existed at that time, signed by that account — without the chain ever holding the document.

An in-memory chain (the Ethereum virtual machine, @ethereumjs/evm), in this one process: no test network, no wallet, no keys, no money. Nothing a visitor does is kept.