]> zoso.dev Git - nano-pow.git/commitdiff
Write man page and update package file.
authorChris Duncan <chris@zoso.dev>
Thu, 13 Mar 2025 00:38:26 +0000 (17:38 -0700)
committerChris Duncan <chris@zoso.dev>
Thu, 13 Mar 2025 00:38:26 +0000 (17:38 -0700)
nano-pow.1 [new file with mode: 0644]
package.json

diff --git a/nano-pow.1 b/nano-pow.1
new file mode 100644 (file)
index 0000000..3129220
--- /dev/null
@@ -0,0 +1,44 @@
+.TH nano-pow 1 2025-03-12 "nano-pow v3.1.0"
+.SH NAME
+nano-pow \- proof-of-work generation and validation for Nano cryptocurrency
+.SH SYNOPSIS
+\fBnano-pow\fR [\fIOPTION\fR]... \fIBLOCKHASH\fR...
+.SH DESCRIPTION
+Generate work for BLOCKHASH, or multiple work values for BLOCKHASH(es).
+.PP
+Multiple blockhash values must be separated by spaces.
+.SH OPTIONS
+.TP
+\fB\-h\fR, \fB\-\-help\fR
+Show this help dialog and exit.
+.TP
+\fB\-d\fR, \fB\-\-debug\fR
+Enable additional logging output.
+.TP
+\fB\-e\fR, \fB\-\-effort\fR \fIEFFORT\fR
+Increase demand on GPU processing. Must be between 1 and 32 inclusive.
+.TP
+\fB\-t\fR, \fB\-\-threshold\fR \fITHRESHOLD\fR
+Override the minimum threshold value. Must be in hexadecimal format between 0x0 and 0xFFFFFFFF.
+.TP
+\fB\-v\fR, \fB\-\-validate\fR \fIWORK\fR
+Check an existing work value instead of searching for one.
+.SH EXAMPLES
+Search for a work nonce for a blockhash using the default threshold 0xFFFFFFF8:
+\fBnano-pow 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\fR
+.PP
+Search for a work nonce using a custom threshold and increased effort:
+\fBnano-pow \-t fffffe00 \-e 32 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\fR
+.PP
+Search for multiple nonces from a file:
+\fBnano-pow $(cat /path/to/file.txt)\fR
+.PP
+Validate an existing work nonce against a blockhash and show debugging output:
+\fBnano-pow \-d \-v fedcba9876543210 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\fR
+.SH AUTHOR
+Written by Chris Duncan.
+.SH BUGS
+Email: <mailto:bug-nano-pow@zoso.dev>
+.SH COPYRIGHT
+Copyright \(co 2025 Chris Duncan <chris@zoso.dev>
+License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
index 6fafa1152c3d811a93b173541efe76afe7add99d..21b87e09518876810119da319e7c445db945ad69 100644 (file)
                "dist/main.min.js": true,
                "node:worker_threads": false
        },
-       "bin": "dist/cli.js",
+       "bin": "./dist/cli.js",
+       "man": "./dist/nano-pow.1",
        "repository": {
                "type": "git",
                "url": "git+https://zoso.dev/nano-pow.git"
        },
        "scripts": {
-               "build": "rm -rf {dist,{dist,types}} && tsc && node esbuild.mjs && npm run fix-copyright && cp cli.js types.d.ts dist",
+               "build": "rm -rf {dist,{dist,types}} && tsc && node esbuild.mjs && npm run fix-copyright && cp cli.js nano-pow.1 types.d.ts dist",
                "fix-copyright": "sed -i '/\\/\\/ src\\/shaders\\/compute\\.wgsl/a //! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>\\n//! SPDX-License-Identifier: GPL-3.0-or-later' dist/main.min.js"
        },
        "devDependencies": {
@@ -56,8 +57,8 @@
                "./dist/main.min.js",
                "./dist/types.d.ts"
        ],
-       "types": "dist/types.d.ts",
-       "unpkg": "dist/main.min.js",
+       "types": "./dist/types.d.ts",
+       "unpkg": "./dist/main.min.js",
        "optionalDependencies": {
                "puppeteer": "^24.4.0"
        }