859 B
859 B
Usage
To generate proof-of-work, per mCaptcha specification:
import {generate_proof} from "@mcaptcha/pow_sha256-polyfill"; /* yet to
be published in npm */
let salt = "randomsaltvalueprovidedbymcaptcha";
let phrase = "randomphrasevalueprovidedbymcaptcha";
let difficulty = 50_000;
let work = await generate_proof(salt, phrase, difficulty);