You have a file, a proof bundle and a certificate from a timestamping service, and you are about to rely on them. The question worth asking first: if that service went offline tomorrow, could you still show that this file existed by the anchor time? With a public-chain anchor and the bundle in your hands, yes. This post walks through the check, and no step in it calls the vendor.
What independent verification needs
Three things, none of them a request to the company that issued the certificate:
1. The hash of the file, recomputed by you from the bytes. Never trust the hash printed on a certificate. 2. The proof bundle: a small JSON document naming the hash, the chain, the transaction id and the anchor time. 3. The transaction itself, read from the public chain through a block explorer or a node you choose.
If the hash you compute matches the bundle, and the transaction on the chain carries that hash, the proof holds whether or not the vendor exists. If the vendor is wrong or gone, the chain shows it.
Step 1: recompute the hash
Read the actual bytes. A hash string in a JSON file is a claim; the bytes are the fact.
import hashlib
def sha256_file(path, chunk_size=65536):
h = hashlib.sha256()
with open(path, "rb") as f:
for chunk in iter(lambda: f.read(chunk_size), b""):
h.update(chunk)
return h.hexdigest()
print(sha256_file("contract.pdf"))
# a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2
Compare the result with the hash field in the bundle. If they differ, stop: this is not the file the proof was made for, or it has changed since.
Step 2: check the file against the bundle, offline
The open-source verify-proof tool does step 1 and the comparison in one command. It uses only the Python standard library and makes no network call.
pip install verify-proof
verify-proof verify contract.pdf --proof contract.pdf.proof.json
# VERIFIED: File matches the proof bundle. The bundle says it was anchored on polygon at 2026-10-15T02:11:09.512Z in transaction 0xabc123.... Look that transaction up on a block explorer to confirm it: https://polygonscan.com/tx/0xabc123...
A ProofLedger bundle looks like this, abridged:
{
"format": "verify-proof/1",
"service": "proofledger",
"hash": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2",
"algorithm": "sha256",
"blockchain": "polygon",
"tx_id": "0xabc123...",
"anchored_at": "2026-10-15T02:11:09.512Z",
"merkle_path": [],
"proof_id": 42
}
Be clear about what this step proves. verify-proof hashes the file, compares it with the bundle, and reports the transaction to look up. It does not read the chain. Until you do step 3, the transaction id and the anchor time are what the bundle says, nothing more. The exit code is 0 on a match and 1 on anything else, so it drops into a script or a CI job as it is.
Step 3: confirm the transaction on the public chain
Open the transaction on a block explorer. For Polygon, verify-proof prints the Polygonscan link; any other Polygon explorer works too. Two things to confirm:
- The transaction carries your hash. Search the transaction page for the 64-character value you computed in step 1.
- The block the transaction sits in. Its timestamp is the anchor time, set by the chain, not by the vendor.
If both check out, a file with this exact hash existed by that block's time. That is the whole claim a timestamp proof makes, and you have now confirmed every part of it from public data.
The same lookup can be scripted against any public Polygon JSON-RPC endpoint you trust (put its URL in POLYGON_RPC_URL). This fetches the transaction and its receipt and searches both, as text, for the hash, so it does not depend on how the service laid the data out:
import json, os, requests
RPC = os.environ["POLYGON_RPC_URL"]
def rpc(method, params):
r = requests.post(RPC, json={"jsonrpc": "2.0", "method": method, "params": params, "id": 1}, timeout=15)
r.raise_for_status()
return r.json()["result"]
def hash_on_chain(tx_id, file_hash):
tx = rpc("eth_getTransactionByHash", [tx_id])
receipt = rpc("eth_getTransactionReceipt", [tx_id])
if not tx or not receipt:
return False, None
text = json.dumps(tx).lower() + json.dumps(receipt).lower()
block = rpc("eth_getBlockByNumber", [receipt["blockNumber"], False])
anchored = int(block["timestamp"], 16) # Unix seconds, set by the chain
return file_hash.lower() in text, anchored
Tying it together
from datetime import datetime, timezone
from verify_proof import hash_file, load_proof, verify_proof
def check(path, bundle_path):
file_hash = hash_file(path)
bundle = load_proof(bundle_path)
local = verify_proof(file_hash, bundle)
if not local["verified"]:
return False, local["error"]
found, anchored = hash_on_chain(local["tx_id"], file_hash)
if not found:
return False, "transaction not found or does not carry the hash"
when = datetime.fromtimestamp(anchored, timezone.utc).isoformat()
return True, f"existed by {when} ({local['blockchain']} {local['tx_id']})"
Two sources, neither of them the vendor: the bytes on your disk and a public chain. If this returns True, the timestamp claim stands on its own. It will give the same answer in five years, as long as the chain is still running and you still hold the bundle, whatever has happened to the company that issued it.
Where ProofLedger fits
ProofLedger is proof of existence as an API: send a file's SHA-256 hash, get a Polygon-anchored certificate anyone can verify without us. Every proof is its own public Polygon transaction, usually within a minute of submission. The bundle above comes from the API, and it is the thing to keep next to the file:
curl -H "Authorization: Bearer sk_your_key" "https://proofledger.io/api/v1/proof/42/bundle?download=1" -o contract.pdf.proof.json
The same document arrives as data.bundle in the proof.polygon.anchored webhook payload, so a pipeline can store it the moment the anchor lands. There is also a public lookup, GET https://proofledger.io/api/v1/verify?hash=<sha256>, with no API key and a limit of 120 requests an hour per IP. It is a convenience. The record of a proof is the Polygon transaction plus the bundle; the certificate page and the API are views of that record, not the record itself.
A proof shows that a file with this exact hash existed by the anchor time and has not changed since. It does not show who made the file, that its contents are accurate, or who owns it.
To check a proof without ProofLedger: run verify-proof verify against the bundle, then open the transaction on any Polygon block explorer and confirm it carries the hash. The API, the bundle format and the webhook payload are documented at https://proofledger.io/api.html.