@chainio/vaultcheck

1.0.0 • Public • Published

Vault Check

A validation library for Vault by Chain.io

Usage

const vaultCheck = '@chainio/vaultcheck'

# Verify a local file and receipt against the blockchain
const filePath = '/home/me/sourcefile.pdf'
const receiptPath '/home/me/sourcefile-receipt.json'
const ethereumServiceProvider = 'https://main.infura.io/your-infura-id'

vaultCheck.checkFiles(ethereumServiceProvider, filePath, receiptPath)
.then((result) => {
  if (result.pass) {
    console.log('it passed')
    console.log('transaction date', result.transactionDate)
  } else {
    console.log('it failed', result.messages)
  }
})

# Verify a local file and receipt against each other without the blockchain
const result = vaultCheck.checkFilesLocal(filePath, receiptPath)
if (result.pass)
  console.log('it passed')
} else {
  console.log('it failed', result.messages)
}

Readme

Keywords

none

Package Sidebar

Install

npm i @chainio/vaultcheck

Weekly Downloads

9

Version

1.0.0

License

MIT

Unpacked Size

160 kB

Total Files

23

Last publish

Collaborators

  • okuti
  • epan-chainio
  • eayala
  • jgivens11
  • jbilotta
  • clairemuscat
  • ekocian-chain
  • eldinoyev
  • bglick
  • cjstadther
  • shopsinc
  • vmestre-chain
  • jhulford
  • conclaa
  • mplatt-chainio