Transactions in a blockchain are marked by an unique identifier and a
UTC timestamp. Linking a transaction to an external public document means that you can assign a certified timestamp to it.
I made a simple proof-of-concept on the Stellar public blockchain in order to suggest some ideas for a possible fully-automated implementation.
A way to create a reference from a Stellar transaction to a public available file is to compute its
md5sum hash and write it, for example, in the
MEMO field. In this PoC, I managed to embed the Transaction Sequence Number inside the document itself, before computing
md5sum, and that’s quite self-referring.
Additionally, but not required, I also signed the linked document with my GPG key.
You can run an example by yourself, on the public or testnet Stellar blockchain, by using Stellar Laboratory (Transaction Builder) and the following checklist.
- Create a text file (check mine here) containing the Transaction Sequence Number (not known yet - it will be placed later), the account (Stellar public address) you are going to use for this transaction and some other info you like.
- Open Stellar Laboratory, select the blockchain (
custom) and then select Transaction Builder.
- Set the Source Account field with the address of your Stellar account.
- Fetch a new Transaction Sequence Number by pressing the related button.
- Copy the Transaction Sequence Number in your text file (let’s say,
filename.txt) and save it.
- Optional: sign the above file by using
gpg --clearsign -a filename.txt) - you’ll get the file
filename.txt.asc(check mine here).
- Compute the
md5sumhash of your final text file (signed or not) - on Linux:
- Copy the 32-character long
- On Stellar Laboratory set the Memo field as Hash and paste the above
md5sumhash in the text field provided - prefix this string with 32
0characters until the red warning message below the text field disappears.
- On Stellar Laboratory, select Operation Type as Set Options.
- Complete this transaction by signing with your secret key for the specified account.
And you are done!
In my PoC, I initially got the Transaction Sequence Number
md5sum for my final file is
You can check my transaction here - you can easily find yours searching by transaction number. More in detail:
- “Created at” field is our certified timestamp.
- Fee paid was only
0.00001 XLM: that’s incredibily cheap!
- “Memo (HASH)" is the reference (
md5sum) to our original file - select display in
hexformat and consider the last 32 characters.
Now your turn, in order to customize this scheme and write some code, according to your needs!