0.1.0 • Published 6 years ago

crypto-chain-validator v0.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

crypto-chain-validator

Simple block & transaction validation using joi.

INSTALL

yarn add crypto-chain-validator

or

npm i --save crypto-chain-validator

EXAMPLE

import { validate } from 'crypto-chain-validator';

const result = validate('block', {
  index: 0,
  prevHash: '0000000000000000000000000000000000000000000000000000000000000000',
  time: 0,
  transactions: [],
  nonce: 0,
  hash: '0000000000000000000000000000000000000000000000000000000000000000'
});

result.error; // null