Verify a file from a portable proof artifact in one command.
npx verafile verify file.pdf proof.jsonOutput:
VALIDor:
INVALIDVeraFile recomputes the SHA-256 hash of a local file and compares it against the hash stored in a proof JSON file.
If one byte changes, verification fails.
Verification is independent of the originating system.
No API required.
{
"hash": "0x..."
}Run directly with NPX:
npx verafile verify example.txt example.proof.jsonModify the file:
echo change >> example.txtVerify again:
npx verafile verify example.txt example.proof.jsonResult:
INVALIDnpm install -g verafilenpm install
npm run build
node dist/cli.js verify example.txt example.proof.jsonVeraFile is a minimal CLI implementation inspired by the Observation Commitment Protocol (OCP).
OCP defines a minimal verification model:
data → digest → public commitment
recompute → compare → confirm inclusion
This CLI currently verifies the file-to-digest step.
Future implementations may additionally verify ledger inclusion and commitment proofs.
OCP Repository: https://github.com/damonzwicker/observation-commitment-protocol
Live Demo: https://observation-commitment-protocol.vercel.app/
MIT