prover

1.0.1 • Public • Published

Prover JS library

A reference library for building Javascript applications using the Prover documentation.

Introduction

Using this library you can respond to Proof-of-Work challenges provided by a service (ie your API).

Installation with npm

Quick and simple:

npm install prover-js --save

Usage

The following example illustrates how to use Prover. You will need also a nonce generator like the following:

const oratush = require('prover-js');
const nonce = require('prover-js-rnonce'); // We also need a nonce generator

const difficulty = 8; // This is provided by the server
const data = new Uint8Array(32); // Also provided by the server
window.crypto.getRandomValues(data);

oratush.prover.process(difficulty, data, nonce).then((value) => {
    console.log(value);
});

Copyright and license

Copyright 2023 Vassilis Poursalidis. Released under Apache 2.0 - see the LICENSE file for details.

Package Sidebar

Install

npm i prover

Weekly Downloads

13

Version

1.0.1

License

Apache-2.0

Unpacked Size

17.8 kB

Total Files

4

Last publish

Collaborators

  • poursal