Skip to main content

Chainpoint proof of existence library

Project description


A Python 3 module for validating Chainpoint blockchain receipts. Fork of pychainpoint.


$ pip install chainpoint3


Use the is_valid_receipt function to validate your Chainpoint receipt.


#  receipt - the receipt to be validated, as a string


from chainpoint3 import Chainpoint

receipt = '''{
    "header": {
        "chainpoint_version": "1.1",
        "hash_type": "SHA-256",
        "merkle_root": "5faa75ca2c838ceac7fb1b62127cfba51f011813c6c491335c2b69d54dd7d79c",
        "tx_id": "b84a92f28cc9dbdc4cd51834f6595cf97f018b925167c299097754780d7dea09",
        "timestamp": 1445033433
    "target": {
        "target_hash": "cbda53ca51a184b366cbde3cb026987c53021de26fa5aabf814917c894769b65",
        "target_proof": [{
            "parent": "4f0398f4707c7ddb8d5a85508bdaa9e22fb541fa0182ae54f25513b6bd3f8cb9",
            "left": "cbda53ca51a184b366cbde3cb026987c53021de26fa5aabf814917c894769b65",
            "right": "a52d9c0a0b077237f58c7e5b8b38d2dd7756176ca379947a093105574a465685"
        }, {
            "parent": "5faa75ca2c838ceac7fb1b62127cfba51f011813c6c491335c2b69d54dd7d79c",
            "left": "4f0398f4707c7ddb8d5a85508bdaa9e22fb541fa0182ae54f25513b6bd3f8cb9",
            "right": "3bd99c8660a226a62a7df1efc2a296a398ad91e2aa56d68fefd08571a853096e"
validator = Chainpoint()
result = validator.is_valid_receipt(receipt)
Sample Valid Result
  type: 'BTCOpReturn',
  source_id: 'f3be82fe1b5d8f18e009cb9a491781289d2e01678311fe2b2e4e84381aafadee',
  exists: true
Sample Invalid Result
  error='Cannot parse receipt JSON'

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for chainpoint3, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size chainpoint3-0.1.1-py3-none-any.whl (7.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size chainpoint3-0.1.1.tar.gz (6.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page