Why Nostr? What is Njump?
2025-06-04 13:04:39

YakiHonne on Nostr: 🔧 ots-tools is a suite of tools for the opentimestamps proof format To learn what ...

🔧 ots-tools is a suite of tools for the opentimestamps proof format
To learn what it does and how to use it, check out the article ,written by
#bitcoin #OTS

6 years ago I created some tools for working with peter todd’s opentimestamps proof format. You can do some fun things like create plaintext and mini ots proofs. This short post is just a demo of what these tools do and how to use them.

What is OTS?

OpenTimestamps is a protocol for stamping information into bitcoin in a minimal way. It uses OP_RETURN outputs so that it has minimal impact on chain, and potentially millions of documents are stamped all at once with a merkle tree construction.

Examples

Here’s the proof of the ots.c source file getting stamped into the ots calendar merkle tree. We’re simply printing the ots proof file here with otsprint:

$ ./otsprint ots.c.ots

version 1
file_hash sha256 f76f0795ff37a24e566cd77d1996b64fab9c871a5928ab9389dfc3a128ec8296
append 2e9943d3833768bdb9a591f1d2735804
sha256
|
\--> append 2d82e7414811ecbf
|    sha256
|    append a69d4f93e3e0f6c9b8321ce2cdd90decd34d260ea3f8b55e83d157ad398b7843
|    sha256
|    append ac0b5896401478eb6d88a408ec08b33fd303b574fb09b503f1ac1255b432d304
|    sha256
|    append 8aa9fd0245664c23d31d344243b4e8b0
|    sha256
|    prepend 414db5a1cd3a3e6668bf2dca9007e7c0fc5aa6dc71a2eab3afb51425c3acc472
|    sha256
|    append 5355b15d88d4dece45cddb7913f2c83d41e641e8c1d939dac4323671a4f8e197
|    sha256
|    append a2babd907ca513ab561ce3860e64a26b7df5de117f1f230bc8f1a248836f0c25
|    sha256
|    prepend 683f072f
|    append 2a4cdf9e9e04f2fd
|    attestation calendar https://alice.btc.calendar.opentimestamps.org
|
\--> append 7c8764fcaba5ed5d
|    sha256
|    prepend f7e1ada392247d3f3116a97d73fcf4c0994b5c22fff824736db46cd577b97151
|    sha256
|    append 3c43ac41e0281f1dbcd7e713eb1ffaec48c5e05af404bca2166cdc51966a921c
|    sha256
|    append 07b18bd7f4a5dc72326416aa3c8628ca80c8d95d7b1a82202b90bc824974da13
|    sha256
|    append b4d641ab029e7d900e92261c2342c9c9
|    sha256
|    append 4968b89b02b534f33dc26882862d25cca8f0fa76be5b9d3a3b5e2d77690e022b
|    sha256
|    append 48c54e30b3a9ec0e6339b88ed9d04b9b1065838596a4ec778cbfc0dfc0f8c781
|    sha256
|    prepend 683f072f
|    append 8b2b4beda36c18dc
|    attestation calendar https://bob.btc.calendar.opentimestamps.org
|
\--> append baa878b42ef3e0d45b324cc3a39a247a
|    sha256
|    prepend 4fb1bc663cd641ad18e5c73fb618de1ae3d28fb5c3c224b7f9888fd52feb09ec
|    sha256
|    append 731329278830c9725497d70e9f5a02e4b2d9c73ff73560beb3a896a2f180fdbf
|    sha256
|    append 689024a9d57ad5daad669f001316dd0fc690ac4520410f97a349b05a3f5d69cb
|    sha256
|    append 69d42dcb650bb2a690f850c3f6e14e46c2b0831361bac9ec454818264b9102fd
|    sha256
|    prepend 683f072f
|    append bab471ba32acd9c3
|    attestation calendar https://btc.calendar.catallaxy.com
append c3ccce274e2f9edfa354ec105cb1a749
sha256
append 6297b54e3ce4ba71ecb06bd5632fd8cbd50fe6427b6bfc53a0e462348cc48bab
sha256
append c28f03545a2948bd0d8102c887241aff5d4f6cf1e0b16dfd8787bf45ca2ab93d
sha256
prepend 683f072f
append 7f3259e285891c8e
attestation calendar https://finney.calendar.eternitywall.com

