pow-wasm
Proof of work similar to Hashcash, based on BLAKE2b, written in JavaScript and WebAssembly
Installation
yarn add pow-wasm
Usage
const ObjectId = ObjectIdconst solve = solveconst validate = validate const salt = '' + console // 5be97e10b697c24689180e9b
Message format
Name | Type | Size | Comment |
---|---|---|---|
nonce | int64 | 8 | Little-endian int53 |
salt | ObjectId | 12 | |
bits | int8 | 1 | |
contents | UTF-8 | Capped at 1 MiB |
The field separator is '\t'