View source: R/verify_timestamp.R
verify_timestamp | R Documentation |
There are effectively two ways of verifying a timestamp of a hash:
verify_timestamp( x, proof = NULL, use_originstamp = is.null(proof), error_on_fail = TRUE, url = api_url(), key = api_key() )
x |
x an R object (character vector containing file names of existing files or strings) of which a hash will be calculated using the function
|
proof |
either a file name or an URL pointing to the proof or certificate of the timestamp |
use_originstamp |
if |
error_on_fail |
if TRUE, raise error when api call fails, otherwise return the failed response.ß |
url |
the url of the api. The default is to use the url as returned by
the function |
key |
the api key. The default is to use the key as returned by the
function |
to use OriginStamp. This is the easies approach and is described
on their documentation site.
Similarly, when specifying use_originstamp = TRUE
the api will be used to retrieve information about the timestamp
using the get_hash_status()
function.
to not use OriginStamp. This directly queries the bitcoin blockchain. The host used to verify without the proof is not available anymore. Therefore this part does not work anymore. It is only included as an example how it could be done using a different host
For this, it is essential to have either the xml proof or the pdf certificate of the timestamp as can be downloaded by
the function extract_proof()
. Here, we assume that all verification should be done without any interaction with OriginStamp.
Only timestamps issued after middle February 2021 can be veryfied using this approach (OP_RETURN usage by OriginStamp.
data.frame
with currency_id
, transaction
and
timestamp
if verification was successful. Otherwise these are all set to NULL
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.