stamp-verify
v0.1.0
Published
Open-source CLI to verify BA | Stamp blockchain timestamps independently
Downloads
124
Maintainers
Readme
stamp-verify
Open-source CLI to independently verify BA | Stamp blockchain timestamps.
No account needed. No dependency on bastamp.com. Just cryptographic math and a public blockchain.
What it does
- Computes the SHA-256 hash of your file (or accepts a known hash)
- Rebuilds the Merkle root from the hash + proof (keccak256, sortPairs)
- Queries the Stamper smart contract on Polygon
- Reports the on-chain timestamp if the root is anchored
Install
npm install -g stamp-verifyOr run without installing:
npx stamp-verify document.pdf --proof proof.jsonUsage
Verify a file
stamp-verify document.pdf --proof proof.jsonVerify using a known hash
stamp-verify --hash 0x3a7bd3e2... --proof proof.jsonJust compute the SHA-256
stamp-verify hash document.pdfJSON output
stamp-verify document.pdf --proof proof.json --jsonWhere to get the proof
The Merkle proof is included in every BA | Stamp certificate PDF (page 2). You can also download it from the public verification page:
https://bastamp.com/verify/<your-file-hash>Save the proof array as a JSON file:
["0xabc123...", "0xdef456...", "0x789..."]How it works
BA | Stamp batches document hashes into a Merkle tree and anchors the root on the Polygon blockchain. Each document gets a Merkle inclusion proof that links it to the on-chain root.
This tool reproduces the verification locally:
- SHA-256 — same algorithm used by BA | Stamp in the browser
- keccak256 + sortPairs — same Merkle tree construction as the Stamper contract
- On-chain query — reads
timestamps(root)from the public smart contract
The Stamper contract is verified on Polygonscan. Anyone can inspect the source code.
Contract
| | |
|---|---|
| Address | 0x50ddee9a1afbe1a14f1cf01b379535f897b3ca3d |
| Chain | Polygon (PoS) |
| Verified source | Polygonscan |
Desktop app (GUI)
A Tauri-based desktop binary lives in gui/. Same verification
logic as the CLI (via src/core/verify.ts), wrapped in a drag-a-file UI.
Run in browser (dev)
cd gui
npm install
npm run dev # opens http://localhost:1420Build the native binary
Requires Rust and, on Linux, Tauri's system dependencies:
# Ubuntu/Debian
sudo apt install libwebkit2gtk-4.1-dev build-essential curl wget file \
libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev pkg-config
# macOS: Xcode Command Line Tools (xcode-select --install)
# Windows: Microsoft Visual Studio C++ Build Tools + WebView2 (pre-installed on Win 11)Then:
cd gui
npm run tauri:build # produces .dmg / .msi / .AppImage under gui/src-tauri/target/release/bundle/License
MIT — use it however you want.
