Follow

Manually Verifying Blockchain Records

An important aspect of recording data on the Blockchain is that it allows you to independently verify the data without needing to trust any particular organization.

In this guide we'll walk through how to verify a Blockchain credential without using the Accredible interface.

Our Blockchain Process

The first step in independently verifying a Blockchain credential is to understand how we create the record and what the data represents.

  1. We make a JSON representation of the credential including the fields "credential name", "issuer name", "issuer url", "recipient name", "recipient identity" etc. This representation is similar to the JSON schema here: https://github.com/blockchain-certificates/cert-schema.  
  2. Given this JSON representation of the credential we generate a SHA256 of it. We store the JSON in our own records and we record the SHA256 record on Blockchain. 

Independent Verification

To independently verify a Blockchain credential record's data:

  1. Use this API endpoint to get the current JSON representation of the credential and to get the Blockchain record ID: http://docs.accrediblecredentialapi.apiary.io/#reference/credentials/credential-redirect/verify-blockchain-credential?console=1 - here's a specific example request URL: https://api.accredible.com/v1/credentials/blockchain_data/9c21begh
    Note: the ID used in the endpoint is the credential.encoded_id field.
  2. In the response the receipt may be found under the key response["data"]["receipt"]. The target hash is at response["data"]["receipt"]["targetHash"].
  3. The current, up to date credential data may be found at response["data"]["credential_json_data"].
  4. Calculate the SHA256 of the stringified JSON data (the credential data). For example in Ruby: Digest::SHA256.hexdigest(json_data.to_json). This gives you the current credential hash.
  5. Compare the target hash and the up to date credential hash. If they are the same then the Blockchain record matches the current credential data. If they're different then the credential data has been updated since the blockchain record was made.

To independently verify a receipt from Tierion:

  1. Use this API endpoint to get the current JSON representation of the credential and to get the Blockchain record ID: http://docs.accrediblecredentialapi.apiary.io/#reference/credentials/credential-redirect/verify-blockchain-credential?console=1 - here's a specific example request URL: https://api.accredible.com/v1/credentials/blockchain_data/9c21begh
    Note: the ID used in the endpoint is the credential.encoded_id field.
  2. Go to https://tierion.com/validate and paste the receipt as instructed from response["data"]["receipt"].

 

 

 

 

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.