From 187f211acd42af8692e5eb150174f81b499594fb Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Sat, 14 Jun 2025 11:52:48 -0700 Subject: [PATCH] Update README. --- README.md | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index f944899..eed61d0 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,8 @@ _Proof-of-work generation and validation with WebGPU/WebGL for Nano cryptocurren NanoPow uses WebGPU to generate proof-of-work nonces meeting the requirements of the Nano cryptocurrency. WebGPU is cutting edge technology, so for browsers -which do not yet support it, a WebGL 2.0 implementation is used as a fallback. +which do not yet support it, WebGL 2.0 and WASM implementations are available +as fallbacks. All calculations take place client-side, so nonces can be generated offline and cached for the next transaction block. For more information about the @@ -36,12 +37,6 @@ import { NanoPow } from 'nano-pow' import NanoPow from 'nano-pow' ``` -A specific API can be explicitly imported: - -```javascript -import { NanoPowGpu, NanoPowGl } from 'nano-pow' -``` - Use it directly on a webpage with a script module: ```html @@ -75,10 +70,12 @@ const { valid } = await NanoPow.work_validate(work, hash) ### Options ```javascript const options = { + // default best available in order: webgpu => webgl => wasm => cpu + api: 'webgpu', // default 0xFFFFFFF800000000 for send/change blocks difficulty: 'FFFFFFC000000000', - // default 8, valid range 1-32 - effort: 16, + // default 4, valid range 1-32 + effort: 8, // default false debug: true } @@ -137,11 +134,11 @@ detached process, and it can also be started manually to customize behavior by executing the server script directly. #### Environment Variables -`NANO_POW_PORT`: override the default port 5040 +`NANO_POW_DEBUG`: enable additional logging saved to the HOME directory -`NANO_POW_EFFORT` increase or decrease demand on the GPU +`NANO_POW_EFFORT`: increase or decrease demand on the GPU -`NANO_POW_DEBUG` enable additional logging saved to the HOME directory +`NANO_POW_PORT`: override the default port 5040 ```console $ # Launch the server and detach from the current session -- 2.47.3