How to use Crypto Stamp as a service in your application?
I created an API for developers to integrate Crypto Stamp with their application. The Mobile App for Crypto Stamp is one such example which I have implemented. The application takes photos on phones and submits their hashes to this Crypto Stamp website.
You need to make an HTTP GET request to the URL http://cryptostamp.net/query.php with the argument hashes that contains hashes in a JSON encoded list which looks like:
http://cryptostamp.net/query.php?hashes=["(hash 1 value)", "(hash 2 value)", ... ]
This query command will both submit and query the hashes. If a hash has never been submitted, the hash is submitted and information is returned about the hash. If the hash has been submitted before, information is returned about the hash. So, this command alone should be sufficient to use Crypto Stamp in your own projects.
Here is an example, which you can try to visit:
The response to that example is a JSON encoded response. Each outer map in the response will map the queried hash to results for that hash. The results for that hash are a map of properties for the hash to values for those properties, some are missing for hashes not secured yet:
- "submitted time": has the first time submitted to Crypto Stamp
- "secured": either "true" or "false" for whether the hash has been secured yet
- "secured time": has the time secured in the Bitcoin blockchain
- "addr": secured Bitcoin address
- "csp": hexadecimal version of the .csp file used for decentralized proof
See csp file format for details and example code for how to check a stamp in a decentralized manner.