No description
.github | ||
src | ||
.eslintrc.js | ||
.gitignore | ||
jest.config.ts | ||
LICENSE_APACHE | ||
LICENSE_MIT | ||
package.json | ||
README.md | ||
tsconfig.json | ||
webpack.config.js | ||
yarn.lock |
Usage
To generate proof-of-work, per mCaptcha specification:
import {generate_proof} from "@mcaptcha/pow_sha256-polyfill";
let salt = "randomsaltvalueprovidedbymcaptcha";
let phrase = "randomphrasevalueprovidedbymcaptcha";
let difficulty = 50_000;
let work = await generate_proof(salt, phrase, difficulty);