This is a tool I wrote to help timestamp files on the Bitcoin blockchain. Basically, it proves that a file existed at a certain time without needing to trust a central server.
It works on the Bitcoin Testnet right now.
- Hashing: It takes your files and calculates their SHA-256 hashes.
- Merkle Tree: It combines all those hashes into a single "Merkle Root".
- Anchoring: You take that root and put it into a Bitcoin transaction using
OP_RETURN. - Verification: Later, you can prove the file hasn't changed and was there when the block was mined.
Just install it with pip:
pip install .There are a few steps to timestamp your files.
First, pick a folder with the files you want to timestamp.
dfts batch my_documents/ --output hashes.jsonThis creates the Merkle tree and saves the root.
dfts merkle hashes.jsonThis will print out the Merkle Root. You'll need this for the next step.
This is where you actually put it on the blockchain. You'll need a wallet like Electrum (Testnet).
dfts anchor <PASTE_MERKLE_ROOT_HERE>Follow the instructions it prints out. Once you send the transaction, copy the TXID.
Now tell the tool the TXID so it can save the final proofs.
dfts finalize proofs/ <TXID>You can check a file later like this:
dfts verify my_documents/contract.pdf proofs/contract.pdf.json- Automate the wallet part (it's manual right now).
- Maybe support Mainnet properly.
- V1 (Current): CLI, Merkle aggregation, Manual anchoring (Testnet). Done.
- V2: Programmatic anchoring via PSBT.
- V3: OpenTimestamps compatibility and scalable servers.
- V4: Mainnet hardening & P2P proof propagation.