What are ProofSets?
Hash multiple files into a single verifiable blockchain record
Overview
A ProofSet is a structured collection of file hashes bundled into a single root hash. Instead of recording one hash per file on the blockchain, you select multiple files and get one root hash that represents all of them. That single hash is what gets written to the blockchain.
Later, you can prove that any individual file was part of the original set by showing it hashes to a value contained within the ProofSet. This is efficient — one blockchain record covers many files.
Simple ProofSet
A Simple ProofSet is the most straightforward way to record multiple files. You select your files, each one is hashed individually, and a file list is produced. The root hash is the SHA256 of that file list itself.
How it works:
- Select one or more files
- Each file is hashed with SHA256
- A file list is created containing each filename and its hash
- The file list itself is hashed to produce the root hash
- The root hash is recorded on the blockchain
Verifying a Simple ProofSet:
Simple ProofSets can be verified using standard tools. Compute the SHA256 of each file and compare against the file list, then hash the file list to confirm it matches the on-chain root hash. You can use command-line tools like sha256sum, Get-FileHash, or the AlwaysProof ProofSet tool.
Advanced ProofSet
An Advanced ProofSet adds selective disclosure. You select a ZIP file containing your documents. The hash of the ZIP is written to the blockchain, and you keep the original ZIP file privately.
Why use an Advanced ProofSet?
Selective disclosure means you can later prove that specific documents exist within the ZIP without revealing the entire contents. This is useful when you need to prove certain files existed at a point in time while keeping other files private.
The @alwaysproof/proofset tool is essential for working with Advanced ProofSets, as it understands the internal format and handles selective disclosure verification.
The ProofSet Tool
AlwaysProof provides an open-source command-line tool for creating and verifying ProofSets. You can use it without installing by running:
npx @alwaysproof/proofset --helpThe tool can create ProofSets, verify them against on-chain records, and handle selective disclosure for Advanced ProofSets.
View on npmWhere Can I Create a ProofSet?
You can create ProofSets using the Information Sheet Builder. ProofSet is one of the item types available when building your NFT.