Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
chainpoint-proof-json-schema
Advanced tools
Readme
A simple npm package to validate a Chainpoint v3 Proof, in JSON format, against a JSON Schema (Draft 04).
Take a look here to learn more about https://chainpoint.org
This package does not validate that the hashes in a proof are valid up to an anchor (e.g. BTC, ETH). In fact this package doesn't know what a hash is! It only validates that the proof you provide it with is a well formed proof according to its schema. Nothing more, nothing less.
Test out the schema validation with a sample proof, or one of your own.
https://chainpoint.org/chainpoint-proof-json-schema/
https://spacetelescope.github.io/understanding-json-schema/index.html
yarn add chainpoint-proof-json-schema
const chainpointProofSchema = require('chainpoint-proof-json-schema')
let objectToValidate = {}
let res = chainpointProofSchema.validate(objectToValidate)
// {valid: true, errors: null}
if (res.valid) {
console.log('valid')
} else {
console.log(res.errors)
}
Note : You can copy docs/bundle.js
into your app to include in a script tag, or use the http://rawgit.com/ CDN version (make sure the Git commit SHA1 in the URL is current). Rawgit is a free service and makes no guarantees for uptime.
<script src="https://cdn.rawgit.com/chainpoint/chainpoint-proof-json-schema/495732a06654615f2b2d4c5716c59f769a99d3c2/docs/bundle.js"></script>
Or install the npm package in a place available to your web pages and set the script src
tag to something like the following. A window global function chainpointProofSchema.validate()
will be available and operate the same as the Node.js example above.
<script src="./node_modules/chainpoint-proof-json-schema/docs/bundle.js">
yarn test
Will store a browserify bundle to docs/bundle.js
which can also be used
from directly within the <script>
tag in an HTML page.
yarn bundle
yarn browser
FAQs
A JSON Schema (Draft 04) validator for Chainpoint v4 Proofs
The npm package chainpoint-proof-json-schema receives a total of 2 weekly downloads. As such, chainpoint-proof-json-schema popularity was classified as not popular.
We found that chainpoint-proof-json-schema demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.