https://github.com/mcaptcha/pow_sha256-polyfill
JavaScript polyfil for https://github.com/mCaptcha/pow_sha256
https://github.com/mcaptcha/pow_sha256-polyfill
Last synced: over 1 year ago
JSON representation
JavaScript polyfil for https://github.com/mCaptcha/pow_sha256
- Host: GitHub
- URL: https://github.com/mcaptcha/pow_sha256-polyfill
- Owner: mCaptcha
- License: apache-2.0
- Created: 2021-06-27T15:47:53.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-03-29T11:27:28.000Z (over 2 years ago)
- Last Synced: 2025-04-10T15:57:57.332Z (over 1 year ago)
- Language: TypeScript
- Size: 844 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE_APACHE
Awesome Lists containing this project
README
PoW JavaScript library
JavaScript library to generate PoW for mCaptcha
[](https://mcaptcha.github.io/pow_sha256-polyfill/)
![Build)]()
[](https://codecov.io/gh/mCaptcha/pow_sha256-polyfill)
## Usage
To generate proof-of-work, per mCaptcha specification:
```typescript
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);
```
## Funding
### NLnet
2023 development is funded through the [NGI0 Entrust
Fund](https://nlnet.nl/entrust), via [NLnet](https://nlnet.nl/). Please
see [here](https://nlnet.nl/project/mCaptcha/) for more details.