Chainpoint

Chainpoint is a standard protocol for creating a universally verifiable proof of any data, file, or series of events.

Anchor an unlimited amount of data to the blockchain, allowing anyone to prove the data existed at a point in time and has not been modified.

What’s a blockchain receipt?

Each receipt is a JSON-LD document that contains all the information needed to verify the data without relying on a trusted third party.

download the whitepaper

Blockchain Receipt Format

NameDescription
@contextthe JSON-LD context for the receipt
typereceipt type definition specifying hash method and version
targetHashhash value being anchored to the blockchain
merkleRootmerkle tree root value that is anchored to the blockchain
proofmerkle proof establishing link from the targetHash to the merkleRoot
anchors
typeanchor type definition specifying anchoring method
sourceIdidentifier, such as a transaction id, used to locate anchored data

Example

{
 "@context": "https://w3id.org/chainpoint/v2",
 "type": "ChainpointSHA256v2",
 "targetHash": "bdf8c9bdf076d6aff0292a1c9448691d2ae283f2ce41b045355e2c8cb8e85ef2",
 "merkleRoot": "51296468ea48ddbcc546abb85b935c73058fd8acdb0b953da6aa1ae966581a7a",
 "proof": [
   {
     "left": "bdf8c9bdf076d6aff0292a1c9448691d2ae283f2ce41b045355e2c8cb8e85ef2"
   },
   {
     "left": "cb0dbbedb5ec5363e39be9fc43f56f321e1572cfcf304d26fc67cb6ea2e49faf"
   },
   {
     "right": "cb0dbbedb5ec5363e39be9fc43f56f321e1572cfcf304d26fc67cb6ea2e49faf"
   }
 ],
 "anchors": [
   {
     "type": "BTCOpReturn",
     "sourceId": "f3be82fe1b5d8f18e009cb9a491781289d2e01678311fe2b2e4e84381aafadee"
   }
 ]
}

Receipt Types

Receipt type values indicate the hash type and version of the receipt. The following values are supported.

TypeDescription
ChainpointSHA224v2Chainpoint 2.0 receipt using SHA-224
ChainpointSHA256v2Chainpoint 2.0 receipt using SHA-256
ChainpointSHA384v2Chainpoint 2.0 receipt using SHA-384
ChainpointSHA512v2Chainpoint 2.0 receipt using SHA-512
ChainpointSHA3-224v2Chainpoint 2.0 receipt using SHA3-224
ChainpointSHA3-256v2Chainpoint 2.0 receipt using SHA3-256
ChainpointSHA3-384v2Chainpoint 2.0 receipt using SHA3-384
ChainpointSHA3-512v2Chainpoint 2.0 receipt using SHA3-512

Anchor Types

Anchor type values indicate the method and location of the anchored data. The following values are supported. Support for additional methods is planned.

TypeDescription
BTCOpReturnAnchored to a Bitcoin transaction within an OP_RETURN output.
ETHDataAnchored to an Ethereum transaction within the data field.
NameDescription
Header
chainpoint_versionversion of the Chainpoint standard
hash_typehashing algorithm used to encrypt target data (sha­256)
merkle_rootroot of the Merkle Tree that is published in the blockchain
tx_idblockchain transaction id
timestampnon­authoritative Unix timestamp of the target
Target
target_hashhash of the target that is being recorded in the blockchain
target_proofMerkle proof used to prove target_hash is part of Merkle tree
target_URI (optional)path to the target
Extra
custom (optional)array of user defined key value pairs

Example

{
  "header": {
    "chainpoint_version": "1.1",
    "hash_type": "SHA-256",
    "merkle_root": "8dbd52c5ff89b70711b06c143520ef4eb295c51040757c7a4ab56303f0f6b68f",
    "tx_id": "77d93bce0f0ff76f1a52424f9c0aeb165990dc37a5e3aaf85031a2f6ab2967d1",
    "timestamp": 1438317621
  },
  "target": {
    "target_hash": "a64f10ca86a880115cc271232dc8577606dc6223cf009a4dd1290cd55b2d6a28",
    "target_uri ": "https://www.someurl.com/target/id",
    "target_proof": [
      {
        "parent": "ee32ac6eb702c289ba2a932e6562b2c45070121cacb26cabdee433a6cf2086cd",
        "left": "a64f10ca86a880115cc271232dc8577606dc6223cf009a4dd1290cd55b2d6a28",
        "right": "f07934733450ba14972b8fbea4c39ac05b0b8e2d8a45ddde9dbe03bb70942b6a"
      },
      {
        "parent": "8dbd52c5ff89b70711b06c143520ef4eb295c51040757c7a4ab56303f0f6b68f",
        "left": "ee32ac6eb702c289ba2a932e6562b2c45070121cacb26cabdee433a6cf2086cd",
        "right": "07084efda9cf5488ef9d4f9ad8bca8521581aaa32331b62aeb2fe3e132e62d1a"
      }
    ]
  },
  "extra": [
    {
      "custom_key_1": "value_1"
    },
    {
      "custom_key_2": "value_2"
    }
  ]
}

Validating Receipts

Receipt validation confirms that the receipt is well formatted, the values are correct, and the proper value is stored in each anchor point. Validating a receipt provides proof that your targetHash had been anchored successfully.

A Node.js package is available for validating Chainpoint receipts.
https://github.com/chainpoint/chainpoint-validate-js