🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

blockai-verify

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blockai-verify

Verify Blockai blockchain proofs

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

blockai-verify

Build Status

This is a client side library and web UI for verifying Blockai issued proofs.

Proofs are composed of a merkle branch, original data and a root hash which is written on the Bitcoin blockchain, effectively timestamping the data.

The proof format is based on chainpoint proof format.

Verify a Blockai proof

Install

npm install --save blockai-verify

Usage

import blockaiVerify from 'blockai-verify'
import fs from 'fs'

const proofData = JSON.parse(fs.readFileSync('./some-blockai-proof.json', {
  encoding: 'utf-8',
}))

const proof = blockaiVerify(proofData)

proof.analyze().then((results) => {
  console.log(results)
  /*
    {
      // optional info for nicer error messages in case
      // isValid is false
      validations: {
        isTargetHashValid: true,
        isMerkleRootValid: true,
        isDataHashValid: true,
        isTxValid: true,
      },
      confirmations: 4097,
      isValid: true, // true if valid and false if invalid
    }
  */
})

TODO: cli installed with npm install -g blockai-verify

Keywords

merkle

FAQs

Package last updated on 16 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts