# `Wiztchta.Challenges.ProofOfWork`
[🔗](https://github.com/darth-jorge/wiztcha/blob/v0.1.0/lib/wiztchta/challenges/proof_of_work.ex#L1)

Invisible proof-of-work challenge (the default).

The browser must find a `nonce` such that `SHA-256(salt <> nonce)` starts
with `difficulty` zero bits. Legitimate users wait about a second; bots
pay that CPU cost on every submission. The server verifies with one hash.

Requires the `wiztchta` JS (see the README) and a secure context
(HTTPS or localhost), since it uses `crypto.subtle`.

## Options

  * `:difficulty` - leading zero bits required. Each +1 doubles the
    average work. Defaults to the `:pow_difficulty` config, or `16`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
