// `hash` is a 64-char hex string
// `threshold` is optional and defaults to "0xFFFFFFF8"
const workGpu = await NanoPowGpu.search(hash, threshold)
+// or if WebGPU is unsupported
const workGl = await NanoPowGl.search(hash, threshold)
```
You may also embed it in the global namespace by targeting `dist/global.min.js`
+## Validation
+NanoPow can also validate previously-generated work values against a block hash.
+Currently this is only implemented in the WebGPU tool and not WebGL.
+
## Notes
The `work` field in a Nano transaction block contains an 8-byte nonce that
satisfies the following equation:
consequently immense, but the goal is to squeeze every last bit of speed and
performance out of it.
-## Validating work
-Although the nonces generated by this package have been tested extensively, a
-validation function is not currently implemented. There are other tools
-available to perform this trivial task, but if there is demand for it, then it
-can be delivered in a future update.
-
## Tests
`test.html` in the source repository contains some basic tests to compare the
speed of this tool. Feel free to check out how your system fares.