The tool can create a minimal version of the proofs:

$ ./otsmini ots.c.ots | ./otsmini -d | ./otsprint

version 1
file_hash sha256 f76f0795ff37a24e566cd77d1996b64fab9c871a5928ab9389dfc3a128ec8296
append 2e9943d3833768bdb9a591f1d2735804
sha256
append c3ccce274e2f9edfa354ec105cb1a749
sha256
append 6297b54e3ce4ba71ecb06bd5632fd8cbd50fe6427b6bfc53a0e462348cc48bab
sha256
append c28f03545a2948bd0d8102c887241aff5d4f6cf1e0b16dfd8787bf45ca2ab93d
sha256
prepend 683f072f
append 7f3259e285891c8e
attestation calendar https://finney.calendar.eternitywall.com

which can be shared on social media as a string:

5s1L3tTWoTfUDhB1MPLXE1rnajwUdUnt8pfjZfY1UWVWpWu5YhW3PGCWWoXwWBRJ16B8182kQgxnKyiJtGQgRoFNbDfBss19seDnco5sF9WrBt8jQW7BVVmTB5mmAPa8ryb5929w4xEm1aE7S3SGMFr9rUgkNNzhMg4VK6vZmNqDGYvvZxBtwDMs2PRJk7y6wL6aJmq6yoaWPvuxaik4qMp76ApXEufP6RnWdapqGGsKy7TNE6ZzWWz2VXbaEXGwgjrxqF8bMstZMdGo2VzpVuE

you can even do things like gpg-style plaintext proofs:

$ ./otsclear -e CONTRIBUTING.ots
-----BEGIN OPENTIMESTAMPS MESSAGE-----

Email patches to William Casarin <jb55@jb55.com>

-----BEGIN OPENTIMESTAMPS PROOF-----

AE9wZW5UaW1lc3RhbXBzAABQcm9vZgC/ieLohOiSlAEILXj4GSagG6fRNnR+CHj9e/+Mdkp0w1us
gV/5dmlX2NrwEDlcBMmQ723mI9sY9ALUlXoI//AQRXlCd716J60FudR+C78fkAjwIDnONJrj1udi
NDxQQ8UJiS4ZWfprUxbvaIoBs4G+4u6kCPEEaD8Ft/AIeS/skaOtQRoAg9/jDS75DI4pKGh0dHBz
Oi8vZmlubmV5LmNhbGVuZGFyLmV0ZXJuaXR5d2FsbC5jb23/8AhMLZVzYZMYqwjwEPKWanBNPZVm
kqsAYV3LBbkI8CCfIVveDh/S8ykOH1NC6BKTerHoPojvj1OmjB2LYvdUbgjxBGg/BbbwCGoo3fi1
A7rjAIPf4w0u+QyOLi1odHRwczovL2FsaWNlLmJ0Yy5jYWxlbmRhci5vcGVudGltZXN0YW1wcy5v
cmf/8Aik+VP+n3FhCwjwELfTdHAfYQNa49I3CYycFbkI8QRoPwW28AgCLn93967lIQCD3+MNLvkM
jiwraHR0cHM6Ly9ib2IuYnRjLmNhbGVuZGFyLm9wZW50aW1lc3RhbXBzLm9yZ/AQ3bEwg7mjQyKR
PykGgiJewAjwID5Q68dY4m+XogwTJx72ecQEe5lheCO1RnlcJSTFokyRCPEEaD8Ft/AIw1WWPe++
8N4Ag9/jDS75DI4jImh0dHBzOi8vYnRjLmNhbGVuZGFyLmNhdGFsbGF4eS5jb20=
-----END OPENTIMESTAMPS PROOF-----

$ ./otsclear -v <<<proof_string... # verify the proof string

I’ve never really shared these tools before, I just remembered about it today. Enjoy!

Try it out: https://github.com/jb55/ots-tools

Author Public Key
npub1yzvxlwp7wawed5vgefwfmugvumtp8c8t0etk3g8sky4n0ndvyxesnxrf8q