Yesterday there were two ways to call our hash timestamping service.
1. For humans
The first is through the notarize page. The service is free, but you need to solve a captcha to prevent spam. Without captcha the service could be machine called multiple times causing a lot of backend costs. We simply can’t afford that.
2. For machines
The second is through the authenticated api. If you call this API with an
example request you get the
Unauthorized request error because you need an Eternity Wall account and provide a valid signature to be able to call the authenticated api.
3. For bitcoin-enabled machines
The third and new one way is for bitcoin-enabled machines. Using the 21 platform we are proposing another way to consume the API, a way that is machine-callable but it is not necessary to have an account.
How to prevent spam and request abuse? By paying bitcoin at every request. If you try to call this endpoint it will be presented the
Payment required error, the
402 special http code.
This response code was thought at the very beginning of the http protocol specification but none used it because we haven’t a valid digital money yet, until bitcoin.
By installing the 21 library (at the time of writing available on Mac and Ubuntu) you can purchase the endpoint with 100 satoshi (now $0.0005) with the following command:
And getting the result
Instead of getting information about a previously subimitted hash, you can send a new one created by one of your document by calling the
sha256 function with a
POST request, for example:
Calling the API from the command line is mostly for testing, but you can easily integrate the api call in a python program.
If you like this article and our API, don’t forget to rate it with the command