Verify data
Too busy to read the documentation?
You will find here very simple
curl
andshell
code samples demonstrating the basic usage of the Woleet API.
Verifying the timestamp or the signature of a file using the Woleet API is straightforward. It only requires you to have the file itself and the proof receipt.
First of all, you need to compute the SHA256 hash of your file (its 'digital fingerprint') to ensure that the proof receipt was actually created for this file.
Let's do it using a simple shell command using openssl to do the computation:
$ cat <your file> | openssl dgst -sha256 | cut -d " " -f 2
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
Now that you know the SHA256 hash of your file, you must:
- for proof of existence: verify that the
targetHash
attribute matches the file hash - for proof of signature: verify that the
signature.signedHash
attribute matches the file hash
Now that you are sure the file matches the proof receipt, you can verify the proof.
Let's do it using a simple curl command to do a POST request:
curl --request POST \
--url 'https://api.woleet.io/v1/receipt/verify'
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
-d @<your proof receipt>
{
"code":"VERIFIED",
"text":"Proof receipt is verified",
"timestamp":1603371010000,
"confirmations":2929
}
Your proof is verified!
You can find a complete description of the verification results in the reference documentation.
How can I verify a proof independently from Woleet ?
- If you want to verify a proof programmatically using JavaScript, you can use the Woleet Web Libraries
- If you want to verify a proof online, you can use Woleet Auditor Woleet's official web app for proof verification, or you can use BTCProof.info an open sourced web app leveraging Woleet Web Libraries and allowing to verify proofs independently from Woleet.
- If you want to verify a proof in a full manual way, see https://doc.woleet.io/reference#about-the-verification-process
What about Java, Javascript, Node, Python and PHP code samples?
For other programming languages, you can generate sample code using our actionable API Reference just below.
Updated over 4 years ago